Beispiel #1
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, Trip entity) {
    stmt.clearBindings();

    String id = entity.getId();
    if (id != null) {
      stmt.bindString(1, id);
    }
    stmt.bindString(2, entity.getRouteId());
  }
Beispiel #2
0
 /** @inheritdoc */
 @Override
 public String getKey(Trip entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
Beispiel #3
0
 /** @inheritdoc */
 @Override
 protected String updateKeyAfterInsert(Trip entity, long rowId) {
   return entity.getId();
 }
Beispiel #4
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Trip entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
   entity.setRouteId(cursor.getString(offset + 1));
 }