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

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

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

    String tableName = entity.getTableName();
    if (tableName != null) {
      stmt.bindString(3, tableName);
    }

    Long rootpage = entity.getRootpage();
    if (rootpage != null) {
      stmt.bindLong(4, rootpage);
    }

    String sql = entity.getSql();
    if (sql != null) {
      stmt.bindString(5, sql);
    }
  }
 /**
  * Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching
  * execute() must have already have been called.
  *
  * @param index the index of the slot to which to bind
  * @param value the value to bind
  */
 public void bind(int index, String value) {
   if (value == null) {
     mPreparedStatement.bindNull(index);
   } else {
     mPreparedStatement.bindString(index, value);
   }
 }