當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。