Esempio n. 1
0
 /** @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);
 }