public class JDBCUtils extends Object
Constructor and Description |
---|
JDBCUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
getJDBCTypeForName(String typeName)
Method to return the type given the "jdbc-type" name.
|
static int[] |
getJDBCTypes()
Accessor for the JDBC types.
|
static String |
getNameForJDBCType(int jdbcType)
Accessor for a string name of a JDBC Type
|
static String |
getSubprotocolForURL(String url)
Method to return the "subprotocol" for a JDBC URL.
|
static void |
logWarnings(Connection conn)
Utility to log all warning for the specified Connection.
|
static void |
logWarnings(ResultSet rs)
Utility to log all warning for the specified ResultSet.
|
static void |
logWarnings(SQLWarning warning)
Logs SQL warnings to the common log.
|
static void |
logWarnings(Statement stmt)
Utility to log all warning for the specified Statement.
|
public static final int[] getJDBCTypes()
public static String getNameForJDBCType(int jdbcType)
jdbcType
- The JDBC Typepublic static int getJDBCTypeForName(String typeName)
typeName
- "jdbc-type" namepublic static String getSubprotocolForURL(String url)
url
- The JDBC URLpublic static void logWarnings(SQLWarning warning)
warning
- the value returned from getWarnings().public static void logWarnings(Connection conn)
conn
- The connection to the datastorepublic static void logWarnings(Statement stmt)
stmt
- The statementpublic static void logWarnings(ResultSet rs)
rs
- The ResultSetCopyright © 2014. All rights reserved.