Java Code Examples for de.greenrobot.daogenerator.Entity#setSuperclass()

The following examples show how to use de.greenrobot.daogenerator.Entity#setSuperclass() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EhDaoGenerator.java    From MHViewer with Apache License 2.0 6 votes vote down vote up
private static void addDownloads(Schema schema) {
    Entity entity = schema.addEntity("DownloadInfo");
    entity.setTableName("DOWNLOADS");
    entity.setClassNameDao("DownloadsDao");
    entity.setSuperclass("GalleryInfo");
    // GalleryInfo data
    entity.addStringProperty("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");
}
 
Example 2
Source File: EhDaoGenerator.java    From MHViewer with Apache License 2.0 6 votes vote down vote up
private static void addHistoryInfo(Schema schema) {
    Entity entity = schema.addEntity("HistoryInfo");
    entity.setTableName("HISTORY");
    entity.setClassNameDao("HistoryDao");
    entity.setSuperclass("GalleryInfo");
    // GalleryInfo data
    entity.addStringProperty("gid").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();
    entity.addStringProperty("id").primaryKey().notNull();
}
 
Example 3
Source File: EhDaoGenerator.java    From MHViewer with Apache License 2.0 6 votes vote down vote up
private static void addLocalFavorites(Schema schema) {
    Entity entity = schema.addEntity("LocalFavoriteInfo");
    entity.setTableName("LOCAL_FAVORITES");
    entity.setClassNameDao("LocalFavoritesDao");
    entity.setSuperclass("GalleryInfo");
    // GalleryInfo data
    entity.addStringProperty("gid").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();
    entity.addStringProperty("id").primaryKey().notNull();
}
 
Example 4
Source File: EhDaoGenerator.java    From MHViewer with Apache License 2.0 6 votes vote down vote up
private static void addBookmarks(Schema schema) {
    Entity entity = schema.addEntity("BookmarkInfo");
    entity.setTableName("BOOKMARKS");
    entity.setClassNameDao("BookmarksBao");
    entity.setSuperclass("GalleryInfo");
    // GalleryInfo data
    entity.addStringProperty("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();
}
 
Example 5
Source File: EhDaoGenerator.java    From EhViewer with Apache License 2.0 6 votes vote down vote up
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");
}
 
Example 6
Source File: EhDaoGenerator.java    From EhViewer with Apache License 2.0 6 votes vote down vote up
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();
}
 
Example 7
Source File: EhDaoGenerator.java    From EhViewer with Apache License 2.0 6 votes vote down vote up
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();
}
 
Example 8
Source File: EhDaoGenerator.java    From EhViewer with Apache License 2.0 6 votes vote down vote up
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();
}