Code example for SQLiteStatement

Methods: bindLong

0
    int columnIndex = cursor.getColumnIndexOrThrow(key);
 
    if (cursor.isNull(columnIndex)) {
      statement.bindNull(index);
    } else { 
      statement.bindLong(index, cursor.getLong(columnIndex));
    } 
  } 
 
  private static void getContentValuesForRow(Context context, MasterSecret masterSecret,
                                             Cursor cursor, long threadId,
                                             SQLiteStatement statement)
  { 
    addStringToStatement(statement, cursor, 1, SmsDatabase.ADDRESS);
    addIntToStatement(statement, cursor, 2, SmsDatabase.PERSON);
    addIntToStatement(statement, cursor, 3, SmsDatabase.DATE_RECEIVED);
    addIntToStatement(statement, cursor, 4, SmsDatabase.DATE_RECEIVED);
    addIntToStatement(statement, cursor, 5, SmsDatabase.PROTOCOL);
    addIntToStatement(statement, cursor, 6, SmsDatabase.READ);
    addIntToStatement(statement, cursor, 7, SmsDatabase.STATUS);
    addIntToStatement(statement, cursor, 8, SmsDatabase.TYPE);