tppt.db
Class DB2Handler

java.lang.Object
  |
  +--tppt.db.DBHandler
        |
        +--tppt.db.DB2Handler

public class DB2Handler
extends DBHandler

DB2Handler is the class that implements the DB2 dependent methods in order to run the tool on the Sybase. This class extends the DBHandler so it inherits all the implemented methods from its parents but it has its own behavior for the abstract methods and that is reuqired to implement in this class.

Version:
2.0
Author:
Jodie Wu
See Also:
DBHandler

Fields inherited from class tppt.db.DBHandler
connection
 
Constructor Summary
DB2Handler()
           
 
Method Summary
 void dropStoredProcedures()
          Drop all the user-created store procedures.
 void dropTables()
          Clean up the database, including all the user databases and constriants.
static void main(java.lang.String[] args)
           
 boolean setMaxRowsForTable(java.sql.CallableStatement sp, java.lang.String table)
          Set up the maximum-rows-per-page for specific table.
 boolean setMaxRowsPerPage()
          Set up the maximum row per page for all the user created tables.
 
Methods inherited from class tppt.db.DBHandler
closeConnection, closeReader, dbConnection, dropATable, dropConstraint, dropSP, executeStmt, initDB, initStatement, SQLFileExecutor, twoPhaseDBInit
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

DB2Handler

public DB2Handler()
Method Detail

setMaxRowsPerPage

public boolean setMaxRowsPerPage()
Set up the maximum row per page for all the user created tables.
Overrides:
setMaxRowsPerPage in class DBHandler
Returns:
returns true if no error occurs during setting up, false otherwise.
See Also:
setMaxRowsForTable(CallableStatement,String)

setMaxRowsForTable

public boolean setMaxRowsForTable(java.sql.CallableStatement sp,
                                  java.lang.String table)
Set up the maximum-rows-per-page for specific table.
Overrides:
setMaxRowsForTable in class DBHandler
Parameters:
sp - the CallableStatement to execute the maximun-rows setup.
table - the table name.
Returns:
returns true if setup sucessfully, false otherwise.

dropTables

public void dropTables()
Clean up the database, including all the user databases and constriants.
Overrides:
dropTables in class DBHandler
See Also:
DBHandler.dropConstraint(String,String), DBHandler.dropATable(String)

dropStoredProcedures

public void dropStoredProcedures()
Drop all the user-created store procedures.
Overrides:
dropStoredProcedures in class DBHandler
See Also:
DBHandler.dropSP(String)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception