Пример #1
0
  @Override
  public void run(UpdateCallback callback) {
    RowInsertionBuilder insertBuilder = callback.insertInto(getTable());

    final Column[] columns = getColumns();
    final Object[] values = getValues();
    final Style[] styles = getStyles();
    final boolean[] explicitNulls = getExplicitNulls();

    for (int i = 0; i < columns.length; i++) {
      Object value = values[i];
      Column column = columns[i];
      Style style = styles[i];
      if (value == null) {
        if (explicitNulls[i]) {
          insertBuilder = insertBuilder.value(column, value, style);
        }
      } else {
        insertBuilder = insertBuilder.value(column, value, style);
      }
    }

    insertBuilder.execute();
  }