@UtilityMarker public final class DatabaseUtility extends Object
| Modifier and Type | Method and Description |
|---|---|
static Connection |
checkConnection(Connection connection) |
static ResultSet |
checkResultSet(ResultSet resultSet) |
static Statement |
createStatement(Connection connection) |
static ResultSet |
executeSql(Statement statement,
String sql) |
static long |
executeSqlForLong(Connection connection,
String sql) |
static Object |
executeSqlForScalar(Connection connection,
String sql) |
static void |
logSQLWarnings(ResultSet resultSet) |
static void |
logSQLWarnings(Statement statement) |
static List<String> |
readResultsVector(ResultSet results)
Reads a single column result set as a list.
|
public static Connection checkConnection(Connection connection) throws SQLException
SQLExceptionpublic static ResultSet checkResultSet(ResultSet resultSet) throws SQLException
SQLExceptionpublic static Statement createStatement(Connection connection) throws SQLException
SQLExceptionpublic static ResultSet executeSql(Statement statement, String sql) throws SQLException
SQLExceptionpublic static long executeSqlForLong(Connection connection, String sql) throws SQLException
SQLExceptionpublic static Object executeSqlForScalar(Connection connection, String sql) throws SQLException
SQLExceptionpublic static void logSQLWarnings(ResultSet resultSet)
public static void logSQLWarnings(Statement statement)
public static List<String> readResultsVector(ResultSet results) throws SQLException
results - Result setSQLException - On an exceptionCopyright © 2000-2022 Sualeh Fatehi. All rights reserved.