Java源码示例:com.socks.greendao.VideoCache
示例1
/** @inheritdoc */
@Override
protected void bindValues(SQLiteStatement stmt, VideoCache entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
String result = entity.getResult();
if (result != null) {
stmt.bindString(2, result);
}
Integer page = entity.getPage();
if (page != null) {
stmt.bindLong(3, page);
}
Long time = entity.getTime();
if (time != null) {
stmt.bindLong(4, time);
}
}
示例2
/** @inheritdoc */
@Override
protected void bindValues(SQLiteStatement stmt, VideoCache entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
String result = entity.getResult();
if (result != null) {
stmt.bindString(2, result);
}
Integer page = entity.getPage();
if (page != null) {
stmt.bindLong(3, page);
}
Long time = entity.getTime();
if (time != null) {
stmt.bindLong(4, time);
}
}
示例3
/** @inheritdoc */
@Override
protected void bindValues(SQLiteStatement stmt, VideoCache entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
String result = entity.getResult();
if (result != null) {
stmt.bindString(2, result);
}
Integer page = entity.getPage();
if (page != null) {
stmt.bindLong(3, page);
}
Long time = entity.getTime();
if (time != null) {
stmt.bindLong(4, time);
}
}
示例4
/** @inheritdoc */
@Override
protected void bindValues(SQLiteStatement stmt, VideoCache entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
String result = entity.getResult();
if (result != null) {
stmt.bindString(2, result);
}
Integer page = entity.getPage();
if (page != null) {
stmt.bindLong(3, page);
}
Long time = entity.getTime();
if (time != null) {
stmt.bindLong(4, time);
}
}
示例5
/** @inheritdoc */
@Override
public VideoCache readEntity(Cursor cursor, int offset) {
VideoCache entity = new VideoCache( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // result
cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // page
cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3) // time
);
return entity;
}
示例6
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, VideoCache entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setResult(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setPage(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
entity.setTime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
}
示例7
/** @inheritdoc */
@Override
public Long getKey(VideoCache entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
示例8
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);
}
示例9
/** @inheritdoc */
@Override
public VideoCache readEntity(Cursor cursor, int offset) {
VideoCache entity = new VideoCache( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // result
cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // page
cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3) // time
);
return entity;
}
示例10
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, VideoCache entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setResult(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setPage(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
entity.setTime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
}
示例11
/** @inheritdoc */
@Override
public Long getKey(VideoCache entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
示例12
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);
}
示例13
/** @inheritdoc */
@Override
public VideoCache readEntity(Cursor cursor, int offset) {
VideoCache entity = new VideoCache( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // result
cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // page
cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3) // time
);
return entity;
}
示例14
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, VideoCache entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setResult(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setPage(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
entity.setTime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
}
示例15
/** @inheritdoc */
@Override
public Long getKey(VideoCache entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
示例16
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);
}
示例17
/** @inheritdoc */
@Override
public VideoCache readEntity(Cursor cursor, int offset) {
VideoCache entity = new VideoCache( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // result
cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // page
cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3) // time
);
return entity;
}
示例18
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, VideoCache entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setResult(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setPage(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
entity.setTime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
}
示例19
/** @inheritdoc */
@Override
public Long getKey(VideoCache entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
示例20
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);
}
示例21
/** @inheritdoc */
@Override
protected Long updateKeyAfterInsert(VideoCache entity, long rowId) {
entity.setId(rowId);
return rowId;
}
示例22
/** @inheritdoc */
@Override
protected Long updateKeyAfterInsert(VideoCache entity, long rowId) {
entity.setId(rowId);
return rowId;
}
示例23
/** @inheritdoc */
@Override
protected Long updateKeyAfterInsert(VideoCache entity, long rowId) {
entity.setId(rowId);
return rowId;
}
示例24
/** @inheritdoc */
@Override
protected Long updateKeyAfterInsert(VideoCache entity, long rowId) {
entity.setId(rowId);
return rowId;
}