com.ptc.windchill.upgrade.util
Class JdbcUtils

java.lang.Object
  extended bycom.ptc.windchill.upgrade.util.JdbcUtils

public class JdbcUtils
extends Object


Constructor Summary
JdbcUtils()
           
 
Method Summary
static void dropTable(String table_name, Connection connection)
           
static void executeUpdateStmt(String update_sql, Connection connection)
           
static void safeClose(ResultSet result_set)
           
static void safeClose(Statement statement)
           
static void safeCloseWithSmother(ResultSet result_set)
           
static void safeCloseWithSmother(Statement statement)
           
static boolean tableExists(String table_name, Connection connection)
           
static boolean tableOrColumnExists(String table_name, String column_name, Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcUtils

public JdbcUtils()
Method Detail

safeClose

public static final void safeClose(Statement statement)
                            throws SQLException
Throws:
SQLException

safeClose

public static final void safeClose(ResultSet result_set)
                            throws SQLException
Throws:
SQLException

safeCloseWithSmother

public static final void safeCloseWithSmother(Statement statement)

safeCloseWithSmother

public static final void safeCloseWithSmother(ResultSet result_set)

tableExists

public static final boolean tableExists(String table_name,
                                        Connection connection)
                                 throws SQLException
Throws:
SQLException

tableOrColumnExists

public static final boolean tableOrColumnExists(String table_name,
                                                String column_name,
                                                Connection connection)
                                         throws SQLException
Throws:
SQLException

executeUpdateStmt

public static final void executeUpdateStmt(String update_sql,
                                           Connection connection)
                                    throws SQLException
Throws:
SQLException

dropTable

public static final void dropTable(String table_name,
                                   Connection connection)
                            throws SQLException
Throws:
SQLException