当前位置: 首页>>代码示例>>Java>>正文


Java Entity.setHasKeepSections方法代码示例

本文整理汇总了Java中de.greenrobot.daogenerator.Entity.setHasKeepSections方法的典型用法代码示例。如果您正苦于以下问题:Java Entity.setHasKeepSections方法的具体用法?Java Entity.setHasKeepSections怎么用?Java Entity.setHasKeepSections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.greenrobot.daogenerator.Entity的用法示例。


在下文中一共展示了Entity.setHasKeepSections方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addDepartment

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addDepartment(Schema schema){
    Entity department = schema.addEntity("DepartmentEntity");
    department.setTableName("Department");
    department.setClassNameDao("DepartmentDao");
    department.setJavaPackage(entityPath);

    department.addIdProperty().autoincrement();
    department.addIntProperty("departId").unique().notNull().index();
    department.addStringProperty("departName").unique().notNull().index();
    department.addIntProperty("priority").notNull();
    department.addIntProperty("status").notNull();

    department.addIntProperty("created").notNull();
    department.addIntProperty("updated").notNull();

    department.setHasKeepSections(true);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:18,代码来源:GreenDaoGenerator.java

示例2: addGroupInfo

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addGroupInfo(Schema schema) {
    Entity groupInfo = schema.addEntity("GroupEntity");
    groupInfo.setTableName("GroupInfo");
    groupInfo.setClassNameDao("GroupDao");
    groupInfo.setJavaPackage(entityPath);

    groupInfo.addIdProperty().autoincrement();
    groupInfo.addIntProperty("peerId").unique().notNull();
    groupInfo.addIntProperty("groupType").notNull();
    groupInfo.addStringProperty("mainName").notNull();
    groupInfo.addStringProperty("avatar").notNull();
    groupInfo.addIntProperty("creatorId").notNull();
    groupInfo.addIntProperty("userCnt").notNull();

    groupInfo.addStringProperty("userList").notNull();
    groupInfo.addIntProperty("version").notNull();
    groupInfo.addIntProperty("status").notNull();
    groupInfo.addIntProperty("created").notNull();
    groupInfo.addIntProperty("updated").notNull();

    groupInfo.setHasKeepSections(true);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:23,代码来源:GreenDaoGenerator.java

示例3: addSessionInfo

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addSessionInfo(Schema schema){
    Entity sessionInfo = schema.addEntity("SessionEntity");
    sessionInfo.setTableName("Session");
    sessionInfo.setClassNameDao("SessionDao");
    sessionInfo.setJavaPackage(entityPath);

    //point to userId/groupId need sessionType 区分
    sessionInfo.addIdProperty().autoincrement();
    sessionInfo.addStringProperty("sessionKey").unique().notNull(); //.unique()
    sessionInfo.addIntProperty("peerId").notNull();
    sessionInfo.addIntProperty("peerType").notNull();

    sessionInfo.addIntProperty("latestMsgType").notNull();
    sessionInfo.addIntProperty("latestMsgId").notNull();
    sessionInfo.addStringProperty("latestMsgData").notNull();

    sessionInfo.addIntProperty("talkId").notNull();
    sessionInfo.addIntProperty("created").notNull();
    sessionInfo.addIntProperty("updated").notNull();

    sessionInfo.setHasKeepSections(true);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:23,代码来源:GreenDaoGenerator.java

示例4: addAccountTable

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addAccountTable(Schema schema) {

        Entity table = schema.addEntity("Green_AccountBean");
        table.setHasKeepSections(true);
        table.setTableName(AccountTable.ACCOUNT_TABLE);
        table.implementsSerializable();

        table.addLongProperty(AccountTable.UID).primaryKey();
        table.addStringProperty(AccountTable.USER_NAME);
        table.addStringProperty(AccountTable.USER_PWD);
        table.addStringProperty(AccountTable.COOKIE);
        table.addStringProperty(AccountTable.OAUTH_TOKEN);
        table.addLongProperty(AccountTable.OAUTH_TOKEN_EXPIRES_TIME);
        table.addStringProperty(AccountTable.ACCESS_TOKEN_HACK);
        table.addLongProperty(AccountTable.ACCESS_TOKEN_HACK_EXPIRES_TIME);
        table.addStringProperty(AccountTable.G_SID);
        table.addIntProperty(AccountTable.NAVIGATION_POSITION);
        table.addStringProperty(AccountTable.USER_INFO_JSON);
    }
 
开发者ID:andforce,项目名称:iBeebo,代码行数:20,代码来源:GreenDaoGen.java

示例5: addUserInfo

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addUserInfo(Schema schema) {
    Entity userInfo = schema.addEntity("UserEntity");
    userInfo.setTableName("UserInfo");
    userInfo.setClassNameDao("UserDao");
    userInfo.setJavaPackage(entityPath);

    userInfo.addIdProperty().autoincrement();
    userInfo.addIntProperty("peerId").unique().notNull().index();
    userInfo.addIntProperty("gender").notNull();
    userInfo.addStringProperty("mainName").notNull();
    // 这个可以自动生成pinyin
    userInfo.addStringProperty("pinyinName").notNull();
    userInfo.addStringProperty("realName").notNull();
    userInfo.addStringProperty("avatar").notNull();
    userInfo.addStringProperty("phone").notNull();
    userInfo.addStringProperty("email").notNull();
    userInfo.addIntProperty("departmentId").notNull();

    userInfo.addIntProperty("status").notNull();
    userInfo.addIntProperty("created").notNull();
    userInfo.addIntProperty("updated").notNull();

    userInfo.setHasKeepSections(true);

    //todo 索引还没有设定
    // 一对一 addToOne 的使用
    // 支持protobuf
    // schema.addProtobufEntity();
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:30,代码来源:GreenDaoGenerator.java

示例6: createUserEntity

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static Entity createUserEntity(Schema schema) {
    Entity user = schema.addEntity("User");
    user.addIdProperty();
    user.addStringProperty("name").notNull();
    user.addStringProperty("avatar").notNull();
    user.setHasKeepSections(true);

    return user;
}
 
开发者ID:Kamshak,项目名称:BrainPhaser,代码行数:10,代码来源:BrainphaserDaoGenerator.java

示例7: addMsg

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
/**
 * Msg
 *
 * @param schema
 */
private static void addMsg(Schema schema) {
    Entity entity = schema.addEntity("Msg");
    entity.implementsSerializable();
    entity.setHasKeepSections(true);
    entity.addLongProperty("id").primaryKey();
    entity.addStringProperty("title");
    entity.addStringProperty("user");
    entity.addStringProperty("content");
}
 
开发者ID:ourbeehive,项目名称:AndPlug,代码行数:15,代码来源:AppDaoGen.java

示例8: addAtUsersTable

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addAtUsersTable(Schema schema) {

        Entity table = schema.addEntity("Green_AtUsersBean");
        table.setHasKeepSections(true);
        table.setTableName(AtUsersTable.TABLE_NAME);
        table.implementsSerializable();

        table.addStringProperty(AtUsersTable.ACCOUNTID);
        table.addStringProperty(AtUsersTable.AT_USERID);
        table.addStringProperty(AtUsersTable.AT_USER_INFO_JSON);
    }
 
开发者ID:andforce,项目名称:iBeebo,代码行数:12,代码来源:GreenDaoGen.java

示例9: addStatusTable

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addStatusTable(Schema schema) {

        Entity table = schema.addEntity("Green_TimeLineStatus");
        table.setHasKeepSections(true);
        table.setTableName(TimeLineStatusTable.TABLE_NAME);
        table.implementsSerializable();

        table.addIntProperty(TimeLineStatusTable.ID);
        table.addStringProperty(TimeLineStatusTable.ACCOUNTID);
        table.addStringProperty(TimeLineStatusTable.MBLOGID);
        table.addStringProperty(TimeLineStatusTable.JSONDATA);

    }
 
开发者ID:andforce,项目名称:iBeebo,代码行数:14,代码来源:GreenDaoGen.java

示例10: addNote

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addNote(Schema schema) {
    Entity note = schema.addEntity("Brand");
    note.addIdProperty();
    note.addStringProperty("brandName").notNull();
    note.addStringProperty("brandId").notNull();
    note.addDateProperty("brandImageUri");
    note.addStringProperty("brandInfos");
    note.setHasKeepSections(true);
    note.setSkipGeneration(true);
}
 
开发者ID:cymcsg,项目名称:UltimateAndroid,代码行数:11,代码来源:DbDaoGenerator.java

示例11: generateBellesDao

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void generateBellesDao(Schema schema) {
    Entity entity = schema.addEntity("LocalBelle");
    entity.addLongProperty("id").notNull();
    entity.addLongProperty("time").notNull();
    entity.addIntProperty("type").notNull();
    entity.addStringProperty("url").notNull();
    entity.setHasKeepSections(true);
}
 
开发者ID:zhangdi0917,项目名称:SexyBelle,代码行数:9,代码来源:Main.java

示例12: generateSeries

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void generateSeries(Schema schema) {
    Entity entity = schema.addEntity("Series");
    entity.addIntProperty("type").notNull();
    entity.addStringProperty("title").notNull();
    entity.setHasKeepSections(true);
    entity.implementsSerializable();
}
 
开发者ID:zhangdi0917,项目名称:SexyBelle,代码行数:8,代码来源:Main.java

示例13: createSqliteMaster

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
protected void createSqliteMaster() {
    Entity entity = schema.addEntity("SqliteMaster");
    entity.setSkipTableCreation(true);
    entity.setHasKeepSections(true);
    entity.addStringProperty("type");
    entity.addStringProperty("name");
    entity.addStringProperty("tableName").columnName("tbl_name");
    entity.addLongProperty("rootpage");
    entity.addStringProperty("sql");
}
 
开发者ID:itsmechlark,项目名称:greendao-cipher,代码行数:11,代码来源:TestDaoGenerator.java

示例14: generateCollectedBelle

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void generateCollectedBelle(Schema schema) {
    Entity entity = schema.addEntity("CollectedBelle");
    entity.addStringProperty("url").notNull().primaryKey();
    entity.addLongProperty("time").notNull();
    entity.setHasKeepSections(true);
}
 
开发者ID:zhangdi0917,项目名称:SexyBelle,代码行数:7,代码来源:Main.java


注:本文中的de.greenrobot.daogenerator.Entity.setHasKeepSections方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。