本文整理了Java中de.greenrobot.daogenerator.Entity.setTableName()
方法的一些代码示例,展示了Entity.setTableName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.setTableName()
方法的具体详情如下:
包路径:de.greenrobot.daogenerator.Entity
类名称:Entity
方法名:setTableName
暂无
代码示例来源: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 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: 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: 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: 736008081/frameAndroid
private static void generateProductEntity(Schema schema) {
Entity product = schema.addEntity("ProductTable");
product.setClassNameDao("ProductDao");
product.setTableName("ProductTable");
// product.setHasKeepSections(true);
product.addIdProperty().primaryKey();
product.addStringProperty(PRODUCTNAME);
product.addStringProperty(UPDATETIME);
}
}
代码示例来源: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: 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);
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!