예제 #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());
  }
예제 #2
0
 /** @inheritdoc */
 @Override
 public String getKey(Trip entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
예제 #3
0
 /** @inheritdoc */
 @Override
 protected String updateKeyAfterInsert(Trip entity, long rowId) {
   return entity.getId();
 }
예제 #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));
 }