本文整理汇总了Java中de.greenrobot.dao.internal.DaoConfig类的典型用法代码示例。如果您正苦于以下问题:Java DaoConfig类的具体用法?Java DaoConfig怎么用?Java DaoConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DaoConfig类属于de.greenrobot.dao.internal包,在下文中一共展示了DaoConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
beanDaoConfig = daoConfigMap.get(BeanDao.class).clone();
beanDaoConfig.initIdentityScope(type);
conversationDaoConfig = daoConfigMap.get(ConversationDao.class).clone();
conversationDaoConfig.initIdentityScope(type);
userDaoConfig = daoConfigMap.get(UserDao.class).clone();
userDaoConfig.initIdentityScope(type);
schoolmateDaoConfig = daoConfigMap.get(SchoolmateDao.class).clone();
schoolmateDaoConfig.initIdentityScope(type);
beanDao = new BeanDao(beanDaoConfig, this);
conversationDao = new ConversationDao(conversationDaoConfig, this);
userDao = new UserDao(userDaoConfig, this);
schoolmateDao = new SchoolmateDao(schoolmateDaoConfig, this);
registerDao(Bean.class, beanDao);
registerDao(Conversation.class, conversationDao);
registerDao(User.class, userDao);
registerDao(Schoolmate.class, schoolmateDao);
}
示例2: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
appDataDaoConfig = daoConfigMap.get(AppDataDao.class).clone();
appDataDaoConfig.initIdentityScope(type);
historyDataDaoConfig = daoConfigMap.get(HistoryDataDao.class).clone();
historyDataDaoConfig.initIdentityScope(type);
mineDataDaoConfig = daoConfigMap.get(MineDataDao.class).clone();
mineDataDaoConfig.initIdentityScope(type);
appDataDao = new AppDataDao(appDataDaoConfig, this);
historyDataDao = new HistoryDataDao(historyDataDaoConfig, this);
mineDataDao = new MineDataDao(mineDataDaoConfig, this);
registerDao(AppData.class, appDataDao);
registerDao(HistoryData.class, historyDataDao);
registerDao(MineData.class, mineDataDao);
}
示例3: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
noteDaoConfig = daoConfigMap.get(NoteDao.class).clone();
noteDaoConfig.initIdentityScope(type);
tagDaoConfig = daoConfigMap.get(TagDao.class).clone();
tagDaoConfig.initIdentityScope(type);
noteDao = new NoteDao(noteDaoConfig, this);
tagDao = new TagDao(tagDaoConfig, this);
registerDao(Note.class, noteDao);
registerDao(Tag.class, tagDao);
}
示例4: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
//MEMBERS ITEM
restaurantImageDaoConfig = daoConfigMap.get(RestaurantImageDao.class).clone();
restaurantImageDaoConfig.initIdentityScope(type);
restaurantImageDao = new RestaurantImageDao(restaurantImageDaoConfig, this);
registerDao(RestaurantImage.class, restaurantImageDao);
//MEMBERS ITEM
photoItemDaoConfig = daoConfigMap.get(PhotoItemDao.class).clone();
photoItemDaoConfig.initIdentityScope(type);
photoItemDao = new PhotoItemDao(photoItemDaoConfig, this);
registerDao(PhotoItem.class, photoItemDao);
//TODO ADD HERE
}
示例5: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
userDaoConfig = daoConfigMap.get(UserDao.class).clone();
userDaoConfig.initIdentityScope(type);
userAuthDaoConfig = daoConfigMap.get(UserAuthDao.class).clone();
userAuthDaoConfig.initIdentityScope(type);
musicDaoConfig = daoConfigMap.get(MusicDao.class).clone();
musicDaoConfig.initIdentityScope(type);
userDao = new UserDao(userDaoConfig, this);
userAuthDao = new UserAuthDao(userAuthDaoConfig, this);
musicDao = new MusicDao(musicDaoConfig, this);
registerDao(User.class, userDao);
registerDao(UserAuth.class, userAuthDao);
registerDao(Music.class, musicDao);
}
示例6: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
operatorsDaoConfig = daoConfigMap.get(operatorsDao.class).clone();
operatorsDaoConfig.initIdentityScope(type);
alloperatorsDaoConfig = daoConfigMap.get(alloperatorsDao.class).clone();
alloperatorsDaoConfig.initIdentityScope(type);
operatorsDao = new operatorsDao(operatorsDaoConfig, this);
alloperatorsDao = new alloperatorsDao(alloperatorsDaoConfig, this);
registerDao(operators.class, operatorsDao);
registerDao(alloperators.class, alloperatorsDao);
}
示例7: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
configDaoConfig = daoConfigMap.get(ConfigDao.class).clone();
configDaoConfig.initIdentityScope(type);
parentDaoConfig = daoConfigMap.get(ParentDao.class).clone();
parentDaoConfig.initIdentityScope(type);
configDao = new ConfigDao(configDaoConfig, this);
parentDao = new ParentDao(parentDaoConfig, this);
registerDao(Config.class, configDao);
registerDao(Parent.class, parentDao);
}
示例8: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
dailyMealDaoConfig = daoConfigMap.get(DailyMealDao.class).clone();
dailyMealDaoConfig.initIdentityScope(type);
mealDaoConfig = daoConfigMap.get(MealDao.class).clone();
mealDaoConfig.initIdentityScope(type);
mealItemDaoConfig = daoConfigMap.get(MealItemDao.class).clone();
mealItemDaoConfig.initIdentityScope(type);
dailyMealDao = new DailyMealDao(dailyMealDaoConfig, this);
mealDao = new MealDao(mealDaoConfig, this);
mealItemDao = new MealItemDao(mealItemDaoConfig, this);
registerDao(DailyMeal.class, dailyMealDao);
registerDao(Meal.class, mealDao);
registerDao(MealItem.class, mealItemDao);
}
示例9: restoreData
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
private static void restoreData(SQLiteDatabase db, Class<? extends AbstractDao<?, ?>>... daoClasses) {
for (Class<? extends AbstractDao<?, ?>> daoClass : daoClasses) {
DaoConfig daoConfig = new DaoConfig(db, daoClass);
String tableName = daoConfig.tablename;
String tempTableName = daoConfig.tablename.concat("_TEMP");
ArrayList<String> properties = new ArrayList<>();
for (int j = 0; j < daoConfig.properties.length; j++) {
String columnName = daoConfig.properties[j].columnName;
if (getColumns(db, tempTableName).contains(columnName)) {
properties.add(columnName);
}
}
StringBuilder insertTableStringBuilder = new StringBuilder();
insertTableStringBuilder.append("INSERT INTO ").append(tableName).append(" (");
insertTableStringBuilder.append(TextUtils.join(",", properties));
insertTableStringBuilder.append(") SELECT ");
insertTableStringBuilder.append(TextUtils.join(",", properties));
insertTableStringBuilder.append(" FROM ").append(tempTableName).append(";");
StringBuilder dropTableStringBuilder = new StringBuilder();
dropTableStringBuilder.append("DROP TABLE ").append(tempTableName);
db.execSQL(insertTableStringBuilder.toString());
db.execSQL(dropTableStringBuilder.toString());
}
}
示例10: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
pedometerEntityDaoConfig = daoConfigMap.get(PedometerEntityDao.class).clone();
pedometerEntityDaoConfig.initIdentityScope(type);
pedometerEntityDao = new PedometerEntityDao(pedometerEntityDaoConfig, this);
registerDao(PedometerEntity.class, pedometerEntityDao);
}
示例11: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
friendDaoConfig = daoConfigMap.get(FriendDao.class).clone();
friendDaoConfig.initIdentityScope(type);
groupsDaoConfig = daoConfigMap.get(GroupsDao.class).clone();
groupsDaoConfig.initIdentityScope(type);
groupMemberDaoConfig = daoConfigMap.get(GroupMemberDao.class).clone();
groupMemberDaoConfig.initIdentityScope(type);
blackListDaoConfig = daoConfigMap.get(BlackListDao.class).clone();
blackListDaoConfig.initIdentityScope(type);
friendDao = new FriendDao(friendDaoConfig, this);
groupsDao = new GroupsDao(groupsDaoConfig, this);
groupMemberDao = new GroupMemberDao(groupMemberDaoConfig, this);
blackListDao = new BlackListDao(blackListDaoConfig, this);
registerDao(Friend.class, friendDao);
registerDao(Groups.class, groupsDao);
registerDao(BlackList.class, blackListDao);
registerDao(GroupMember.class, groupMemberDao);
}
示例12: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
departmentDaoConfig = daoConfigMap.get(DepartmentDao.class).clone();
departmentDaoConfig.initIdentityScope(type);
userDaoConfig = daoConfigMap.get(UserDao.class).clone();
userDaoConfig.initIdentityScope(type);
groupDaoConfig = daoConfigMap.get(GroupDao.class).clone();
groupDaoConfig.initIdentityScope(type);
messageDaoConfig = daoConfigMap.get(MessageDao.class).clone();
messageDaoConfig.initIdentityScope(type);
sessionDaoConfig = daoConfigMap.get(SessionDao.class).clone();
sessionDaoConfig.initIdentityScope(type);
departmentDao = new DepartmentDao(departmentDaoConfig, this);
userDao = new UserDao(userDaoConfig, this);
groupDao = new GroupDao(groupDaoConfig, this);
messageDao = new MessageDao(messageDaoConfig, this);
sessionDao = new SessionDao(sessionDaoConfig, this);
registerDao(DepartmentEntity.class, departmentDao);
registerDao(UserEntity.class, userDao);
registerDao(GroupEntity.class, groupDao);
registerDao(MessageEntity.class, messageDao);
registerDao(SessionEntity.class, sessionDao);
}
示例13: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
configDaoConfig = daoConfigMap.get(ConfigDao.class).clone();
configDaoConfig.initIdentityScope(type);
groupDetalDaoConfig = daoConfigMap.get(GroupDetalDao.class).clone();
groupDetalDaoConfig.initIdentityScope(type);
userInfoDaoConfig = daoConfigMap.get(UserInfoDao.class).clone();
userInfoDaoConfig.initIdentityScope(type);
userDaoConfig = daoConfigMap.get(UserDao.class).clone();
userDaoConfig.initIdentityScope(type);
inviteMessageDaoConfig = daoConfigMap.get(InviteMessageDao.class).clone();
inviteMessageDaoConfig.initIdentityScope(type);
configDao = new ConfigDao(configDaoConfig, this);
groupDetalDao = new GroupDetalDao(groupDetalDaoConfig, this);
userInfoDao = new UserInfoDao(userInfoDaoConfig, this);
userDao = new UserDao(userDaoConfig, this);
inviteMessageDao = new InviteMessageDao(inviteMessageDaoConfig, this);
registerDao(ConfigDO.class, configDao);
registerDao(GroupDetalDO.class, groupDetalDao);
registerDao(UserInfoDO.class, userInfoDao);
registerDao(UserDO.class, userDao);
registerDao(InviteMessageDO.class, inviteMessageDao);
}
示例14: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
freshNewsCacheDaoConfig = daoConfigMap.get(FreshNewsCacheDao.class).clone();
freshNewsCacheDaoConfig.initIdentityScope(type);
freshNewsCacheDao = new FreshNewsCacheDao(freshNewsCacheDaoConfig, this);
registerDao(FreshNewsCache.class, freshNewsCacheDao);
}
示例15: DaoSession
import de.greenrobot.dao.internal.DaoConfig; //导入依赖的package包/类
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
super(db);
downloadEntityDaoConfig = daoConfigMap.get(DownloadEntityDao.class).clone();
downloadEntityDaoConfig.initIdentityScope(type);
downloadEntityDao = new DownloadEntityDao(downloadEntityDaoConfig, this);
registerDao(DownloadEntity.class, downloadEntityDao);
}