當前位置: 首頁>>代碼示例>>Java>>正文


Java Entity.setClassNameDao方法代碼示例

本文整理匯總了Java中de.greenrobot.daogenerator.Entity.setClassNameDao方法的典型用法代碼示例。如果您正苦於以下問題:Java Entity.setClassNameDao方法的具體用法?Java Entity.setClassNameDao怎麽用?Java Entity.setClassNameDao使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在de.greenrobot.daogenerator.Entity的用法示例。


在下文中一共展示了Entity.setClassNameDao方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addDepartment

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addDepartment(Schema schema){
    Entity department = schema.addEntity("DepartmentEntity");
    department.setTableName("Department");
    department.setClassNameDao("DepartmentDao");
    department.setJavaPackage(entityPath);

    department.addIdProperty().autoincrement();
    department.addIntProperty("departId").unique().notNull().index();
    department.addStringProperty("departName").unique().notNull().index();
    department.addIntProperty("priority").notNull();
    department.addIntProperty("status").notNull();

    department.addIntProperty("created").notNull();
    department.addIntProperty("updated").notNull();

    department.setHasKeepSections(true);
}
 
開發者ID:ccfish86,項目名稱:sctalk,代碼行數:18,代碼來源:GreenDaoGenerator.java

示例2: addGroupInfo

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addGroupInfo(Schema schema) {
    Entity groupInfo = schema.addEntity("GroupEntity");
    groupInfo.setTableName("GroupInfo");
    groupInfo.setClassNameDao("GroupDao");
    groupInfo.setJavaPackage(entityPath);

    groupInfo.addIdProperty().autoincrement();
    groupInfo.addIntProperty("peerId").unique().notNull();
    groupInfo.addIntProperty("groupType").notNull();
    groupInfo.addStringProperty("mainName").notNull();
    groupInfo.addStringProperty("avatar").notNull();
    groupInfo.addIntProperty("creatorId").notNull();
    groupInfo.addIntProperty("userCnt").notNull();

    groupInfo.addStringProperty("userList").notNull();
    groupInfo.addIntProperty("version").notNull();
    groupInfo.addIntProperty("status").notNull();
    groupInfo.addIntProperty("created").notNull();
    groupInfo.addIntProperty("updated").notNull();

    groupInfo.setHasKeepSections(true);
}
 
開發者ID:ccfish86,項目名稱:sctalk,代碼行數:23,代碼來源:GreenDaoGenerator.java

示例3: addSessionInfo

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addSessionInfo(Schema schema){
    Entity sessionInfo = schema.addEntity("SessionEntity");
    sessionInfo.setTableName("Session");
    sessionInfo.setClassNameDao("SessionDao");
    sessionInfo.setJavaPackage(entityPath);

    //point to userId/groupId need sessionType 區分
    sessionInfo.addIdProperty().autoincrement();
    sessionInfo.addStringProperty("sessionKey").unique().notNull(); //.unique()
    sessionInfo.addIntProperty("peerId").notNull();
    sessionInfo.addIntProperty("peerType").notNull();

    sessionInfo.addIntProperty("latestMsgType").notNull();
    sessionInfo.addIntProperty("latestMsgId").notNull();
    sessionInfo.addStringProperty("latestMsgData").notNull();

    sessionInfo.addIntProperty("talkId").notNull();
    sessionInfo.addIntProperty("created").notNull();
    sessionInfo.addIntProperty("updated").notNull();

    sessionInfo.setHasKeepSections(true);
}
 
開發者ID:ccfish86,項目名稱:sctalk,代碼行數:23,代碼來源:GreenDaoGenerator.java

示例4: addHttpCookie

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addHttpCookie(Schema schema) {
    Entity entity = schema.addEntity("HttpCookieRaw");
    entity.setTableName("HTTP_COOKIE");
    entity.setClassNameDao("HttpCookieDao");
    entity.addIdProperty();
    entity.addStringProperty("name");
    entity.addStringProperty("value");
    entity.addStringProperty("comment");
    entity.addStringProperty("commentURL");
    entity.addBooleanProperty("discard");
    entity.addStringProperty("domain");
    entity.addLongProperty("maxAge");
    entity.addStringProperty("path");
    entity.addStringProperty("portList");
    entity.addBooleanProperty("secure");
    entity.addIntProperty("version");
    entity.addStringProperty("url");
    entity.addLongProperty("whenCreated");
}
 
開發者ID:seven332,項目名稱:Nimingban,代碼行數:20,代碼來源:HttpCookieDaoGenerator.java

示例5: addDownloads

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
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");
}
 
開發者ID:seven332,項目名稱:EhViewer,代碼行數:23,代碼來源:EhDaoGenerator.java

示例6: addHistoryInfo

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
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();
}
 
開發者ID:seven332,項目名稱:EhViewer,代碼行數:21,代碼來源:EhDaoGenerator.java

示例7: addLocalFavorites

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
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();
}
 
開發者ID:seven332,項目名稱:EhViewer,代碼行數:20,代碼來源:EhDaoGenerator.java

示例8: addBookmarks

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
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();
}
 
開發者ID:seven332,項目名稱:EhViewer,代碼行數:21,代碼來源:EhDaoGenerator.java

示例9: addUserInfo

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addUserInfo(Schema schema) {
    Entity userInfo = schema.addEntity("UserEntity");
    userInfo.setTableName("UserInfo");
    userInfo.setClassNameDao("UserDao");
    userInfo.setJavaPackage(entityPath);

    userInfo.addIdProperty().autoincrement();
    userInfo.addIntProperty("peerId").unique().notNull().index();
    userInfo.addIntProperty("gender").notNull();
    userInfo.addStringProperty("mainName").notNull();
    // 這個可以自動生成pinyin
    userInfo.addStringProperty("pinyinName").notNull();
    userInfo.addStringProperty("realName").notNull();
    userInfo.addStringProperty("avatar").notNull();
    userInfo.addStringProperty("phone").notNull();
    userInfo.addStringProperty("email").notNull();
    userInfo.addIntProperty("departmentId").notNull();

    userInfo.addIntProperty("status").notNull();
    userInfo.addIntProperty("created").notNull();
    userInfo.addIntProperty("updated").notNull();

    userInfo.setHasKeepSections(true);

    //todo 索引還沒有設定
    // 一對一 addToOne 的使用
    // 支持protobuf
    // schema.addProtobufEntity();
}
 
開發者ID:ccfish86,項目名稱:sctalk,代碼行數:30,代碼來源:GreenDaoGenerator.java

示例10: addACForum

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addACForum(Schema schema) {
    Entity entity = schema.addEntity("ACForumRaw");
    entity.setTableName("AC_FORUM");
    entity.setClassNameDao("ACForumDao");
    entity.addIdProperty();
    entity.addStringProperty("forumid");
    entity.addStringProperty("displayname");
    entity.addIntProperty("priority");
    entity.addBooleanProperty("visibility");

    // @since 4
    entity.addStringProperty("msg");
}
 
開發者ID:seven332,項目名稱:Nimingban,代碼行數:14,代碼來源:NMBDaoGenerator.java

示例11: addDraft

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addDraft(Schema schema) {
    Entity entity = schema.addEntity("DraftRaw");
    entity.setTableName("DRAFT");
    entity.setClassNameDao("DraftDao");
    entity.addIdProperty();
    entity.addStringProperty("content");
    entity.addLongProperty("time");
}
 
開發者ID:seven332,項目名稱:Nimingban,代碼行數:9,代碼來源:NMBDaoGenerator.java

示例12: addACRecord

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
/**
 * @since 2
 */
private static void addACRecord(Schema schema) {
    Entity entity = schema.addEntity("ACRecordRaw");
    entity.setTableName("AC_RECORD");
    entity.setClassNameDao("ACRecordDao");
    entity.addIdProperty();
    entity.addIntProperty("type");
    entity.addStringProperty("recordid");
    entity.addStringProperty("postid");
    entity.addStringProperty("content");
    entity.addStringProperty("image");
    entity.addLongProperty("time");
}
 
開發者ID:seven332,項目名稱:Nimingban,代碼行數:16,代碼來源:NMBDaoGenerator.java

示例13: addACCommonPost

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
/**
 * @since 3
 */
private static void addACCommonPost(Schema schema) {
    Entity entity = schema.addEntity("ACCommonPostRaw");
    entity.setTableName("AC_COMMON_POST");
    entity.setClassNameDao("ACCommonPostDao");
    entity.addIdProperty();
    entity.addStringProperty("name");
    entity.addStringProperty("postid");
}
 
開發者ID:seven332,項目名稱:Nimingban,代碼行數:12,代碼來源:NMBDaoGenerator.java

示例14: addDownloadLabel

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
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();
}
 
開發者ID:seven332,項目名稱:EhViewer,代碼行數:9,代碼來源:EhDaoGenerator.java

示例15: addDownloadDirname

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
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");
}
 
開發者ID:seven332,項目名稱:EhViewer,代碼行數:8,代碼來源:EhDaoGenerator.java


注:本文中的de.greenrobot.daogenerator.Entity.setClassNameDao方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。