当前位置: 首页>>代码示例>>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;未经允许,请勿转载。