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


Java DaoConfig类代码示例

本文整理汇总了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);
}
 
开发者ID:zuoweitan,项目名称:Hitalk,代码行数:27,代码来源:DaoSession.java

示例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);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:22,代码来源:DaoSession.java

示例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);
}
 
开发者ID:lpy19930103,项目名称:MinimalismJotter,代码行数:17,代码来源:DaoSession.java

示例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
}
 
开发者ID:PacktPublishing,项目名称:Expert-Android-Programming,代码行数:19,代码来源:DaoSession.java

示例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);
}
 
开发者ID:DroidKOF,项目名称:pineapple,代码行数:22,代码来源:DaoSession.java

示例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);
}
 
开发者ID:cowthan,项目名称:AyoRxJava,代码行数:17,代码来源:DaoSession.java

示例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);
}
 
开发者ID:tengbinlive,项目名称:ooooim_android,代码行数:17,代码来源:DaoSession.java

示例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);
}
 
开发者ID:olivierg13,项目名称:GreenDao-vs-Realm,代码行数:22,代码来源:DaoSession.java

示例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());
    }
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:33,代码来源:DBCore.java

示例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);
}
 
开发者ID:lpy19930103,项目名称:AndroidPedometer,代码行数:12,代码来源:DaoSession.java

示例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);
}
 
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:28,代码来源:DaoSession.java

示例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);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:32,代码来源:DaoSession.java

示例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);
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:32,代码来源:DaoSession.java

示例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);

}
 
开发者ID:niuzehai,项目名称:Sxumiro_AndroidClient,代码行数:10,代码来源:DaoSession.java

示例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);
}
 
开发者ID:nebulae-pan,项目名称:OkHttpDownloadManager,代码行数:12,代码来源:DaoSession.java


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