org.oreodata.jdbcimpl
Class SQLUtil
java.lang.Object
|
+--org.oreodata.jdbcimpl.SQLUtil
- public abstract class SQLUtil
- extends java.lang.Object
A holder for some JDBC/SQL-related convenience routines
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLUtil
public SQLUtil()
buildInsertQuery
public static java.lang.String buildInsertQuery(Record rec)
buildUpdateQuery
public static java.lang.String buildUpdateQuery(Record rec)
fillRecordFromResultSet
public static void fillRecordFromResultSet(Record rec,
java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLException
createTable
public static boolean createTable(java.sql.Connection conn,
RecordDescriptor metadata)
throws java.sql.SQLException
- Creates a table in the database or tries to do so.
java.sql.SQLException
getTableNames
public static java.util.List getTableNames(java.sql.Connection conn)
throws java.sql.SQLException
- Parameters:
conn
- A connection to a database.
- Returns:
- a List containing all the table names.
java.sql.SQLException
numRowsInTable
public static int numRowsInTable(java.sql.Connection conn,
java.lang.String tableName)