本文整理了Java中de.greenrobot.daogenerator.Entity.addLongProperty()
方法的一些代码示例,展示了Entity.addLongProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.addLongProperty()
方法的具体详情如下:
包路径:de.greenrobot.daogenerator.Entity
类名称:Entity
方法名:addLongProperty
暂无
代码示例来源: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: 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 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: 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 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: de.greenrobot/greendao-generator
/** Adds a standard _id column required by standard Android classes, e.g. list adapters. */
public PropertyBuilder addIdProperty() {
PropertyBuilder builder = addLongProperty("id");
builder.columnName("_id").primaryKey();
return builder;
}
代码示例来源:origin: yangblocker/GreenDao-SQLCipher
/** Adds a standard _id column required by standard Android classes, e.g. list adapters. */
public PropertyBuilder addIdProperty() {
PropertyBuilder builder = addLongProperty("id");
builder.columnName("_id").primaryKey();
return builder;
}
代码示例来源: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: WellerV/SweetMusicPlayer
public static void addArtistInfo(Schema schema){
Entity entity=schema.addEntity("ArtistInfo");
entity.addLongProperty("artistId").primaryKey();
entity.addStringProperty("artist"); //歌手名
entity.addIntProperty("numSongs");
}
}
代码示例来源:origin: andforce/iBeebo
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);
}
代码示例来源:origin: huntermr/FastAndroid-Android
private static void initUserBean(Schema schema) {
Entity userBean = schema.addEntity("User");// ����
//userBean.setTableName("user"); // ���ԶԱ�������
userBean.addLongProperty("id").primaryKey().index();// ��������
userBean.addStringProperty("name");
userBean.addStringProperty("password");
userBean.addStringProperty("nickname");
}
}
代码示例来源: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: Raizlabs/AndroidDatabaseLibraryComparison
static Entity getAddressItemEntity(Schema schema, String name) {
Entity simpleAddressItem = schema.addEntity(name);
simpleAddressItem.addIdProperty();
simpleAddressItem.addStringProperty("name");
simpleAddressItem.addStringProperty("address");
simpleAddressItem.addStringProperty("city");
simpleAddressItem.addStringProperty("state");
simpleAddressItem.addLongProperty("phone");
return simpleAddressItem;
}
代码示例来源:origin: FussenYu/MVP_Project
user.addLongProperty("userID").primaryKey();
userSport.addLongProperty("sportID").primaryKey();
Property userProperty = user.addLongProperty("sportID").getProperty();
Property sportProperty = userSport.addLongProperty("userID").getProperty();
userSport.addToOne(user, sportProperty);
代码示例来源:origin: devinhu/androidone
/**
* @param schema
*/
private static void addChannelItem(Schema schema) {
Entity note = schema.addEntity("ChannelItem");
note.addLongProperty("id").notNull().primaryKey();
note.addStringProperty("name");
note.addIntProperty("channel");
note.addIntProperty("orderId");
note.addIntProperty("selected");
note.addStringProperty("type");
note.addStringProperty("link");
note.addStringProperty("imgSource");
note.addBooleanProperty("downloadCnt");
note.addBooleanProperty("isSelected");
note.addBooleanProperty("isAttention");
}
代码示例来源:origin: devinhu/androidone
@SuppressWarnings("unused")
private static void addCustomerOrder(Schema schema) {
Entity customer = schema.addEntity("Customer");
customer.addIdProperty();
customer.addStringProperty("name").notNull();
Entity order = schema.addEntity("Order");
order.setTableName("ORDERS"); // "ORDER" is a reserved keyword
order.addIdProperty();
Property orderDate = order.addDateProperty("date").getProperty();
Property customerId = order.addLongProperty("customerId").notNull().getProperty();
order.addToOne(customer, customerId);
ToMany customerToOrders = customer.addToMany(order, customerId);
customerToOrders.setName("orders");
customerToOrders.orderAsc(orderDate);
}
代码示例来源:origin: yangblocker/GreenDao-SQLCipher
private static void addCustomerOrder(Schema schema) {
Entity customer = schema.addEntity("Customer");
customer.addIdProperty();
customer.addStringProperty("name").notNull();
Entity order = schema.addEntity("Order");
order.setTableName("ORDERS"); // "ORDER" is a reserved keyword
order.addIdProperty();
Property orderDate = order.addDateProperty("date").getProperty();
Property customerId = order.addLongProperty("customerId").notNull().getProperty();
order.addToOne(customer, customerId);
ToMany customerToOrders = customer.addToMany(order, customerId);
customerToOrders.setName("orders");
customerToOrders.orderAsc(orderDate);
}
内容来源于网络,如有侵权,请联系作者删除!