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(); }
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"); }
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"); }
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(); }
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(); }
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(); }
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(); }
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"); }
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); }
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); } }
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); }
@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); }
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); }
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); }