Ejemplo n.º 1
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, stepbean entity) {
    stmt.clearBindings();

    String day = entity.getDay();
    if (day != null) {
      stmt.bindString(1, day);
    }

    Long bengin = entity.getBengin();
    if (bengin != null) {
      stmt.bindLong(2, bengin);
    }

    Long end = entity.getEnd();
    if (end != null) {
      stmt.bindLong(3, end);
    }

    Integer stepcount = entity.getStepcount();
    if (stepcount != null) {
      stmt.bindLong(4, stepcount);
    }

    Integer source = entity.getSource();
    if (source != null) {
      stmt.bindLong(5, source);
    }
  }
Ejemplo n.º 2
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, stepbean entity, int offset) {
   entity.setDay(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
   entity.setBengin(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
   entity.setEnd(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
   entity.setStepcount(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
   entity.setSource(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
 }