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


Java Entity.addIntProperty方法代码示例

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


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

示例1: addNote

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
/**
 * @param schema
 */
private static void addNote(Schema schema) {
    Entity note = schema.addEntity("Note");
    note.addIdProperty();
    note.addIntProperty("note_id");//笔记编号
    note.addStringProperty("guid");//用户ID
    note.addIntProperty("status");//状态
    note.addStringProperty("tag");//类型
    note.addStringProperty("label");//标题
    note.addStringProperty("content");//内容
    note.addStringProperty("imagePath");//图片目录
    note.addStringProperty("voicePath");//声音目录
    note.addLongProperty("createTime");//创建时间
    note.addLongProperty("lastOprTime");//最后修改时间

    Entity tag = schema.addEntity("Tag");//标签类型
    tag .addIdProperty();
    tag.addStringProperty("tag");
    tag.addIntProperty("size");
}
 
开发者ID:lpy19930103,项目名称:MinimalismJotter,代码行数:23,代码来源:NoteDaoGenerator.java

示例2: addDialog

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static Entity addDialog(Schema schema){
    Entity dialog = schema.addEntity("Dialog");
    dialog.addIdProperty().primaryKey().autoincrement();
    dialog.addStringProperty("dialog_id");
    dialog.addStringProperty("created_at");
    dialog.addStringProperty("updated_at");
    dialog.addStringProperty("last_message");
    dialog.addLongProperty("last_message_date_sent");
    dialog.addIntProperty("last_message_user_id");
    dialog.addStringProperty("name");
    dialog.addStringProperty("photo");
    dialog.addStringProperty("occupants_ids");
    dialog.addIntProperty("type");
    dialog.addIntProperty("unread_messages_count");
    dialog.addStringProperty("xmpp_room_jid");
    return dialog;
}
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:18,代码来源:InitDao.java

示例3: addMessage

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static Entity addMessage(Schema schema){
    Entity message = schema.addEntity("Message");
    message.addIdProperty().primaryKey().autoincrement();
    message.addStringProperty("message_id");
    message.addStringProperty("created_at");
    message.addStringProperty("updated_at");
    message.addStringProperty("attachments");
    message.addStringProperty("read_ids");
    message.addStringProperty("delivered_ids");
    message.addStringProperty("chat_dialog_id");
    message.addLongProperty("date_sent");
    message.addStringProperty("message");
    message.addStringProperty("recipient_id");
    message.addIntProperty("sender_id");
    message.addIntProperty("read");
    return message;
}
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:18,代码来源:InitDao.java

示例4: addUser

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static Entity addUser(Schema schema){
    Entity user = schema.addEntity("User");
    user.addIdProperty().primaryKey().autoincrement();
    user.addIntProperty("user_id");
    user.addStringProperty("full_name");
    user.addStringProperty("email");
    user.addStringProperty("login");
    user.addStringProperty("phone");
    user.addStringProperty("website");
    user.addStringProperty("created_at");
    user.addStringProperty("updated_at");
    user.addStringProperty("last_request_at");
    user.addStringProperty("external_user_id");
    user.addLongProperty("facebook_id");
    user.addStringProperty("twitter_id");
    user.addIntProperty("twitter_digits_id");
    user.addIntProperty("blob_id");
    user.addStringProperty("custom_data");
    user.addStringProperty("user_tags");
    return user;
}
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:22,代码来源:InitDao.java

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

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

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

示例8: addAccountTable

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addAccountTable(Schema schema) {

        Entity table = schema.addEntity("Green_AccountBean");
        table.setHasKeepSections(true);
        table.setTableName(AccountTable.ACCOUNT_TABLE);
        table.implementsSerializable();

        table.addLongProperty(AccountTable.UID).primaryKey();
        table.addStringProperty(AccountTable.USER_NAME);
        table.addStringProperty(AccountTable.USER_PWD);
        table.addStringProperty(AccountTable.COOKIE);
        table.addStringProperty(AccountTable.OAUTH_TOKEN);
        table.addLongProperty(AccountTable.OAUTH_TOKEN_EXPIRES_TIME);
        table.addStringProperty(AccountTable.ACCESS_TOKEN_HACK);
        table.addLongProperty(AccountTable.ACCESS_TOKEN_HACK_EXPIRES_TIME);
        table.addStringProperty(AccountTable.G_SID);
        table.addIntProperty(AccountTable.NAVIGATION_POSITION);
        table.addStringProperty(AccountTable.USER_INFO_JSON);
    }
 
开发者ID:andforce,项目名称:iBeebo,代码行数:20,代码来源:GreenDaoGen.java

示例9: main

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static void main(String args[]) throws Exception {
    Schema schema = new Schema(3, "greendao");

    Entity verses = schema.addEntity("Verse");
    verses.setTableName("verses");
    verses.addIdProperty().columnName("_rowid_");
    verses.addIntProperty("chapter");
    verses.addIntProperty("verse");
    verses.addStringProperty("book");
    verses.addStringProperty("header");
    verses.addStringProperty("subheader");
    verses.addStringProperty("text");

    Entity books = schema.addEntity("Book");
    books.addLongProperty("indice").primaryKey().unique();
    books.setTableName("books");
    books.addStringProperty("name");
    books.addStringProperty("abbreviation");
    books.addStringProperty("testament");

    new DaoGenerator().generateAll(schema, args[0]);
}
 
开发者ID:diegoponciano,项目名称:biblia-ccb,代码行数:23,代码来源:BibliaDaoGenerator.java

示例10: main

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
    Schema schema = new Schema(3, "br.com.ricardolonga.mercadinho");

    Entity categoria = schema.addEntity("Categoria");
    categoria.addIdProperty().autoincrement();
    categoria.addStringProperty("nome").notNull();
    categoria.implementsSerializable();

    Entity item = schema.addEntity("Item");
    item.addIdProperty().autoincrement();
    item.addStringProperty("nome").notNull();
    item.addIntProperty("quantidade");
    item.addDoubleProperty("valorUnitario");
    item.addDoubleProperty("valorTotal");
    item.implementsSerializable();
    Property idCategoria = item.addLongProperty("idCategoria").notNull().getProperty();

    item.addToOne(categoria, idCategoria);
    categoria.addToMany(item, idCategoria, "itens");

    new DaoGenerator().generateAll(schema, "../mercadinho/src-gen");
}
 
开发者ID:ricardolonga,项目名称:mercadinho-generator,代码行数:23,代码来源:MercadinhoGenerator.java

示例11: main

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
public static void main(String[] args) {
    Schema schema = new Schema(DB_VERSION, PACKAGE);

    Entity user = schema.addEntity(USER_ENTITY);
    Property userPk = addCommonColumns(user);

    Entity message = schema.addEntity(MESSAGE_ENTITY);
    message.addIdProperty().autoincrement();
    message.addStringProperty(CONTENT);
    message.addLongProperty(CLIENT_ID);
    message.addIntProperty(CREATED_AT);
    message.addDoubleProperty(SORTED_BY);
    message.addLongProperty(COMMAND_ID).index();
    message.addLongProperty(SENDER_ID).notNull();
    message.addLongProperty(CHANNEL_ID).notNull();

    // One-to-many relationship
    message.addToMany(user, userPk, READERS);

    try {
        new DaoGenerator().generateAll(schema, "../ORM-Benchmark/src/");
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:littleinc,项目名称:android-orm-benchmark,代码行数:26,代码来源:Generator.java

示例12: fillEntity

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void fillEntity(Entity entity, Class c) throws IllegalAccessException {
    for (Field field : c.getDeclaredFields()){
        Property pt = field.getAnnotation(Property.class);
        Id id = field.getAnnotation(Id.class);
        String value = null;
        String type = null;
        de.greenrobot.daogenerator.Property.PropertyBuilder propertyBuilder = null;
        if (id != null){
            propertyBuilder = entity.addIdProperty();
            if (id.auto()){
                propertyBuilder.autoincrement();
            }
        }else if (pt != null){
            field.setAccessible(true);
            value = (String) field.get(null);
            type = pt.type();
            switch (checkPropertyType(type)){
                case 0:
                    propertyBuilder = entity.addIntProperty(value);
                    break;
                case 1:
                    propertyBuilder = entity.addStringProperty(value);
                    break;
                case 2:
                    propertyBuilder = entity.addDateProperty(value);
                    break;
            }
            if (propertyBuilder != null){
                if (pt.primaryKey()){
                    propertyBuilder.primaryKey();
                }else {
                    if (pt.notNull()){
                        propertyBuilder.notNull();
                    }
                }
            }
        }
    }
}
 
开发者ID:zuoweitan,项目名称:Hitalk,代码行数:40,代码来源:GenerateGreenDao.java

示例13: addAppData

import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addAppData(Schema schema) {
    Entity tableName = schema.addEntity("AppData");

    tableName.addIdProperty().autoincrement();
    tableName.addStringProperty("appName");
    tableName.addStringProperty("appPackageName").unique();
    tableName.addLongProperty("lastModified");
    tableName.addIntProperty("isSystem");
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:10,代码来源:ExampleDaoGenerator.java

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

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


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