本文整理了Java中de.greenrobot.daogenerator.Entity.addStringProperty()
方法的一些代码示例,展示了Entity.addStringProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.addStringProperty()
方法的具体详情如下:
包路径:de.greenrobot.daogenerator.Entity
类名称:Entity
方法名:addStringProperty
暂无
代码示例来源: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: 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: 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 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 addDownloadLabel(Schema schema) {
Entity entity = schema.addEntity("DownloadLabel");
entity.setTableName("DOWNLOAD_LABELS");
entity.setClassNameDao("DownloadLabelDao");
entity.addIdProperty();
entity.addStringProperty("label");
entity.addLongProperty("time").notNull();
}
代码示例来源:origin: seven332/EhViewer
private static void addDownloadDirname(Schema schema) {
Entity entity = schema.addEntity("DownloadDirname");
entity.setTableName("DOWNLOAD_DIRNAME");
entity.setClassNameDao("DownloadDirnameDao");
entity.addLongProperty("gid").primaryKey().notNull();
entity.addStringProperty("dirname");
}
代码示例来源: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.addStringProperty("newsChannelName").notNull().primaryKey().index();
entity.addStringProperty("newsChannelId").notNull();
entity.addStringProperty("newsChannelType").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 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: ghbhaha/MyWeather
private static void addUseArea(Schema schema) {
Entity weekForeCast = schema.addEntity("UseArea");
weekForeCast.addStringProperty("areaid");
weekForeCast.addStringProperty("areaid2345");
weekForeCast.addStringProperty("areaName");
weekForeCast.addBooleanProperty("main");
}
代码示例来源:origin: mickyliu945/CommonProj
private static void addPlace(Schema schema) {
Entity card = schema.addEntity("Place");
card.addIdProperty().primaryKey();
card.addStringProperty("label");
card.addStringProperty("name");
card.addStringProperty("pinyin");
card.addStringProperty("province");
}
}
代码示例来源:origin: devinhu/androidone
/**
* @param schema
*/
private static void addNote(Schema schema) {
Entity note = schema.addEntity("Friend");
note.addStringProperty("userId").notNull().primaryKey();
note.addStringProperty("name");
note.addStringProperty("portraitUri");
}
代码示例来源:origin: devinhu/androidone
/**
* @param schema
*/
private static void addFriend(Schema schema) {
Entity note = schema.addEntity("Friend");
note.addStringProperty("userId").notNull().primaryKey();
note.addStringProperty("name");
note.addStringProperty("portraitUri");
}
代码示例来源:origin: devinhu/androidone
/**
* 客户表
* @param schema
*/
private static void addCustomer(Schema schema) {
Entity note = schema.addEntity("Customer");
note.addIdProperty().autoincrement().primaryKey();
note.addStringProperty("name");
note.addStringProperty("phone");
note.addStringProperty("cretetime");
}
代码示例来源:origin: andforce/iBeebo
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);
}
代码示例来源: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: 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");
}
代码示例来源:origin: mickyliu945/CommonProj
private static void addUser(Schema schema) {
Entity user = schema.addEntity("IpInfo");
user.addIdProperty().primaryKey();
user.addStringProperty("country");
user.addDoubleProperty("country_id");
user.addDoubleProperty("area");
user.addDoubleProperty("area_id");
user.addDoubleProperty("ip");
}
内容来源于网络,如有侵权,请联系作者删除!