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


Java Entity.setSuperclass方法代碼示例

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


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

示例1: addMusic

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addMusic(Schema schema) {
    Entity music = schema.addEntity("Music");
    music.addIdProperty();
    music.addStringProperty("mediaType");//eg: mp3
    music.addStringProperty("musicType");//eg:兒歌,英文
    music.addStringProperty("url");
    music.addStringProperty("singer");
    music.addStringProperty("author");
    music.addStringProperty("poster_url");//海報url
    music.addStringProperty("lyrics_url");//歌詞url
    music.addStringProperty("name");
    music.addLongProperty("size");
    music.addStringProperty("albums");//專輯
    music.addIntProperty("quality");
    music.setSuperclass("cn.bmob.v3.BmobObject");
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:17,代碼來源:PineappleGenerator.java

示例2: genTableEntity

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void genTableEntity(Schema schema, JSONObject jsonObj, String superClass) {
    String table = jsonObj.optString("@name");
    Entity entity = schema.addEntity(table);
    entity.setSuperclass(superClass);

    Object fieldObj = jsonObj.get("field");
    if (fieldObj instanceof JSONArray) {
        JSONArray arr = (JSONArray) fieldObj;
        for (int i = 0, len = arr.size(); i < len; i++) {
            JSONObject obj = arr.getJSONObject(i);
            genField(entity, obj);
        }
    } else {
        JSONObject json = (JSONObject) fieldObj;
        genField(entity, json);
    }
}
 
開發者ID:AlbieLiang,項目名稱:ArbitraryGen,代碼行數:18,代碼來源:GreenDaoGenerator.java

示例3: addMeal

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addMeal(Schema schema, Entity food) {
    Entity meal = schema.addEntity("MealEntity");
    meal.setSuperclass("MealEntityBase");
    meal.addIdProperty().autoincrement().primaryKey();
    meal.addDateProperty("date").notNull();
    meal.addIntProperty("mealtime").notNull();
    meal.addIntProperty("grams").notNull();
    meal.addDoubleProperty("calories").notNull();
    meal.addDoubleProperty("fats").notNull();
    meal.addDoubleProperty("carbohydrates").notNull();
    meal.addDoubleProperty("proteins").notNull();
    meal.addStringProperty("foodName");

    Property foodId = meal.addLongProperty("foodId").getProperty();
    meal.addToOne(food, foodId);
}
 
開發者ID:andreshj87,項目名稱:CleanFit,代碼行數:17,代碼來源:GreenDAOGenerator.java

示例4: addUser

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addUser(Schema schema) {
    Entity user = schema.addEntity("UserEntity");
    user.setSuperclass("UserEntityBase");
    user.addIdProperty().primaryKey();
    user.addStringProperty("name");
    user.addIntProperty("gender").notNull();
    user.addDateProperty("birthday").notNull();
    user.addIntProperty("age");
    //user.addIntProperty("measurementSystem").notNull();
    user.addDoubleProperty("weight").notNull();
    user.addIntProperty("height").notNull();
    user.addIntProperty("activityFactor").notNull();
    user.addDoubleProperty("bmr");
    user.addIntProperty("goal").notNull();
    user.addDoubleProperty("maintain");
    user.addDoubleProperty("burn");
    user.addDoubleProperty("gain");
}
 
開發者ID:andreshj87,項目名稱:CleanFit,代碼行數:19,代碼來源:GreenDAOGenerator.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: createVerification

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void createVerification(Schema schema, Entity book, Entity audioChapter) {

        DaoHelperMethods.EntityInformation verificationInfo =
                new DaoHelperMethods.EntityInformation(ModelNames.VERIFICATION, ModelNames.VERIFICATION_STRING_ATTRIBUTES);
        verificationInfo.intAttributes = ModelNames.VERIFICATION_INT_ATTRIBUTES;
        Entity verification = DaoHelperMethods.createEntity(schema, verificationInfo);
        verification.setSuperclass(UW_DATABASE_MODEL_PROTOCOL);

        DaoHelperMethods.createParentChildRelationship(
                book, ModelNames.BOOK_VERIFICATIONS_ATTRIBUTE,
                verification, ModelNames.VERIFICATION_BOOK_ATTRIBUTE);

        DaoHelperMethods.createParentChildRelationship(
                audioChapter, ModelNames.AUDIO_CHAPTER_VERIFICATIONS_ATTRIBUTE,
                verification, ModelNames.VERIFICATION_AUDIO_CHAPTER_ATTRIBUTE);
    }
 
開發者ID:unfoldingWord-dev,項目名稱:uw-android,代碼行數:17,代碼來源:MyDaoGenerator.java

示例10: addContactLink

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static Property addContactLink(Schema schema) {
    Property contactLinkId;
    Entity contactLink = schema.addEntity(EntityProperties.ContactLink);
    contactLinkId = contactLink.addIdProperty().getProperty();
    setManyToMany(contactLink, user, user);

    contactLink.setSuperclass("Entity");

    return contactLinkId;
}
 
開發者ID:MobileDev418,項目名稱:AndroidBackendlessChat,代碼行數:11,代碼來源:Generator.java

示例11: addUser

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
/**
 * @author:keivn
 * @param schema
 * one -- many  user -- userAuth
 */
private static void addUser(Schema schema){
    Entity user = schema.addEntity("User");
    user.addIdProperty();
    user.addStringProperty("user_id");
    user.addStringProperty("nickname");
    user.addStringProperty("avatar");
    user.addIntProperty("gender");
    user.addStringProperty("hobbies");
    user.addStringProperty("jobs");
    user.setSuperclass("cn.bmob.v3.BmobObject");
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:17,代碼來源:PineappleGenerator.java

示例12: addUserAuth

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
/**
 * @author:keivn
 * @param schema
 */
private static void addUserAuth(Schema schema){
    Entity userAuth = schema.addEntity("UserAuth");
    userAuth.addIdProperty();
    userAuth.addStringProperty("user_id"); //對應user的objectId
    userAuth.addIntProperty("onLineType");
    userAuth.addIntProperty("identity_type");
    userAuth.addStringProperty("identify_unique_id ");//(手機號 郵箱 用戶名或第三方應用的唯一標識)
    userAuth.addStringProperty("credential"); //credential 密碼憑證(站內的保存密碼,站外的不保存或保存token)
    userAuth.addBooleanProperty("verified"); //是否驗證,三方登錄默認認證了
    userAuth.addLongProperty("update_time");
    userAuth.setSuperclass("cn.bmob.v3.BmobObject");//別忘了加這句
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:17,代碼來源:PineappleGenerator.java

示例13: addCommonActivitySampleProperties

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static void addCommonActivitySampleProperties(String superClass, Entity activitySample, Entity user, Entity device) {
    activitySample.setSuperclass(superClass);
    activitySample.addImport(MAIN_PACKAGE + ".devices.SampleProvider");
    activitySample.setJavaDoc(
            "This class represents a sample specific to the device. Values like activity kind or\n" +
                    "intensity, are device specific. Normalized values can be retrieved through the\n" +
                    "corresponding {@link SampleProvider}.");
    activitySample.addIntProperty("timestamp").notNull().primaryKey();
    Property deviceId = activitySample.addLongProperty("deviceId").primaryKey().getProperty();
    activitySample.addToOne(device, deviceId);
    Property userId = activitySample.addLongProperty("userId").getProperty();
    activitySample.addToOne(user, userId);
}
 
開發者ID:scifiswapnil,項目名稱:gadgetbridge_artikcloud,代碼行數:14,代碼來源:GBDaoGenerator.java

示例14: addFood

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static Entity addFood(Schema schema) {
    Entity food = schema.addEntity("FoodEntity");
    food.setSuperclass("FoodEntityBase");
    food.addIdProperty().autoincrement().primaryKey();
    food.addStringProperty("name").notNull();
    food.addStringProperty("brand").notNull();
    food.addBooleanProperty("isDrink").notNull();
    food.addDoubleProperty("calories").notNull();
    food.addDoubleProperty("fats").notNull();
    food.addDoubleProperty("carbohydrates").notNull();
    food.addDoubleProperty("proteins").notNull();
    food.addStringProperty("picture");

    return food;
}
 
開發者ID:andreshj87,項目名稱:CleanFit,代碼行數:16,代碼來源:GreenDAOGenerator.java

示例15: createProject

import de.greenrobot.daogenerator.Entity; //導入方法依賴的package包/類
private static Entity createProject(Schema schema) {

        DaoHelperMethods.EntityInformation projectInfo =
                new DaoHelperMethods.EntityInformation(ModelNames.PROJECT, ModelNames.PROJECT_STRING_ATTRIBUTES);
        Entity project = DaoHelperMethods.createEntity(schema, projectInfo);
        project.setSuperclass(UW_DATABASE_MODEL_PROTOCOL);
        return project;
    }
 
開發者ID:unfoldingWord-dev,項目名稱:uw-android,代碼行數:9,代碼來源:MyDaoGenerator.java


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