• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PictureCacheDao类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.socks.greendao.PictureCacheDao的典型用法代码示例。如果您正苦于以下问题:Java PictureCacheDao类的具体用法?Java PictureCacheDao怎么用?Java PictureCacheDao使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

PictureCacheDao类属于com.socks.greendao包,在下文中一共展示了PictureCacheDao类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getCacheByPage

点赞 3

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
/**
 * 根据页码获取缓存数据
 *
 * @param page
 * @return
 */
@Override
public ArrayList<Picture> getCacheByPage(int page) {

	QueryBuilder<com.socks.greendao.PictureCache> query = mPictureCacheDao.queryBuilder().where(PictureCacheDao
			.Properties.Page.eq("" + page));

	if (query.list().size() > 0) {
		return (ArrayList<Picture>) JSONParser.toObject(query.list().get(0).getResult(),
				new TypeToken<ArrayList<Picture>>() {
				}.getType());
	} else {
		return new ArrayList<Picture>();
	}

}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDan_OkHttpWithVolley,
代码行数:22,
代码来源:PictureCache.java

示例2: getCacheByPage

点赞 3

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
/**
 * 根据页码获取缓存数据
 *
 * @param page
 * @return
 */
@Override
public ArrayList<Picture> getCacheByPage(int page) {

	QueryBuilder<com.socks.greendao.PictureCache> query = mPictureCacheDao.queryBuilder().where(PictureCacheDao
			.Properties.Page.eq("" + page));

	if (query.list().size() > 0) {
		return (ArrayList<Picture>) JSONParser.toObject(query.list().get(0).getResult(),
				new TypeToken<ArrayList<Picture>>() {
				}.getType());
	} else {
		return new ArrayList<>();
	}

}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDanRxJava,
代码行数:22,
代码来源:PictureCache.java

示例3: createAllTables

点赞 2

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
/** Creates underlying database table using DAOs. */
public static void createAllTables(SQLiteDatabase db, boolean ifNotExists) {
    JokeCacheDao.createTable(db, ifNotExists);
    FreshNewsCacheDao.createTable(db, ifNotExists);
    PictureCacheDao.createTable(db, ifNotExists);
    SisterCacheDao.createTable(db, ifNotExists);
    VideoCacheDao.createTable(db, ifNotExists);
}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDan_OkHttpWithVolley,
代码行数:9,
代码来源:DaoMaster.java

示例4: dropAllTables

点赞 2

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
/** Drops underlying database table using DAOs. */
public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {
    JokeCacheDao.dropTable(db, ifExists);
    FreshNewsCacheDao.dropTable(db, ifExists);
    PictureCacheDao.dropTable(db, ifExists);
    SisterCacheDao.dropTable(db, ifExists);
    VideoCacheDao.dropTable(db, ifExists);
}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDan_OkHttpWithVolley,
代码行数:9,
代码来源:DaoMaster.java

示例5: DaoMaster

点赞 2

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
public DaoMaster(SQLiteDatabase db) {
    super(db, SCHEMA_VERSION);
    registerDaoClass(JokeCacheDao.class);
    registerDaoClass(FreshNewsCacheDao.class);
    registerDaoClass(PictureCacheDao.class);
    registerDaoClass(SisterCacheDao.class);
    registerDaoClass(VideoCacheDao.class);
}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDan_OkHttpWithVolley,
代码行数:9,
代码来源:DaoMaster.java

示例6: DaoSession

点赞 2

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
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);
}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDan_OkHttpWithVolley,
代码行数:32,
代码来源:DaoSession.java

示例7: getPictureCacheDao

点赞 2

import com.socks.greendao.PictureCacheDao; //导入依赖的package包/类
public PictureCacheDao getPictureCacheDao() {
    return pictureCacheDao;
}
 

开发者ID:ZhaoKaiQiang,
项目名称:JianDan_OkHttpWithVolley,
代码行数:4,
代码来源:DaoSession.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)