|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.utils.JDBCUtils
public final class JDBCUtils
This class contains static utility methods for working with JDBC.
| Constructor Summary | |
|---|---|
JDBCUtils()
|
|
| Method Summary | |
|---|---|
static void |
close(java.sql.Connection conn)
Close the object, suppress all errors/exceptions. |
static void |
close(java.sql.ResultSet resultSet)
Close the object, suppress all errors/exceptions. |
static void |
close(java.sql.ResultSet rs,
java.sql.Statement stmt,
java.sql.Connection conn,
org.slf4j.Logger log)
Tries to close each object from a ResultSet, Statement, Connection triple. |
static void |
close(java.sql.Statement stmt)
Close the object, suppress all errors/exceptions. |
static java.lang.String |
getMessage(java.sql.SQLException e)
|
static void |
log(java.sql.SQLException e,
org.slf4j.Logger log)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDBCUtils()
| Method Detail |
|---|
public static void log(java.sql.SQLException e,
org.slf4j.Logger log)
public static java.lang.String getMessage(java.sql.SQLException e)
public static void close(java.sql.Connection conn)
conn - public static void close(java.sql.ResultSet resultSet)
resultSet - public static void close(java.sql.Statement stmt)
stmt -
public static void close(java.sql.ResultSet rs,
java.sql.Statement stmt,
java.sql.Connection conn,
org.slf4j.Logger log)
ResultSet, Statement, Connection triple.
Useful for cleaning up in finally clauses.
rs - ResultSet to be closedstmt - Statement to be closedconn - Connection to be closedlog - used to log error messages, may be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||