Java Code Examples for de.greenrobot.dao.identityscope.IdentityScopeType

The following examples show how to use de.greenrobot.dao.identityscope.IdentityScopeType. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Expert-Android-Programming   Source File: DaoSession.java    License: MIT License 6 votes vote down vote up
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
}
 
Example 2
Source Project: sealtalk-android   Source File: DaoSession.java    License: MIT License 6 votes vote down vote up
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);

    blackListDaoConfig = daoConfigMap.get(BlackListDao.class).clone();
    blackListDaoConfig.initIdentityScope(type);

    friendDao = new FriendDao(friendDaoConfig, this);
    groupsDao = new GroupsDao(groupsDaoConfig, this);
    blackListDao = new BlackListDao(blackListDaoConfig, this);

    registerDao(Friend.class, friendDao);
    registerDao(Groups.class, groupsDao);
    registerDao(BlackList.class, blackListDao);
}
 
Example 3
Source Project: Puff-Android   Source File: DaoSession.java    License: MIT License 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
    accountDaoConfig.initIdentityScope(type);

    categoryDaoConfig = daoConfigMap.get(CategoryDao.class).clone();
    categoryDaoConfig.initIdentityScope(type);

    acctTypeDaoConfig = daoConfigMap.get(AcctTypeDao.class).clone();
    acctTypeDaoConfig.initIdentityScope(type);

    accountDao = new AccountDao(accountDaoConfig, this);
    categoryDao = new CategoryDao(categoryDaoConfig, this);
    acctTypeDao = new AcctTypeDao(acctTypeDaoConfig, this);

    registerDao(Account.class, accountDao);
    registerDao(Category.class, categoryDao);
    registerDao(AcctType.class, acctTypeDao);
}
 
Example 4
Source Project: RxJavaApp   Source File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
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);
}
 
Example 5
Source Project: iBeebo   Source File: DaoSession.java    License: GNU General Public License v3.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    green_AccountBeanDaoConfig = daoConfigMap.get(Green_AccountBeanDao.class).clone();
    green_AccountBeanDaoConfig.initIdentityScope(type);

    green_AtUsersBeanDaoConfig = daoConfigMap.get(Green_AtUsersBeanDao.class).clone();
    green_AtUsersBeanDaoConfig.initIdentityScope(type);

    green_TimeLineStatusDaoConfig = daoConfigMap.get(Green_TimeLineStatusDao.class).clone();
    green_TimeLineStatusDaoConfig.initIdentityScope(type);

    green_AccountBeanDao = new Green_AccountBeanDao(green_AccountBeanDaoConfig, this);
    green_AtUsersBeanDao = new Green_AtUsersBeanDao(green_AtUsersBeanDaoConfig, this);
    green_TimeLineStatusDao = new Green_TimeLineStatusDao(green_TimeLineStatusDaoConfig, this);

    registerDao(Green_AccountBean.class, green_AccountBeanDao);
    registerDao(Green_AtUsersBean.class, green_AtUsersBeanDao);
    registerDao(Green_TimeLineStatus.class, green_TimeLineStatusDao);
}
 
Example 6
Source Project: AndroidDatabaseLibraryComparison   Source File: DaoSession.java    License: MIT License 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    simpleAddressItemDaoConfig = daoConfigMap.get(SimpleAddressItemDao.class).clone();
    simpleAddressItemDaoConfig.initIdentityScope(type);

    addressItemDaoConfig = daoConfigMap.get(AddressItemDao.class).clone();
    addressItemDaoConfig.initIdentityScope(type);

    contactDaoConfig = daoConfigMap.get(ContactDao.class).clone();
    contactDaoConfig.initIdentityScope(type);

    addressBookDaoConfig = daoConfigMap.get(AddressBookDao.class).clone();
    addressBookDaoConfig.initIdentityScope(type);

    simpleAddressItemDao = new SimpleAddressItemDao(simpleAddressItemDaoConfig, this);
    addressItemDao = new AddressItemDao(addressItemDaoConfig, this);
    contactDao = new ContactDao(contactDaoConfig, this);
    addressBookDao = new AddressBookDao(addressBookDaoConfig, this);

    registerDao(SimpleAddressItem.class, simpleAddressItemDao);
    registerDao(AddressItem.class, addressItemDao);
    registerDao(Contact.class, contactDao);
    registerDao(AddressBook.class, addressBookDao);
}
 
Example 7
Source Project: NBAPlus   Source File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    greenNewsDaoConfig = daoConfigMap.get(GreenNewsDao.class).clone();
    greenNewsDaoConfig.initIdentityScope(type);

    greenStatDaoConfig = daoConfigMap.get(GreenStatDao.class).clone();
    greenStatDaoConfig.initIdentityScope(type);

    greenNewsDao = new GreenNewsDao(greenNewsDaoConfig, this);
    greenStatDao = new GreenStatDao(greenStatDaoConfig, this);

    registerDao(GreenNews.class, greenNewsDao);
    registerDao(GreenStat.class, greenStatDao);
}
 
Example 8
Source Project: SweetMusicPlayer   Source File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    musicInfoDaoConfig = daoConfigMap.get(MusicInfoDao.class).clone();
    musicInfoDaoConfig.initIdentityScope(type);

    albumInfoDaoConfig = daoConfigMap.get(AlbumInfoDao.class).clone();
    albumInfoDaoConfig.initIdentityScope(type);

    artistInfoDaoConfig = daoConfigMap.get(ArtistInfoDao.class).clone();
    artistInfoDaoConfig.initIdentityScope(type);

    musicInfoDao = new MusicInfoDao(musicInfoDaoConfig, this);
    albumInfoDao = new AlbumInfoDao(albumInfoDaoConfig, this);
    artistInfoDao = new ArtistInfoDao(artistInfoDaoConfig, this);

    registerDao(MusicInfo.class, musicInfoDao);
    registerDao(AlbumInfo.class, albumInfoDao);
    registerDao(ArtistInfo.class, artistInfoDao);
}
 
Example 9
Source Project: SweetMusicPlayer   Source File: DaoSession.java    License: Apache License 2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    musicInfoDaoConfig = daoConfigMap.get(MusicInfoDao.class).clone();
    musicInfoDaoConfig.initIdentityScope(type);

    albumInfoDaoConfig = daoConfigMap.get(AlbumInfoDao.class).clone();
    albumInfoDaoConfig.initIdentityScope(type);

    artistInfoDaoConfig = daoConfigMap.get(ArtistInfoDao.class).clone();
    artistInfoDaoConfig.initIdentityScope(type);

    musicInfoDao = new MusicInfoDao(musicInfoDaoConfig, this);
    albumInfoDao = new AlbumInfoDao(albumInfoDaoConfig, this);
    artistInfoDao = new ArtistInfoDao(artistInfoDaoConfig, this);

    registerDao(MusicInfo.class, musicInfoDao);
    registerDao(AlbumInfo.class, albumInfoDao);
    registerDao(ArtistInfo.class, artistInfoDao);
}
 
Example 10
Source Project: Maps   Source File: DaoSession.java    License: GNU General Public License v2.0 6 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    bJCameraDaoConfig = daoConfigMap.get(BJCameraDao.class).clone();
    bJCameraDaoConfig.initIdentityScope(type);

    poiSearchTipDaoConfig = daoConfigMap.get(PoiSearchTipDao.class).clone();
    poiSearchTipDaoConfig.initIdentityScope(type);

    bJCameraDao = new BJCameraDao(bJCameraDaoConfig, this);
    poiSearchTipDao = new PoiSearchTipDao(poiSearchTipDaoConfig, this);

    registerDao(BJCamera.class, bJCameraDao);
    registerDao(PoiSearchTip.class, poiSearchTipDao);
}
 
Example 11
Source Project: MiBandDecompiled   Source File: DaoConfig.java    License: Apache License 2.0 6 votes vote down vote up
public void initIdentityScope(IdentityScopeType identityscopetype)
{
    if (identityscopetype == IdentityScopeType.None)
    {
        identityScope = null;
        return;
    }
    if (identityscopetype == IdentityScopeType.Session)
    {
        if (keyIsNumeric)
        {
            identityScope = new IdentityScopeLong();
            return;
        } else
        {
            identityScope = new IdentityScopeObject();
            return;
        }
    } else
    {
        throw new IllegalArgumentException((new StringBuilder()).append("Unsupported type: ").append(identityscopetype).toString());
    }
}
 
Example 12
Source Project: AndroidQuick   Source File: DaoSession.java    License: MIT License 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    userDaoConfig = daoConfigMap.get(UserDao.class).clone();
    userDaoConfig.initIdentityScope(type);

    userDao = new UserDao(userDaoConfig, this);

    registerDao(User.class, userDao);
}
 
Example 13
Source Project: DMusic   Source File: AppDB.java    License: Apache License 2.0 5 votes vote down vote up
protected AppDB(Context context) {
    super(context);
    DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(context.getApplicationContext(), "dmusic.db", null);
    db = helper.getWritableDatabase();
    // 注意:该数据库连接属于 DaoMaster,所以多个 Session 指的是相同的数据库连接。
    daoMaster = new DaoMaster(db);
    // GreenDao的Session会将第一次query的结果缓存起来,后面如果调用相同的查询语句则会直接显示缓存的对象
    // 两种解决方式:
    // Type1:每次查询更新的表之前调用一下<daoSession.clear();>清除缓存
    // Type2:初始化时使用无缓存模式
    daoSession = daoMaster.newSession(IdentityScopeType.None);//无缓存模式
    initDaos();
}
 
Example 14
Source Project: Dota2Helper   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    greenNewsDaoConfig = daoConfigMap.get(GreenNewsDao.class).clone();
    greenNewsDaoConfig.initIdentityScope(type);

    greenStrategyDaoConfig = daoConfigMap.get(GreenStrategyDao.class).clone();
    greenStrategyDaoConfig.initIdentityScope(type);

    greenUpdateDaoConfig = daoConfigMap.get(GreenUpdateDao.class).clone();
    greenUpdateDaoConfig.initIdentityScope(type);

    greenVideoDaoConfig = daoConfigMap.get(GreenVideoDao.class).clone();
    greenVideoDaoConfig.initIdentityScope(type);

    greenWatchedVideoDaoConfig = daoConfigMap.get(GreenWatchedVideoDao.class).clone();
    greenWatchedVideoDaoConfig.initIdentityScope(type);

    greenNewsDao = new GreenNewsDao(greenNewsDaoConfig, this);
    greenStrategyDao = new GreenStrategyDao(greenStrategyDaoConfig, this);
    greenUpdateDao = new GreenUpdateDao(greenUpdateDaoConfig, this);
    greenVideoDao = new GreenVideoDao(greenVideoDaoConfig, this);
    greenWatchedVideoDao = new GreenWatchedVideoDao(greenWatchedVideoDaoConfig, this);

    registerDao(GreenNews.class, greenNewsDao);
    registerDao(GreenStrategy.class, greenStrategyDao);
    registerDao(GreenUpdate.class, greenUpdateDao);
    registerDao(GreenVideo.class, greenVideoDao);
    registerDao(GreenWatchedVideo.class, greenWatchedVideoDao);
}
 
Example 15
Source Project: octoandroid   Source File: DaoSession.java    License: GNU General Public License v3.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    printerDbEntityDaoConfig = daoConfigMap.get(PrinterDbEntityDao.class).clone();
    printerDbEntityDaoConfig.initIdentityScope(type);

    printerDbEntityDao = new PrinterDbEntityDao(printerDbEntityDaoConfig, this);

    registerDao(PrinterDbEntity.class, printerDbEntityDao);
}
 
Example 16
Source Project: WaveHeartRate   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    historyEntityDaoConfig = daoConfigMap.get(HistoryEntityDao.class).clone();
    historyEntityDaoConfig.initIdentityScope(type);

    historyEntityDao = new HistoryEntityDao(historyEntityDaoConfig, this);

    registerDao(HistoryEntity.class, historyEntityDao);
}
 
Example 17
Source Project: JianDan_OkHttpWithVolley   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    jokeCacheDaoConfig = daoConfigMap.get(JokeCacheDao.class).clone();
    jokeCacheDaoConfig.initIdentityScope(type);

    freshNewsCacheDaoConfig = daoConfigMap.get(FreshNewsCacheDao.class).clone();
    freshNewsCacheDaoConfig.initIdentityScope(type);

    pictureCacheDaoConfig = daoConfigMap.get(PictureCacheDao.class).clone();
    pictureCacheDaoConfig.initIdentityScope(type);

    sisterCacheDaoConfig = daoConfigMap.get(SisterCacheDao.class).clone();
    sisterCacheDaoConfig.initIdentityScope(type);

    videoCacheDaoConfig = daoConfigMap.get(VideoCacheDao.class).clone();
    videoCacheDaoConfig.initIdentityScope(type);

    jokeCacheDao = new JokeCacheDao(jokeCacheDaoConfig, this);
    freshNewsCacheDao = new FreshNewsCacheDao(freshNewsCacheDaoConfig, this);
    pictureCacheDao = new PictureCacheDao(pictureCacheDaoConfig, this);
    sisterCacheDao = new SisterCacheDao(sisterCacheDaoConfig, this);
    videoCacheDao = new VideoCacheDao(videoCacheDaoConfig, this);

    registerDao(JokeCache.class, jokeCacheDao);
    registerDao(FreshNewsCache.class, freshNewsCacheDao);
    registerDao(PictureCache.class, pictureCacheDao);
    registerDao(SisterCache.class, sisterCacheDao);
    registerDao(VideoCache.class, videoCacheDao);
}
 
Example 18
Source Project: JianDan   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    jokeCacheDaoConfig = daoConfigMap.get(JokeCacheDao.class).clone();
    jokeCacheDaoConfig.initIdentityScope(type);

    freshNewsCacheDaoConfig = daoConfigMap.get(FreshNewsCacheDao.class).clone();
    freshNewsCacheDaoConfig.initIdentityScope(type);

    pictureCacheDaoConfig = daoConfigMap.get(PictureCacheDao.class).clone();
    pictureCacheDaoConfig.initIdentityScope(type);

    sisterCacheDaoConfig = daoConfigMap.get(SisterCacheDao.class).clone();
    sisterCacheDaoConfig.initIdentityScope(type);

    videoCacheDaoConfig = daoConfigMap.get(VideoCacheDao.class).clone();
    videoCacheDaoConfig.initIdentityScope(type);

    jokeCacheDao = new JokeCacheDao(jokeCacheDaoConfig, this);
    freshNewsCacheDao = new FreshNewsCacheDao(freshNewsCacheDaoConfig, this);
    pictureCacheDao = new PictureCacheDao(pictureCacheDaoConfig, this);
    sisterCacheDao = new SisterCacheDao(sisterCacheDaoConfig, this);
    videoCacheDao = new VideoCacheDao(videoCacheDaoConfig, this);

    registerDao(JokeCache.class, jokeCacheDao);
    registerDao(FreshNewsCache.class, freshNewsCacheDao);
    registerDao(PictureCache.class, pictureCacheDao);
    registerDao(SisterCache.class, sisterCacheDao);
    registerDao(VideoCache.class, videoCacheDao);
}
 
Example 19
Source Project: JianDanRxJava   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    jokeCacheDaoConfig = daoConfigMap.get(JokeCacheDao.class).clone();
    jokeCacheDaoConfig.initIdentityScope(type);

    freshNewsCacheDaoConfig = daoConfigMap.get(FreshNewsCacheDao.class).clone();
    freshNewsCacheDaoConfig.initIdentityScope(type);

    pictureCacheDaoConfig = daoConfigMap.get(PictureCacheDao.class).clone();
    pictureCacheDaoConfig.initIdentityScope(type);

    sisterCacheDaoConfig = daoConfigMap.get(SisterCacheDao.class).clone();
    sisterCacheDaoConfig.initIdentityScope(type);

    videoCacheDaoConfig = daoConfigMap.get(VideoCacheDao.class).clone();
    videoCacheDaoConfig.initIdentityScope(type);

    jokeCacheDao = new JokeCacheDao(jokeCacheDaoConfig, this);
    freshNewsCacheDao = new FreshNewsCacheDao(freshNewsCacheDaoConfig, this);
    pictureCacheDao = new PictureCacheDao(pictureCacheDaoConfig, this);
    sisterCacheDao = new SisterCacheDao(sisterCacheDaoConfig, this);
    videoCacheDao = new VideoCacheDao(videoCacheDaoConfig, this);

    registerDao(JokeCache.class, jokeCacheDao);
    registerDao(FreshNewsCache.class, freshNewsCacheDao);
    registerDao(PictureCache.class, pictureCacheDao);
    registerDao(SisterCache.class, sisterCacheDao);
    registerDao(VideoCache.class, videoCacheDao);
}
 
Example 20
Source Project: MiBandDecompiled   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase sqlitedatabase, IdentityScopeType identityscopetype, Map map)
{
    super(sqlitedatabase);
    luaListDaoConfig = ((DaoConfig)map.get(de/greenrobot/daobracelet/LuaListDao)).clone();
    luaListDaoConfig.initIdentityScope(identityscopetype);
    luaZipFileDaoConfig = ((DaoConfig)map.get(de/greenrobot/daobracelet/LuaZipFileDao)).clone();
    luaZipFileDaoConfig.initIdentityScope(identityscopetype);
    luaListDao = new LuaListDao(luaListDaoConfig, this);
    luaZipFileDao = new LuaZipFileDao(luaZipFileDaoConfig, this);
    registerDao(de/greenrobot/daobracelet/LuaList, luaListDao);
    registerDao(de/greenrobot/daobracelet/LuaZipFile, luaZipFileDao);
}
 
Example 21
Source Project: JianDan_OkHttp   Source File: DaoSession.java    License: Apache License 2.0 5 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    jokeCacheDaoConfig = daoConfigMap.get(JokeCacheDao.class).clone();
    jokeCacheDaoConfig.initIdentityScope(type);

    freshNewsCacheDaoConfig = daoConfigMap.get(FreshNewsCacheDao.class).clone();
    freshNewsCacheDaoConfig.initIdentityScope(type);

    pictureCacheDaoConfig = daoConfigMap.get(PictureCacheDao.class).clone();
    pictureCacheDaoConfig.initIdentityScope(type);

    sisterCacheDaoConfig = daoConfigMap.get(SisterCacheDao.class).clone();
    sisterCacheDaoConfig.initIdentityScope(type);

    videoCacheDaoConfig = daoConfigMap.get(VideoCacheDao.class).clone();
    videoCacheDaoConfig.initIdentityScope(type);

    jokeCacheDao = new JokeCacheDao(jokeCacheDaoConfig, this);
    freshNewsCacheDao = new FreshNewsCacheDao(freshNewsCacheDaoConfig, this);
    pictureCacheDao = new PictureCacheDao(pictureCacheDaoConfig, this);
    sisterCacheDao = new SisterCacheDao(sisterCacheDaoConfig, this);
    videoCacheDao = new VideoCacheDao(videoCacheDaoConfig, this);

    registerDao(JokeCache.class, jokeCacheDao);
    registerDao(FreshNewsCache.class, freshNewsCacheDao);
    registerDao(PictureCache.class, pictureCacheDao);
    registerDao(SisterCache.class, sisterCacheDao);
    registerDao(VideoCache.class, videoCacheDao);
}
 
Example 22
Source Project: AndroidQuick   Source File: DaoMaster.java    License: MIT License 4 votes vote down vote up
public DaoSession newSession() {
    return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
 
Example 23
Source Project: JianDan_OkHttp   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DaoSession newSession() {
    return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
 
Example 24
Source Project: FoodOrdering   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DaoSession newSession() {
    return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
 
Example 25
Source Project: FoodOrdering   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DaoSession newSession(IdentityScopeType type) {
    return new DaoSession(db, type, daoConfigMap);
}
 
Example 26
Source Project: FoodOrdering   Source File: DaoSession.java    License: Apache License 2.0 4 votes vote down vote up
public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
        daoConfigMap) {
    super(db);

    weekForeCastDaoConfig = daoConfigMap.get(WeekForeCastDao.class).clone();
    weekForeCastDaoConfig.initIdentityScope(type);

    realWeatherDaoConfig = daoConfigMap.get(RealWeatherDao.class).clone();
    realWeatherDaoConfig.initIdentityScope(type);

    hourForeCastDaoConfig = daoConfigMap.get(HourForeCastDao.class).clone();
    hourForeCastDaoConfig.initIdentityScope(type);

    aqiDaoConfig = daoConfigMap.get(AqiDao.class).clone();
    aqiDaoConfig.initIdentityScope(type);

    zhishuDaoConfig = daoConfigMap.get(ZhishuDao.class).clone();
    zhishuDaoConfig.initIdentityScope(type);

    useAreaDaoConfig = daoConfigMap.get(UseAreaDao.class).clone();
    useAreaDaoConfig.initIdentityScope(type);

    alarmsDaoConfig = daoConfigMap.get(AlarmsDao.class).clone();
    alarmsDaoConfig.initIdentityScope(type);

    weekForeCastDao = new WeekForeCastDao(weekForeCastDaoConfig, this);
    realWeatherDao = new RealWeatherDao(realWeatherDaoConfig, this);
    hourForeCastDao = new HourForeCastDao(hourForeCastDaoConfig, this);
    aqiDao = new AqiDao(aqiDaoConfig, this);
    zhishuDao = new ZhishuDao(zhishuDaoConfig, this);
    useAreaDao = new UseAreaDao(useAreaDaoConfig, this);
    alarmsDao = new AlarmsDao(alarmsDaoConfig, this);

    registerDao(WeekForeCast.class, weekForeCastDao);
    registerDao(RealWeather.class, realWeatherDao);
    registerDao(HourForeCast.class, hourForeCastDao);
    registerDao(Aqi.class, aqiDao);
    registerDao(Zhishu.class, zhishuDao);
    registerDao(UseArea.class, useAreaDao);
    registerDao(Alarms.class, alarmsDao);
}
 
Example 27
Source Project: DMusic   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DaoSession newSession() {
    return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
 
Example 28
Source Project: DMusic   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DaoSession newSession(IdentityScopeType type) {
    return new DaoSession(db, type, daoConfigMap);
}
 
Example 29
Source Project: Expert-Android-Programming   Source File: DaoMaster.java    License: MIT License 4 votes vote down vote up
public DaoSession newSession() {
    return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
 
Example 30
Source Project: Expert-Android-Programming   Source File: DaoMaster.java    License: MIT License 4 votes vote down vote up
public DaoSession newSession(IdentityScopeType type) {
    return new DaoSession(db, type, daoConfigMap);
}