de.greenrobot.daogenerator.Entity.addIntProperty()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(11.0k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中de.greenrobot.daogenerator.Entity.addIntProperty()方法的一些代码示例,展示了Entity.addIntProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.addIntProperty()方法的具体详情如下:
包路径:de.greenrobot.daogenerator.Entity
类名称:Entity
方法名:addIntProperty

Entity.addIntProperty介绍

暂无

代码示例

代码示例来源:origin: seven332/EhViewer

private static void addQuickSearch(Schema schema) {
  Entity entity = schema.addEntity("QuickSearch");
  entity.setTableName("QUICK_SEARCH");
  entity.setClassNameDao("QuickSearchDao");
  entity.addIdProperty();
  entity.addStringProperty("name");
  entity.addIntProperty("mode").notNull();
  entity.addIntProperty("category").notNull();
  entity.addStringProperty("keyword");
  entity.addIntProperty("advanceSearch").notNull();
  entity.addIntProperty("minRating").notNull();
  entity.addLongProperty("time").notNull();
}

代码示例来源:origin: seven332/EhViewer

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");
  entity.addBooleanProperty("enable");
}

代码示例来源:origin: seven332/EhViewer

private static void addDownloads(Schema schema) {
  Entity entity = schema.addEntity("DownloadInfo");
  entity.setTableName("DOWNLOADS");
  entity.setClassNameDao("DownloadsDao");
  entity.setSuperclass("GalleryInfo");
  // GalleryInfo data
  entity.addLongProperty("gid").primaryKey().notNull();
  entity.addStringProperty("token");
  entity.addStringProperty("title");
  entity.addStringProperty("titleJpn");
  entity.addStringProperty("thumb");
  entity.addIntProperty("category").notNull();
  entity.addStringProperty("posted");
  entity.addStringProperty("uploader");
  entity.addFloatProperty("rating").notNull();
  entity.addStringProperty("simpleLanguage");
  // DownloadInfo data
  entity.addIntProperty("state").notNull();
  entity.addIntProperty("legacy").notNull();
  entity.addLongProperty("time").notNull();
  entity.addStringProperty("label");
}

代码示例来源:origin: seven332/EhViewer

private static void addHistoryInfo(Schema schema) {
  Entity entity = schema.addEntity("HistoryInfo");
  entity.setTableName("HISTORY");
  entity.setClassNameDao("HistoryDao");
  entity.setSuperclass("GalleryInfo");
  // GalleryInfo data
  entity.addLongProperty("gid").primaryKey().notNull();
  entity.addStringProperty("token");
  entity.addStringProperty("title");
  entity.addStringProperty("titleJpn");
  entity.addStringProperty("thumb");
  entity.addIntProperty("category").notNull();
  entity.addStringProperty("posted");
  entity.addStringProperty("uploader");
  entity.addFloatProperty("rating").notNull();
  entity.addStringProperty("simpleLanguage");
  // HistoryInfo data
  entity.addIntProperty("mode").notNull();
  entity.addLongProperty("time").notNull();
}

代码示例来源:origin: seven332/EhViewer

private static void addBookmarks(Schema schema) {
  Entity entity = schema.addEntity("BookmarkInfo");
  entity.setTableName("BOOKMARKS");
  entity.setClassNameDao("BookmarksBao");
  entity.setSuperclass("GalleryInfo");
  // GalleryInfo data
  entity.addLongProperty("gid").primaryKey().notNull();
  entity.addStringProperty("token");
  entity.addStringProperty("title");
  entity.addStringProperty("titleJpn");
  entity.addStringProperty("thumb");
  entity.addIntProperty("category").notNull();
  entity.addStringProperty("posted");
  entity.addStringProperty("uploader");
  entity.addFloatProperty("rating").notNull();
  entity.addStringProperty("simpleLanguage");
  // Bookmark data
  entity.addIntProperty("page").notNull();
  entity.addLongProperty("time").notNull();
}

代码示例来源:origin: oubowu/OuNews

private static void addTable(Schema schema) {
  Entity note = schema.addEntity("NewsChannelTable");
  //        note.addIdProperty();
  /**
   * 频道名称
   */
  note.addStringProperty("newsChannelName").notNull().primaryKey().index();
  /**
   * 频道id
   */
  note.addStringProperty("newsChannelId").notNull();
  /**
   * 频道类型
   */
  note.addStringProperty("newsChannelType").notNull();
  /**
   * 选中的频道
   */
  note.addBooleanProperty("newsChannelSelect").notNull();
  /**
   * 频道的排序位置
   */
  note.addIntProperty("newsChannelIndex").notNull();
  /**
   * 频道是否是固定的
   */
  note.addBooleanProperty("newsChannelFixed");
}

代码示例来源:origin: kaku2015/ColorfulNews

entity.addIntProperty("newsChannelIndex").notNull();

代码示例来源:origin: seven332/EhViewer

private static void addLocalFavorites(Schema schema) {
  Entity entity = schema.addEntity("LocalFavoriteInfo");
  entity.setTableName("LOCAL_FAVORITES");
  entity.setClassNameDao("LocalFavoritesDao");
  entity.setSuperclass("GalleryInfo");
  // GalleryInfo data
  entity.addLongProperty("gid").primaryKey().notNull();
  entity.addStringProperty("token");
  entity.addStringProperty("title");
  entity.addStringProperty("titleJpn");
  entity.addStringProperty("thumb");
  entity.addIntProperty("category").notNull();
  entity.addStringProperty("posted");
  entity.addStringProperty("uploader");
  entity.addFloatProperty("rating").notNull();
  entity.addStringProperty("simpleLanguage");
  // LocalFavoriteInfo data
  entity.addLongProperty("time").notNull();
}

代码示例来源:origin: ghbhaha/MyWeather

private static void addAqi(Schema schema) {
  Entity weekForeCast = schema.addEntity("Aqi");
  weekForeCast.addStringProperty("areaid");
  weekForeCast.addIntProperty("aqi");
  weekForeCast.addStringProperty("quality");
  weekForeCast.addIntProperty("pm2_5");
  weekForeCast.addIntProperty("pm10");
  weekForeCast.addIntProperty("so2");
  weekForeCast.addIntProperty("no2");
}

代码示例来源:origin: ghbhaha/MyWeather

private static void addForeCast(Schema schema) {
  Entity weekForeCast = schema.addEntity("WeekForeCast");
  weekForeCast.addStringProperty("areaid");
  weekForeCast.addDateProperty("weatherDate");
  weekForeCast.addStringProperty("weatherConditionStart");
  weekForeCast.addStringProperty("weatherConditionEnd");
  weekForeCast.addIntProperty("tempH");
  weekForeCast.addIntProperty("tempL");
  weekForeCast.addStringProperty("fx");
  weekForeCast.addStringProperty("fj");
  weekForeCast.addIntProperty("rainPerCent");
}

代码示例来源:origin: devinhu/androidone

/**
   * 订单表
   * @param schema
   */
  private static void addOrder(Schema schema) {
    Entity note = schema.addEntity("Order");
    note.addIdProperty().autoincrement().primaryKey();
    note.addIntProperty("cid");
    note.addStringProperty("name");
    note.addIntProperty("price");
    note.addIntProperty("finalPrice");
    note.addStringProperty("status");
    note.addStringProperty("cretetime");
  }
}

代码示例来源:origin: ddnosh/AndroidQuick

private static void addUser(Schema schema){
 Entity user = schema.addEntity("User");
 user.addIdProperty();
 user.addStringProperty("name");
 user.addIntProperty("age");
}

代码示例来源:origin: ghbhaha/MyWeather

private static void addHourForeCast(Schema schema) {
  Entity weekForeCast = schema.addEntity("HourForeCast");
  weekForeCast.addStringProperty("areaid");
  weekForeCast.addStringProperty("hour");
  weekForeCast.addStringProperty("weatherCondition");
  weekForeCast.addIntProperty("temp");
}

代码示例来源:origin: WellerV/SweetMusicPlayer

public static void addArtistInfo(Schema schema){
    Entity entity=schema.addEntity("ArtistInfo");
    entity.addLongProperty("artistId").primaryKey();
    entity.addStringProperty("artist");  //歌手名
    entity.addIntProperty("numSongs");
  }
}

代码示例来源:origin: baiiu/ZhihuDaily

private static void addStory(Schema schema) {
 Entity savedStory = schema.addEntity("SavedStory");
 savedStory.addIdProperty();
 savedStory.addStringProperty("image");
 savedStory.addStringProperty("title");
 savedStory.addStringProperty("date");
 savedStory.addIntProperty("position");
}

代码示例来源:origin: WellerV/SweetMusicPlayer

public static void addAlbumInfo(Schema schema){
  Entity entity=schema.addEntity("AlbumInfo");
  entity.addLongProperty("albumId").primaryKey();
  entity.addStringProperty("title");  //专辑名
  entity.addStringProperty("artist");
  entity.addIntProperty("numSongs");
  entity.addStringProperty("albumArt");   //封面地址
}

代码示例来源:origin: andforce/iBeebo

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);
}

代码示例来源:origin: xiehui999/fuseProgram

private static void addPerson(Schema schema) {
  Entity person=schema.addEntity("Person");
  //person.setHasKeepSections(true); // 此实体类不会覆盖自定义的代码
  person.addIdProperty().primaryKey();
  person.addStringProperty("name").notNull();//约束此属性不可为空
  //entity.addStringProperty("abstract").codeBeforeField("@SerializableName(_abstract)"); //当变量是java关键字时使用此序列化
  person.addIntProperty("age").columnName("_age");//实体属性名age,数据库列表_age
  //person.implementsSerializable();//序列化
  //person.implementsInterface();//实现接口
  //person.getSuperclass();//继承类
  //Property personProperty = person.addLongProperty("cardId").getProperty();
  //person.addToOne(idCard, personProperty);//一对一
  // 第一个参数为目标实体,第二个参数为目标属性,也就是 person 的主键(order 的外键),第三个参数为属性名
  //person.addToMany(order, orderProperty, "orders");//一对多
}

代码示例来源:origin: devinhu/androidone

/**
 * 产品库表
 * @param schema
 */
private static void addProduct(Schema schema) {
  Entity note = schema.addEntity("Product");
  note.addIdProperty().autoincrement().primaryKey();
  note.addStringProperty("porductName");
  note.addIntProperty("basePrice");
  note.addStringProperty("image");
  note.addStringProperty("desc");
  note.addStringProperty("cretetime");
}

代码示例来源:origin: WellerV/SweetMusicPlayer

public static void addMusicInfo(Schema schema) {
  Entity entity = schema.addEntity("MusicInfo");
  entity.addLongProperty("songId").primaryKey();
  entity.addLongProperty("albumId");
  entity.addLongProperty("artistId");
  entity.addStringProperty("title");
  entity.addStringProperty("artist");
  entity.addIntProperty("duration");
  entity.addStringProperty("path");
  entity.addBooleanProperty("favorite");
}

相关文章