/** @inheritdoc */
 @Override
 public Long getKey(AutoincrementEntity entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, AutoincrementEntity entity) {
    stmt.clearBindings();

    Long id = entity.getId();
    if (id != null) {
      stmt.bindLong(1, id);
    }
  }
 /** @inheritdoc */
 @Override
 protected Long updateKeyAfterInsert(AutoincrementEntity entity, long rowId) {
   entity.setId(rowId);
   return rowId;
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, AutoincrementEntity entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
 }