public final class Utils
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DISCONNECTION_SQL_CODE_PREFIX |
Any SQL_STATE starting with this value is considered a fatal disconnect
|
static java.util.Set<java.lang.String> |
DISCONNECTION_SQL_CODES |
SQL codes of fatal connection errors.
|
static boolean |
IS_SECURITY_ENABLED |
Modifier and Type | Method | Description |
---|---|---|
static void |
closeQuietly(java.sql.Connection conn) |
Closes the Connection (which may be null).
|
static void |
closeQuietly(java.sql.ResultSet rset) |
Closes the ResultSet (which may be null).
|
static void |
closeQuietly(java.sql.Statement stmt) |
Closes the Statement (which may be null).
|
static java.lang.String |
getMessage(java.lang.String key) |
Obtain the correct i18n message for the given key.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.Object... args) |
Obtain the correct i18n message for the given key with placeholders
replaced by the supplied arguments.
|
public static final boolean IS_SECURITY_ENABLED
public static final java.lang.String DISCONNECTION_SQL_CODE_PREFIX
public static final java.util.Set<java.lang.String> DISCONNECTION_SQL_CODES
public static void closeQuietly(java.sql.ResultSet rset)
rset
- a ResultSet, may be null
public static void closeQuietly(java.sql.Connection conn)
conn
- a Connection, may be null
public static void closeQuietly(java.sql.Statement stmt)
stmt
- a Statement, may be null
public static java.lang.String getMessage(java.lang.String key)
key
- The message keypublic static java.lang.String getMessage(java.lang.String key, java.lang.Object... args)
key
- The message keyargs
- The argumentsCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.