本文整理汇总了Java中de.greenrobot.daogenerator.Entity.addLongProperty方法的典型用法代码示例。如果您正苦于以下问题:Java Entity.addLongProperty方法的具体用法?Java Entity.addLongProperty怎么用?Java Entity.addLongProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.greenrobot.daogenerator.Entity
的用法示例。
在下文中一共展示了Entity.addLongProperty方法的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");
}
示例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;
}
示例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;
}
示例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;
}
示例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");
}
示例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");
}
示例7: 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);
}
示例8: 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();
}
}
示例9: 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");
}
示例10: addHistoryRecord
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addHistoryRecord(Schema schema) {
Entity tableName = schema.addEntity("HistoryData");
tableName.addIdProperty().autoincrement();
tableName.addStringProperty("name");
tableName.addStringProperty("path").unique();
tableName.addStringProperty("appName");
tableName.addStringProperty("appPackageName");
tableName.addLongProperty("size");
tableName.addLongProperty("lastModified");
tableName.addLongProperty("openTime");
}
示例11: addMineRecord
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addMineRecord(Schema schema) {
Entity tableName = schema.addEntity("MineData");
tableName.addIdProperty().autoincrement();
tableName.addStringProperty("name");
tableName.addStringProperty("path").unique();
tableName.addLongProperty("size");
tableName.addLongProperty("lastModified");
tableName.addLongProperty("openTime");
}
示例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");//别忘了加这句
}
示例13: addParent
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
private static void addParent(Schema schema) {
Entity note = schema.addEntity("Parent");
note.addIdProperty();
note.addStringProperty("uid");
note.addStringProperty("token");
note.addStringProperty("phone");
note.addStringProperty("alias");
note.addIntProperty("sex");
note.addLongProperty("birthday");
note.addStringProperty("headThumb");
}
示例14: 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");
}
示例15: addCache
import de.greenrobot.daogenerator.Entity; //导入方法依赖的package包/类
/**
* 添加不同的缓存表
* @param schema
* @param tableName
*/
private static void addCache(Schema schema, String tableName) {
Entity joke = schema.addEntity(tableName);
//主键id自增长
joke.addIdProperty().primaryKey().autoincrement();
//请求结果
joke.addStringProperty("result");
//页数
joke.addIntProperty("page");
//插入时间,暂时无用
joke.addLongProperty("time");
}