code: public static String buildSqlINSERT(String tableName, String[] columnNames, Object[] values) {
          if (columnNames.length != values.length) {
              throw new IllegalArgumentException(
                      "Number of columns must be equal to number of values.");
          }
          final String SQL_TEMPLATE = "INSERT INTO {0} ({1}) VALUES ({2})";
          final String SQL_PART_COLUMNS = StringUtils.join(columnNames, ',');
          final StringBuilder SQL_PART_VALUES = new StringBuilder();
          for (int i = 0; i < values.length; i++) {
              if (values[i] instanceof ParamExpression) {
                  SQL_PART_VALUES.append(((ParamExpression) values[i]).getExpression());
              } else {
                  SQL_PART_VALUES.append('?');
              }
              if (i < values.length - 1) {
                  SQL_PART_VALUES.append(',');
              }
          }
          return MessageFormat.format(SQL_TEMPLATE, tableName, SQL_PART_COLUMNS, SQL_PART_VALUES);
      }
docs: Builds an INSERT statement (used for {@link PreparedStatement}).
  
  @param tableName
  @param columnNames
  @param values
  @return