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

    Long id = entity.getId();
    if (id != null) {
      stmt.bindLong(1, id);
    }

    String name = entity.getName();
    if (name != null) {
      stmt.bindString(2, name);
    }
  }