当前位置: 首页>>代码示例>>Java>>正文


Java Entity.addBooleanProperty方法代码示例

本文整理汇总了Java中de.greenrobot.daogenerator.Entity.addBooleanProperty方法的典型用法代码示例。如果您正苦于以下问题:Java Entity.addBooleanProperty方法的具体用法?Java Entity.addBooleanProperty怎么用?Java Entity.addBooleanProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.greenrobot.daogenerator.Entity的用法示例。


在下文中一共展示了Entity.addBooleanProperty方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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

示例3: createAnswerEntity

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static Entity createAnswerEntity(Schema schema) {
    Entity answer = schema.addEntity("Answer");
    answer.addIdProperty();
    answer.addStringProperty("text").notNull();
    answer.addBooleanProperty("answerCorrect");

    return answer;
}
 
开发者ID:Kamshak,项目名称:BrainPhaser,代码行数:9,代码来源:BrainphaserDaoGenerator.java

示例4: createStatisticsEntity

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static Entity createStatisticsEntity(Schema schema) {
    Entity completed = schema.addEntity("Statistics");
    completed.addIdProperty();
    completed.addBooleanProperty("succeeded");
    completed.addDateProperty("time");

    return completed;
}
 
开发者ID:Kamshak,项目名称:BrainPhaser,代码行数:9,代码来源:BrainphaserDaoGenerator.java

示例5: addHistoryVideo

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static void addHistoryVideo(Schema schema) {
    Entity video = schema.addEntity("GreenWatchedVideo");
    video.addStringProperty("videoyoukuvid").primaryKey();
    video.addStringProperty("videobackground");
    video.addStringProperty("videotitle");
    video.addLongProperty("videowatchtime");
    video.addIntProperty("videoduration");
    video.addIntProperty("videoplaytime");
    video.addBooleanProperty("videoEnded");
}
 
开发者ID:uin3566,项目名称:Dota2Helper,代码行数:11,代码来源:GreenDaoGenerator.java

示例6: addEntity

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static void addEntity(Schema schema) {
    Entity entity = schema.addEntity("ResultEntity");
    entity.addIdProperty();
    entity.addStringProperty("json");
    entity.addStringProperty("nId");

    Entity entity2 = schema.addEntity("ChannelEntity");
    entity2.addIdProperty();
    entity2.addStringProperty("name");
    entity2.addStringProperty("tId");
    entity2.addBooleanProperty("isSelect");
}
 
开发者ID:yuqirong,项目名称:RxNews,代码行数:13,代码来源:GreenDaoGeneration.java

示例7: genField

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void genField(Entity entity, Map<String, String> attributes) {
    String name = attributes.get("name");
    String type = attributes.get("type");
    String def = attributes.get("default");
    String comment = attributes.get("comment");
    String index = attributes.get("index");
    String primaryKey = attributes.get("primaryKey");
    String notNull = attributes.get("notNull");
    String autoincrement = attributes.get("autoInc");

    Property.PropertyBuilder builder = null;
    if (type.equals("String")) {
        builder = entity.addStringProperty(name);
    } else if (type.equals("int")) {
        builder = entity.addIntProperty(name);
    } else if (type.equals("long")) {
        builder = entity.addLongProperty(name);
    } else if (type.equals("boolean")) {
        builder = entity.addBooleanProperty(name);
    } else if (type.equals("byte[]")) {
        builder = entity.addByteArrayProperty(name);
    } else if (type.equals("byte")) {
        builder = entity.addByteProperty(name);
    } else if (type.equals("float")) {
        builder = entity.addFloatProperty(name);
    } else if (type.equals("double")) {
        builder = entity.addDoubleProperty(name);
    }
    if ("true".equals(notNull)) {
        builder.notNull();
    }
    if ("true".equals(primaryKey)) {
        builder.primaryKey();
    }
    if ("true".equals(autoincrement)) {
        builder.autoincrement();
    }
}
 
开发者ID:AlbieLiang,项目名称:ArbitraryGen,代码行数:39,代码来源:DatabaseGenerator.java

示例8: genField

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void genField(Entity entity, JSONObject jsonObj) {
    String name = jsonObj.optString("@name");
    String type = jsonObj.optString("@type");
    String def = jsonObj.optString("@default");
    String comment = jsonObj.optString("@comment");
    String index = jsonObj.optString("@index");
    String primaryKey = jsonObj.optString("@primaryKey");
    String notNull = jsonObj.optString("@notNull");
    String autoincrement = jsonObj.optString("@autoInc");

    Property.PropertyBuilder builder = null;
    if (type.equals("String")) {
        builder = entity.addStringProperty(name);
    } else if (type.equals("int")) {
        builder = entity.addIntProperty(name);
    } else if (type.equals("long")) {
        builder = entity.addLongProperty(name);
    } else if (type.equals("boolean")) {
        builder = entity.addBooleanProperty(name);
    } else if (type.equals("byte[]")) {
        builder = entity.addByteArrayProperty(name);
    } else if (type.equals("byte")) {
        builder = entity.addByteProperty(name);
    } else if (type.equals("float")) {
        builder = entity.addFloatProperty(name);
    } else if (type.equals("double")) {
        builder = entity.addDoubleProperty(name);
    }
    if ("true".equals(notNull)) {
        builder.notNull();
    }
    if ("true".equals(primaryKey)) {
        builder.primaryKey();
    }
    if ("true".equals(autoincrement)) {
        builder.autoincrement();
    }
}
 
开发者ID:AlbieLiang,项目名称:ArbitraryGen,代码行数:39,代码来源:GreenDaoGenerator.java

示例9: 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

示例10: addFilter

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
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");
}
 
开发者ID:seven332,项目名称:EhViewer,代码行数:10,代码来源:EhDaoGenerator.java

示例11: addBooleanAttributesToEntity

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static void addBooleanAttributesToEntity(Entity entity, String[] booleanAttributes){

        if(arrayIsValid(booleanAttributes)) {
            for (String name : booleanAttributes) {
                entity.addBooleanProperty(name);
            }
        }
    }
 
开发者ID:unfoldingWord-dev,项目名称:uw-android,代码行数:9,代码来源:DaoHelperMethods.java

示例12: createSimple

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
protected void createSimple() {
    Entity simple = schema.addEntity("SimpleEntity");
    simple.addIdProperty();
    simple.addBooleanProperty("simpleBoolean");
    simple.addByteProperty("simpleByte");
    simple.addShortProperty("simpleShort");
    simple.addIntProperty("simpleInt");
    simple.addLongProperty("simpleLong");
    simple.addFloatProperty("simpleFloat");
    simple.addDoubleProperty("simpleDouble");
    simple.addStringProperty("simpleString");
    simple.addByteArrayProperty("simpleByteArray");
    
    simple.addContentProvider().readOnly();
}
 
开发者ID:itsmechlark,项目名称:greendao-cipher,代码行数:16,代码来源:TestDaoGenerator.java

示例13: createTest

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
protected Entity createTest() {
    Entity testEntity = schema.addEntity("TestEntity");
    testEntity.addIdProperty();
    testEntity.addIntProperty("simpleInt").notNull();
    testEntity.addIntProperty("simpleInteger");
    testEntity.addStringProperty("simpleStringNotNull").notNull();
    testEntity.addStringProperty("simpleString");
    testEntity.addStringProperty("indexedString").index();
    testEntity.addStringProperty("indexedStringAscUnique").indexAsc(null, true);
    testEntity.addDateProperty("simpleDate");
    testEntity.addBooleanProperty("simpleBoolean");
    return testEntity;
}
 
开发者ID:itsmechlark,项目名称:greendao-cipher,代码行数:14,代码来源:TestDaoGenerator.java


注:本文中的de.greenrobot.daogenerator.Entity.addBooleanProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。