com.revusky.niggle.data.jdbc
Class SQLUtil

java.lang.Object
  |
  +--com.revusky.niggle.data.jdbc.SQLUtil

public abstract class SQLUtil
extends java.lang.Object

A holder for some JDBC/SQL-related convenience routines


Constructor Summary
SQLUtil()
           
 
Method Summary
static boolean createTable(java.sql.Connection conn, RecordDescriptor metadata)
          Creates a table in the database or tries to do so.
static void fillRecordFromResultSet(Record rec, java.sql.ResultSet rs)
           
static java.util.List getTableNames(java.sql.Connection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLUtil

public SQLUtil()
Method Detail

fillRecordFromResultSet

public static void fillRecordFromResultSet(Record rec,
                                           java.sql.ResultSet rs)
                                    throws 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.

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.