|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbunit.util.SQLHelper
public class SQLHelper
Helper for SQL-related stuff.
TODO: testcases
Method Summary | |
---|---|
static void |
close(java.sql.ResultSet rs,
java.sql.Statement stmt)
Close a result set and a prepared statement, checking for null references. |
static void |
close(java.sql.Statement stmt)
Close a preparement statement, checking for null references. |
static java.lang.String |
getPrimaryKeyColumn(java.sql.Connection conn,
java.lang.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 java.lang.String getPrimaryKeyColumn(java.sql.Connection conn, java.lang.String table) throws java.sql.SQLException
conn
- connection with the databasetable
- table name
java.sql.SQLException
- raised while getting the meta datapublic static void close(java.sql.ResultSet rs, java.sql.Statement stmt) throws java.sql.SQLException
rs
- result set to be closedstmt
- prepared statement to be closed
java.sql.SQLException
- exception raised in either close() methodpublic static void close(java.sql.Statement stmt) throws java.sql.SQLException
rs
- result set to be closedstmt
- statement to be closed
java.sql.SQLException
- exception raised while closing the statement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |