/** @inheritdoc */ @Override public void readEntity(Cursor cursor, Person entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setName(cursor.getString(offset + 1)); entity.setAge(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2)); entity.setHeight(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3)); entity.setIntroduction(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); }
/** @inheritdoc */ @Override protected Long updateKeyAfterInsert(Person entity, long rowId) { entity.setId(rowId); return rowId; }