/** @inheritdoc */ @Override protected PicItem readEntity(Cursor cursor, int offset) { PicItem entity = new PicItem( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // picId cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // author cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // authorEmail cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // authorUrl cursor.isNull(offset + 5) ? null : dateConverter.convertToEntityProperty( Timestamp.class, cursor.getLong(offset + 5)), // date cursor.isNull(offset + 6) ? null : cursor.getLong(offset + 6), // votePositive cursor.isNull(offset + 7) ? null : cursor.getLong(offset + 7), // voteNegative cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8), // commentCount cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // threadId cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // content cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // textContent cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // pics cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // picFirst cursor.isNull(offset + 14) ? null : cursor.getLong(offset + 14), // picCount cursor.isNull(offset + 15) ? null : cursor.getShort(offset + 15) != 0 // hasGif ); return entity; }
/** @inheritdoc */ @Override protected FavoItem readEntity(Cursor cursor, int offset) { FavoItem entity = new FavoItem( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.isNull(offset + 1) ? null : typeConverter.convertToEntityProperty( ReaderItemType.class, cursor.getString(offset + 1)), // type cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // actualId cursor.isNull(offset + 3) ? null : addDateConverter.convertToEntityProperty( Timestamp.class, cursor.getLong(offset + 3)), // addDate cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // url cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // title cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // excerpt cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // thumbC cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8), // otherId cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // author cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // authorEmail cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // authorUrl cursor.isNull(offset + 12) ? null : dateConverter.convertToEntityProperty( Timestamp.class, cursor.getLong(offset + 12)), // date cursor.isNull(offset + 13) ? null : cursor.getLong(offset + 13), // votePositive cursor.isNull(offset + 14) ? null : cursor.getLong(offset + 14), // voteNegative cursor.isNull(offset + 15) ? null : cursor.getLong(offset + 15), // commentCount cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // threadId cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // content cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // textContent cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // pics cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // picFirst cursor.isNull(offset + 21) ? null : cursor.getLong(offset + 21), // picCount cursor.isNull(offset + 22) ? null : cursor.getShort(offset + 22) != 0, // hasGif cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // videoThumbnail cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // videoTitle cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // videoDescription cursor.isNull(offset + 26) ? null : cursor.getFloat(offset + 26), // videoDuration cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // videoLink cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // videoPlayer cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29) // videoSource ); return entity; }
/** @inheritdoc */ @Override protected void readEntity(Cursor cursor, FavoItem entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setType( cursor.isNull(offset + 1) ? null : typeConverter.convertToEntityProperty( ReaderItemType.class, cursor.getString(offset + 1))); entity.setActualId(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setAddDate( cursor.isNull(offset + 3) ? null : addDateConverter.convertToEntityProperty( Timestamp.class, cursor.getLong(offset + 3))); entity.setUrl(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setTitle(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setExcerpt(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); entity.setThumbC(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7)); entity.setOtherId(cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8)); entity.setAuthor(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setAuthorEmail(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setAuthorUrl(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); entity.setDate( cursor.isNull(offset + 12) ? null : dateConverter.convertToEntityProperty(Timestamp.class, cursor.getLong(offset + 12))); entity.setVotePositive(cursor.isNull(offset + 13) ? null : cursor.getLong(offset + 13)); entity.setVoteNegative(cursor.isNull(offset + 14) ? null : cursor.getLong(offset + 14)); entity.setCommentCount(cursor.isNull(offset + 15) ? null : cursor.getLong(offset + 15)); entity.setThreadId(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16)); entity.setContent(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17)); entity.setTextContent(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18)); entity.setPics(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19)); entity.setPicFirst(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20)); entity.setPicCount(cursor.isNull(offset + 21) ? null : cursor.getLong(offset + 21)); entity.setHasGif(cursor.isNull(offset + 22) ? null : cursor.getShort(offset + 22) != 0); entity.setVideoThumbnail(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23)); entity.setVideoTitle(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24)); entity.setVideoDescription(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25)); entity.setVideoDuration(cursor.isNull(offset + 26) ? null : cursor.getFloat(offset + 26)); entity.setVideoLink(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27)); entity.setVideoPlayer(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28)); entity.setVideoSource(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29)); }
/** @inheritdoc */ @Override protected void readEntity(Cursor cursor, PicItem entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setPicId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1)); entity.setAuthor(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setAuthorEmail(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setAuthorUrl(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setDate( cursor.isNull(offset + 5) ? null : dateConverter.convertToEntityProperty(Timestamp.class, cursor.getLong(offset + 5))); entity.setVotePositive(cursor.isNull(offset + 6) ? null : cursor.getLong(offset + 6)); entity.setVoteNegative(cursor.isNull(offset + 7) ? null : cursor.getLong(offset + 7)); entity.setCommentCount(cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8)); entity.setThreadId(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setContent(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setTextContent(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); entity.setPics(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12)); entity.setPicFirst(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13)); entity.setPicCount(cursor.isNull(offset + 14) ? null : cursor.getLong(offset + 14)); entity.setHasGif(cursor.isNull(offset + 15) ? null : cursor.getShort(offset + 15) != 0); }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, PicItem entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } Long picId = entity.getPicId(); if (picId != null) { stmt.bindLong(2, picId); } String author = entity.getAuthor(); if (author != null) { stmt.bindString(3, author); } String authorEmail = entity.getAuthorEmail(); if (authorEmail != null) { stmt.bindString(4, authorEmail); } String authorUrl = entity.getAuthorUrl(); if (authorUrl != null) { stmt.bindString(5, authorUrl); } Timestamp date = entity.getDate(); if (date != null) { stmt.bindLong(6, dateConverter.convertToDatabaseValue(date)); } Long votePositive = entity.getVotePositive(); if (votePositive != null) { stmt.bindLong(7, votePositive); } Long voteNegative = entity.getVoteNegative(); if (voteNegative != null) { stmt.bindLong(8, voteNegative); } Long commentCount = entity.getCommentCount(); if (commentCount != null) { stmt.bindLong(9, commentCount); } String threadId = entity.getThreadId(); if (threadId != null) { stmt.bindString(10, threadId); } String content = entity.getContent(); if (content != null) { stmt.bindString(11, content); } String textContent = entity.getTextContent(); if (textContent != null) { stmt.bindString(12, textContent); } String pics = entity.getPics(); if (pics != null) { stmt.bindString(13, pics); } String picFirst = entity.getPicFirst(); if (picFirst != null) { stmt.bindString(14, picFirst); } Long picCount = entity.getPicCount(); if (picCount != null) { stmt.bindLong(15, picCount); } Boolean hasGif = entity.getHasGif(); if (hasGif != null) { stmt.bindLong(16, hasGif ? 1L : 0L); } }
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, FavoItem entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } ReaderItemType type = entity.getType(); if (type != null) { stmt.bindString(2, typeConverter.convertToDatabaseValue(type)); } String actualId = entity.getActualId(); if (actualId != null) { stmt.bindString(3, actualId); } Timestamp addDate = entity.getAddDate(); if (addDate != null) { stmt.bindLong(4, addDateConverter.convertToDatabaseValue(addDate)); } String url = entity.getUrl(); if (url != null) { stmt.bindString(5, url); } String title = entity.getTitle(); if (title != null) { stmt.bindString(6, title); } String excerpt = entity.getExcerpt(); if (excerpt != null) { stmt.bindString(7, excerpt); } String thumbC = entity.getThumbC(); if (thumbC != null) { stmt.bindString(8, thumbC); } Long otherId = entity.getOtherId(); if (otherId != null) { stmt.bindLong(9, otherId); } String author = entity.getAuthor(); if (author != null) { stmt.bindString(10, author); } String authorEmail = entity.getAuthorEmail(); if (authorEmail != null) { stmt.bindString(11, authorEmail); } String authorUrl = entity.getAuthorUrl(); if (authorUrl != null) { stmt.bindString(12, authorUrl); } Timestamp date = entity.getDate(); if (date != null) { stmt.bindLong(13, dateConverter.convertToDatabaseValue(date)); } Long votePositive = entity.getVotePositive(); if (votePositive != null) { stmt.bindLong(14, votePositive); } Long voteNegative = entity.getVoteNegative(); if (voteNegative != null) { stmt.bindLong(15, voteNegative); } Long commentCount = entity.getCommentCount(); if (commentCount != null) { stmt.bindLong(16, commentCount); } String threadId = entity.getThreadId(); if (threadId != null) { stmt.bindString(17, threadId); } String content = entity.getContent(); if (content != null) { stmt.bindString(18, content); } String textContent = entity.getTextContent(); if (textContent != null) { stmt.bindString(19, textContent); } String pics = entity.getPics(); if (pics != null) { stmt.bindString(20, pics); } String picFirst = entity.getPicFirst(); if (picFirst != null) { stmt.bindString(21, picFirst); } Long picCount = entity.getPicCount(); if (picCount != null) { stmt.bindLong(22, picCount); } Boolean hasGif = entity.getHasGif(); if (hasGif != null) { stmt.bindLong(23, hasGif ? 1L : 0L); } String videoThumbnail = entity.getVideoThumbnail(); if (videoThumbnail != null) { stmt.bindString(24, videoThumbnail); } String videoTitle = entity.getVideoTitle(); if (videoTitle != null) { stmt.bindString(25, videoTitle); } String videoDescription = entity.getVideoDescription(); if (videoDescription != null) { stmt.bindString(26, videoDescription); } Float videoDuration = entity.getVideoDuration(); if (videoDuration != null) { stmt.bindDouble(27, videoDuration); } String videoLink = entity.getVideoLink(); if (videoLink != null) { stmt.bindString(28, videoLink); } String videoPlayer = entity.getVideoPlayer(); if (videoPlayer != null) { stmt.bindString(29, videoPlayer); } String videoSource = entity.getVideoSource(); if (videoSource != null) { stmt.bindString(30, videoSource); } }