Exemple #1
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, DBGroupThread entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setLights(cursor.isNull(offset + 1) ? null : cursor.getInt(offset + 1));
   entity.setUsername(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setCreateAtUnixTime(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
   entity.setTitle(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
   entity.setNote(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
   entity.setReplies(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
   entity.setTid(cursor.isNull(offset + 7) ? null : cursor.getInt(offset + 7));
   entity.setServerId(cursor.isNull(offset + 8) ? null : cursor.getLong(offset + 8));
   entity.setUserId(cursor.isNull(offset + 9) ? null : cursor.getLong(offset + 9));
   entity.setCoverId(cursor.isNull(offset + 10) ? null : cursor.getLong(offset + 10));
   entity.setGroupId(cursor.isNull(offset + 11) ? null : cursor.getLong(offset + 11));
 }
Exemple #2
0
 /** @inheritdoc */
 @Override
 protected Long updateKeyAfterInsert(DBGroupThread entity, long rowId) {
   entity.setId(rowId);
   return rowId;
 }