|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.util.SQLHelper
public class SQLHelper
Helper for SQL-related stuff.
TODO: testcases
Method Summary | |
---|---|
static void |
close(ResultSet rs,
Statement stmt)
Close a result set and a prepared statement, checking for null references. |
static void |
close(Statement stmt)
Close a preparement statement, checking for null references. |
static String |
getPrimaryKeyColumn(Connection conn,
String table)
Gets the primary column for a table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getPrimaryKeyColumn(Connection conn, String table) throws SQLException
conn
- connection with the databasetable
- table name
SQLException
- raised while getting the meta datapublic static void close(ResultSet rs, Statement stmt) throws SQLException
rs
- result set to be closedstmt
- prepared statement to be closed
SQLException
- exception raised in either close() methodpublic static void close(Statement stmt) throws SQLException
rs
- result set to be closedstmt
- statement to be closed
SQLException
- exception raised while closing the statement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |