- java.lang.Object
-
- com.appslandia.common.jdbc.JdbcUtils
-
-
Constructor Summary
Constructors Constructor Description JdbcUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseQuietly(AutoCloseable closeable)static <T> List<T>executeList(ResultSetImpl rs, ResultSetMapper<T> mapper, List<T> list)static <T> List<T>executeList(StatementImpl stat, ResultSetMapper<T> mapper, List<T> list)static <K,V>
Map<K,V>executeMap(ResultSetImpl rs, ResultSetMapper<K> keyMapper, ResultSetMapper<V> valueMapper, Map<K,V> map)static <K,V>
Map<K,V>executeMap(StatementImpl stat, ResultSetMapper<K> keyMapper, ResultSetMapper<V> valueMapper, Map<K,V> map)static <K,V>
Map<K,V>executeMap(StatementImpl stat, String keyColumn, String valueColumn, Map<K,V> map)static <K,V>
Map<K,V>executeMap(ResultSet rs, String keyColumn, String valueColumn, Map<K,V> map)static <T> TexecuteSingle(ResultSetImpl rs, ResultSetMapper<T> mapper)static <T> TexecuteSingle(StatementImpl stat, ResultSetMapper<T> mapper)static String[]getColumnLabels(ResultSet rs)static voidrollback(Connection conn)static voidsetAutoCommit(Connection conn)
-
-
-
Method Detail
-
rollback
public static void rollback(Connection conn) throws SQLException
- Throws:
SQLException
-
setAutoCommit
public static void setAutoCommit(Connection conn) throws SQLException
- Throws:
SQLException
-
closeQuietly
public static void closeQuietly(AutoCloseable closeable)
-
executeSingle
public static <T> T executeSingle(StatementImpl stat, ResultSetMapper<T> mapper) throws SQLException
- Throws:
SQLException
-
executeSingle
public static <T> T executeSingle(ResultSetImpl rs, ResultSetMapper<T> mapper) throws SQLException
- Throws:
SQLException
-
executeList
public static <T> List<T> executeList(StatementImpl stat, ResultSetMapper<T> mapper, List<T> list) throws SQLException
- Throws:
SQLException
-
executeList
public static <T> List<T> executeList(ResultSetImpl rs, ResultSetMapper<T> mapper, List<T> list) throws SQLException
- Throws:
SQLException
-
executeMap
public static <K,V> Map<K,V> executeMap(StatementImpl stat, String keyColumn, String valueColumn, Map<K,V> map) throws SQLException
- Throws:
SQLException
-
executeMap
public static <K,V> Map<K,V> executeMap(ResultSet rs, String keyColumn, String valueColumn, Map<K,V> map) throws SQLException
- Throws:
SQLException
-
executeMap
public static <K,V> Map<K,V> executeMap(StatementImpl stat, ResultSetMapper<K> keyMapper, ResultSetMapper<V> valueMapper, Map<K,V> map) throws SQLException
- Throws:
SQLException
-
executeMap
public static <K,V> Map<K,V> executeMap(ResultSetImpl rs, ResultSetMapper<K> keyMapper, ResultSetMapper<V> valueMapper, Map<K,V> map) throws SQLException
- Throws:
SQLException
-
getColumnLabels
public static String[] getColumnLabels(ResultSet rs) throws SQLException
- Throws:
SQLException
-
-