List of utility methods to do SQL PreparedStatement
void | writeMap(Connection connection, PreparedStatement preparedStatement, int keyColumn, int valueColumn, Class write Map List<K> keys = new ArrayList<>(map.keySet()); List<V> values = new ArrayList<>(); for (K key : keys) { values.add(map.get(key)); @SuppressWarnings("unchecked") K[] keyArray = (K[]) keys.toArray(); @SuppressWarnings("unchecked") ... |
void | writeProperties(Connection connection, PreparedStatement preparedStatement, int keyColumn, int valueColumn, Properties properties) write Properties List<Object> keys = new ArrayList<>(properties.keySet()); List<Object> values = new ArrayList<>(); for (Object key : keys) { values.add(properties.get(key)); writeArray(connection, preparedStatement, keyColumn, Object.class, keys.toArray()); writeArray(connection, preparedStatement, valueColumn, Object.class, values.toArray()); |