|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.darkmist.alib.db.DbCloser
public class DbCloser
Static methods to convinently close JDBC objects.
| Method Summary | |
|---|---|
static Connection |
close(Connection conn)
Handle closing a connection. |
static Connection |
close(Connection conn,
org.slf4j.Logger logExceptionTo)
Handle closing a connection. |
static Connection |
close(Connection conn,
org.slf4j.Logger logExceptionTo,
Object name)
Handle closing a connection. |
static PreparedStatement |
close(PreparedStatement stmt)
Handle closing a prepared statment. |
static PreparedStatement |
close(PreparedStatement stmt,
org.slf4j.Logger logExceptionTo)
Handle closing a prepared statment. |
static PreparedStatement |
close(PreparedStatement stmt,
org.slf4j.Logger logExceptionTo,
Object name)
Handle closing a prepared statment. |
static ResultSet |
close(ResultSet rs)
Handle closing a result set. |
static ResultSet |
close(ResultSet rs,
org.slf4j.Logger logExceptionTo)
Handle closing a result set. |
static ResultSet |
close(ResultSet rs,
org.slf4j.Logger logExceptionTo,
Object name)
Handle closing a result set. |
static ResultSet |
close(ResultSet rs,
PreparedStatement stmt)
Handle closing a result set and a prepared statment. |
static ResultSet |
close(ResultSet rs,
PreparedStatement stmt,
Connection conn)
Handle closing a result set and a prepared statment. |
static ResultSet |
close(ResultSet rs,
PreparedStatement stmt,
Connection conn,
org.slf4j.Logger logExceptionTo)
Handle closing a result set and a prepared statment. |
static ResultSet |
close(ResultSet rs,
PreparedStatement stmt,
Connection conn,
org.slf4j.Logger logExceptionTo,
Object name)
Handle closing a result set and a prepared statment. |
static ResultSet |
close(ResultSet rs,
PreparedStatement stmt,
org.slf4j.Logger logExceptionTo)
Handle closing a result set and a prepared statment. |
static ResultSet |
close(ResultSet rs,
PreparedStatement stmt,
org.slf4j.Logger logExceptionTo,
Object name)
Handle closing a result set and a prepared statment. |
static Statement |
close(Statement stmt)
Handle closing a statment. |
static Statement |
close(Statement stmt,
org.slf4j.Logger logExceptionTo)
Handle closing a statment. |
static Statement |
close(Statement stmt,
org.slf4j.Logger logExceptionTo,
Object name)
Handle closing a statment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Statement close(Statement stmt,
org.slf4j.Logger logExceptionTo,
Object name)
stmt - The statement to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.name - Object to call Object.toString() on to
name the object closed for any logged exception. If this is null
stmt.toString() will be used.
public static Statement close(Statement stmt,
org.slf4j.Logger logExceptionTo)
close(Statement,Logger,Object) with null for the name
stmt - The statement to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.
public static Statement close(Statement stmt)
close(Statement,Logger,Object) with null for
logExceptionTo and name
stmt - The statement to close.
public static PreparedStatement close(PreparedStatement stmt,
org.slf4j.Logger logExceptionTo,
Object name)
stmt - The statement to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.name - Object to call Object.toString() on to
name the object closed for any logged exception. If this is null
stmt.toString() will be used.
public static PreparedStatement close(PreparedStatement stmt,
org.slf4j.Logger logExceptionTo)
close(PreparedStatement,Logger,Object) with null for
the name.
stmt - The statement to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.public static PreparedStatement close(PreparedStatement stmt)
close(PreparedStatement,Logger,Object) with null for
logExceptionTo and name.
stmt - The statement to close.
public static ResultSet close(ResultSet rs,
org.slf4j.Logger logExceptionTo,
Object name)
rs - The result set to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.name - Object to call Object.toString() on to
name the object closed for any logged exception. If this is null
rs.toString() will be used.
public static ResultSet close(ResultSet rs,
org.slf4j.Logger logExceptionTo)
close(ResultSet,Logger,Object) with null for name.
rs - The result set to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.
public static ResultSet close(ResultSet rs)
close(ResultSet,Logger,Object) with null for
logExceptionTo and name
rs - The result set to close.
public static ResultSet close(ResultSet rs,
PreparedStatement stmt,
org.slf4j.Logger logExceptionTo,
Object name)
close(ResultSet,Logger,Object) followed by
close(PreparedStatement,Logger,Object).
rs - The result set to close.stmt - The statement to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.name - Object to call Object.toString() on to
name the object closed for any logged exception. If this is null
rs.toString() will be used.
public static ResultSet close(ResultSet rs,
PreparedStatement stmt,
org.slf4j.Logger logExceptionTo)
close(ResultSet,PreparedStatement,Logger,Object)
with null for name.
rs - The result set to close.stmt - The statement to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.
public static ResultSet close(ResultSet rs,
PreparedStatement stmt)
close(ResultSet,PreparedStatement,Logger,Object)
with null for logException to and name.
rs - The result set to close.stmt - The statement to close.
public static Connection close(Connection conn,
org.slf4j.Logger logExceptionTo,
Object name)
conn - The conneciton to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.name - Object to call Object.toString() on to
name the object closed for any logged exception. If this is null
conn.toString() will be used.
public static Connection close(Connection conn,
org.slf4j.Logger logExceptionTo)
close(Connection,Logger,Object) with null for name.
conn - The conneciton to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.
public static Connection close(Connection conn)
close(Connection,Logger,Object) with null for
logException to and name.
conn - The conneciton to close.
public static ResultSet close(ResultSet rs,
PreparedStatement stmt,
Connection conn,
org.slf4j.Logger logExceptionTo,
Object name)
close(ResultSet,Logger,Object),
close(PreparedStatement,Logger,Object) and finally
close(Connection,Logger,Object).
rs - The result set to close.stmt - The statement to close.conn - The connection to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.name - Object to call Object.toString() on to
name the object closed for any logged exception.
public static ResultSet close(ResultSet rs,
PreparedStatement stmt,
Connection conn,
org.slf4j.Logger logExceptionTo)
close(ResultSet,PreparedStatement,Connection,Logger,Object)
with null for name.
rs - The result set to close.stmt - The statement to close.conn - The connection to close.logExceptionTo - The log to log any SQLException
to. If this is null, the logger for the DbCloser class
will be used.
public static ResultSet close(ResultSet rs,
PreparedStatement stmt,
Connection conn)
close(ResultSet,PreparedStatement,Connection,Logger,Object)
with null for logExceptionTo and name.
rs - The result set to close.stmt - The statement to close.conn - The connection to close.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||