|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.anotheria.db.util.JDBCUtil
public final class JDBCUtil
Utility class for closing JDBC resources.
Method Summary | |
---|---|
static void |
close(Connection conn)
Close Connection if it opened. |
static void |
close(ResultSet rs)
Close ResultSet if it opened. |
static void |
close(Statement st)
Close Statement if it opened. |
static void |
release(Connection conn)
Close Connection if it opened. |
static void |
release(ResultSet rs)
Close ResultSet if it opened. |
static void |
release(Statement st)
Close Statement if it opened. |
static void |
rollback(Connection conn)
Roll back executed queries from last commit for given connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void close(Connection conn)
Connection
if it opened. If SQLException
happen on closing it will be logged.
conn
- - Connection
objectpublic static void close(Statement st)
Statement
if it opened. If SQLException
happen on closing it will be logged.
st
- - Statement
objectpublic static void close(ResultSet rs)
ResultSet
if it opened. If SQLException
happen on closing it will be logged.
st
- - ResultSet
objectpublic static void release(Connection conn)
Connection
if it opened. If SQLException
happen on closing it will be logged.
conn
- - Connection
objectpublic static void release(Statement st)
Statement
if it opened. If SQLException
happen on closing it will be logged.
st
- - Statement
objectpublic static void release(ResultSet rs)
ResultSet
if it opened. If SQLException
happen on closing it will be logged.
st
- - ResultSet
objectpublic static void rollback(Connection conn)
SQLException
happen on closing it will be logged.
conn
- - Connection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |