Java Code Examples for de.greenrobot.daogenerator.Entity#addBooleanProperty()

The following examples show how to use de.greenrobot.daogenerator.Entity#addBooleanProperty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GreenDaoGenerator.java    From DMusic with Apache License 2.0 6 votes vote down vote up
/**
 * 添加公共字段
 */
private static void addProperty(Entity entity) {
    entity.addStringProperty("id").primaryKey(); // 文件完整路径---主键

    entity.addIntProperty("type"); // 类型:本地、百度、网易、QQ等
    entity.addIntProperty("seq"); // 自定义序号
    entity.addStringProperty("songId"); // 歌曲ID
    entity.addStringProperty("songName"); // 歌曲名
    entity.addStringProperty("songUrl"); // 歌曲url
    entity.addStringProperty("artistId"); // 艺术家ID
    entity.addStringProperty("artistName"); // 歌手名
    entity.addStringProperty("albumId"); // 专辑ID
    entity.addStringProperty("albumName"); // 专辑
    entity.addStringProperty("albumUrl"); // 专辑url
    entity.addStringProperty("lrcName"); // 歌词名称
    entity.addStringProperty("lrcUrl"); // 歌词路径

    entity.addLongProperty("fileDuration"); // 歌曲时长
    entity.addLongProperty("fileSize"); // 文件大小
    entity.addStringProperty("filePostfix"); // 文件后缀类型
    entity.addStringProperty("fileFolder"); // 父文件夹绝对路径

    entity.addBooleanProperty("isCollected"); // 是否收藏
    entity.addLongProperty("timeStamp"); // 时间戳,插入时间
}
 
Example 2
Source File: HttpCookieDaoGenerator.java    From Nimingban with Apache License 2.0 6 votes vote down vote up
private static void addHttpCookie(Schema schema) {
    Entity entity = schema.addEntity("HttpCookieRaw");
    entity.setTableName("HTTP_COOKIE");
    entity.setClassNameDao("HttpCookieDao");
    entity.addIdProperty();
    entity.addStringProperty("name");
    entity.addStringProperty("value");
    entity.addStringProperty("comment");
    entity.addStringProperty("commentURL");
    entity.addBooleanProperty("discard");
    entity.addStringProperty("domain");
    entity.addLongProperty("maxAge");
    entity.addStringProperty("path");
    entity.addStringProperty("portList");
    entity.addBooleanProperty("secure");
    entity.addIntProperty("version");
    entity.addStringProperty("url");
    entity.addLongProperty("whenCreated");
}
 
Example 3
Source File: NMBDaoGenerator.java    From Nimingban with Apache License 2.0 6 votes vote down vote up
private static void addACForum(Schema schema) {
    Entity entity = schema.addEntity("ACForumRaw");
    entity.setTableName("AC_FORUM");
    entity.setClassNameDao("ACForumDao");
    entity.addIdProperty();
    entity.addStringProperty("forumid");
    entity.addStringProperty("displayname");
    entity.addIntProperty("priority");
    entity.addBooleanProperty("visibility");

    // @since 4
    entity.addStringProperty("msg");

    // @since 5
    entity.addBooleanProperty("official");

    // @since 6
    entity.addIntProperty("frequency");
}
 
Example 4
Source File: EhDaoGenerator.java    From MHViewer with Apache License 2.0 5 votes vote down vote up
private static void addFilter(Schema schema) {
    Entity entity = schema.addEntity("Filter");
    entity.setTableName("FILTER");
    entity.setClassNameDao("FilterDao");
    entity.addIdProperty();
    entity.addIntProperty("mode").notNull();
    entity.addStringProperty("text");
    // Since 3
    entity.addBooleanProperty("enable");
}
 
Example 5
Source File: GreenDaoGenerator.java    From DMusic with Apache License 2.0 5 votes vote down vote up
/**
 * TransferModel - 传输
 */
private static void addTransferModel(Schema schema) {
    Entity entity = schema.addEntity("TransferModel"); // 表名
    entity.addStringProperty("transferId").primaryKey(); // 文件完整路径---主键
    entity.addIntProperty("transferType");
    entity.addIntProperty("transferState");
    entity.addLongProperty("transferCurrentLength");
    entity.addLongProperty("transferTotalLength");

    entity.addStringProperty("id"); // 文件完整路径

    entity.addIntProperty("type"); // 类型:本地、百度、网易、QQ等
    entity.addIntProperty("seq"); // 自定义序号
    entity.addStringProperty("songId"); // 歌曲ID
    entity.addStringProperty("songName"); // 歌曲名
    entity.addStringProperty("songUrl"); // 歌曲url
    entity.addStringProperty("artistId"); // 艺术家ID
    entity.addStringProperty("artistName"); // 歌手名
    entity.addStringProperty("albumId"); // 专辑ID
    entity.addStringProperty("albumName"); // 专辑
    entity.addStringProperty("albumUrl"); // 专辑url
    entity.addStringProperty("lrcName"); // 歌词名称
    entity.addStringProperty("lrcUrl"); // 歌词路径

    entity.addLongProperty("fileDuration"); // 歌曲时长
    entity.addLongProperty("fileSize"); // 文件大小
    entity.addStringProperty("filePostfix"); // 文件后缀类型
    entity.addStringProperty("fileFolder"); // 父文件夹绝对路径

    entity.addBooleanProperty("isCollected"); // 是否收藏
    entity.addLongProperty("timeStamp"); // 时间戳,插入时间
}
 
Example 6
Source File: BrainphaserDaoGenerator.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
public static Entity createAnswerEntity(Schema schema) {
    Entity answer = schema.addEntity("Answer");
    answer.addIdProperty();
    answer.addStringProperty("text").notNull();
    answer.addBooleanProperty("answerCorrect");

    return answer;
}
 
Example 7
Source File: BrainphaserDaoGenerator.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
public static Entity createStatisticsEntity(Schema schema) {
    Entity completed = schema.addEntity("Statistics");
    completed.addIdProperty();
    completed.addBooleanProperty("succeeded");
    completed.addDateProperty("time");

    return completed;
}
 
Example 8
Source File: GreenDaoGenerator.java    From Dota2Helper with Apache License 2.0 5 votes vote down vote up
public static void addHistoryVideo(Schema schema) {
    Entity video = schema.addEntity("GreenWatchedVideo");
    video.addStringProperty("videoyoukuvid").primaryKey();
    video.addStringProperty("videobackground");
    video.addStringProperty("videotitle");
    video.addLongProperty("videowatchtime");
    video.addIntProperty("videoduration");
    video.addIntProperty("videoplaytime");
    video.addBooleanProperty("videoEnded");
}
 
Example 9
Source File: MyDaoGenerator.java    From MyWeather with Apache License 2.0 5 votes vote down vote up
private static void addUseArea(Schema schema) {
    Entity weekForeCast = schema.addEntity("UseArea");
    weekForeCast.addStringProperty("areaid");
    weekForeCast.addStringProperty("areaid2345");
    weekForeCast.addStringProperty("areaName");
    weekForeCast.addBooleanProperty("main");
}
 
Example 10
Source File: EhDaoGenerator.java    From EhViewer with Apache License 2.0 5 votes vote down vote up
private static void addFilter(Schema schema) {
    Entity entity = schema.addEntity("Filter");
    entity.setTableName("FILTER");
    entity.setClassNameDao("FilterDao");
    entity.addIdProperty();
    entity.addIntProperty("mode").notNull();
    entity.addStringProperty("text");
    // Since 3
    entity.addBooleanProperty("enable");
}