List of utility methods to do SQL PreparedStatement
void | setValue(PreparedStatement ps, int paramIndex, Object inValue) set Value setValue(ps, paramIndex, 2, inValue); |
boolean | setValue(PreparedStatement ps, int posicion, int tipo, String strDefault, String strValor) set Value try { if (strValor == null) { strValor = strDefault; if (strValor != null) { if (strValor.compareTo("") == 0) ps.setNull(posicion, tipo); else { ... |
void | setValueIndex(PreparedStatement stmt, int index, int valueIndex) set Value Index stmt.setInt(index, valueIndex); |
void | setValues(PreparedStatement preparedStatement, Object... values) See comments on #preparePlaceHolders(int) for (int i = 0; i < values.length; i++) { preparedStatement.setObject(i + 1, values[i]); |
boolean | setValues(PreparedStatement statement, Object... values) set Values if (values != null) { for (int i = 0; i < values.length; ++i) { try { statement.setObject(i, values[i]); } catch (SQLException e) { return false; return true; |
void | setValues(PreparedStatement statement, Object... values) Set the given parameter values in the given PreparedStatement. for (int i = 0; i < values.length; i++) { statement.setObject(i + 1, values[i]); |
void | setValues(PreparedStatement statement, Object[] values) set Values for (int i = 0; i < values.length; i++) { statement.setObject(i + 1, values[i]); |
void | substitute(PreparedStatement stmt, Object[] params) Substitute prepared stmt query parameters for (int i = 0; i < params.length; ++i) { stmt.setObject(i + 1, params[i]); |
void | writeArray(Connection connection, PreparedStatement preparedStatement, int column, Class write Array if (type == String.class) { java.sql.Array sqlArray = connection.createArrayOf("VARCHAR", array); preparedStatement.setArray(column, sqlArray); } else { throw new IllegalArgumentException("Type '" + type.getName() + "' is not supported."); |
void | writeList(Connection connection, PreparedStatement preparedStatement, int column, Class write List @SuppressWarnings("unchecked")
T[] array = (T[]) list.toArray();
writeArray(connection, preparedStatement, column, type, array);
|