oracle.toplink.tools.schemaframework
Class TableCreator

java.lang.Object
  |
  +--oracle.toplink.tools.schemaframework.TableCreator

public class TableCreator
extends java.lang.Object

Purpose: This class is reponsible for creating the tables defined in the project. A specific subclass of this class is created for each project. The specific table information is defined in the subclass.

Since:
TopLink 2.0

Constructor Summary
TableCreator()
           
TableCreator(java.util.Vector tableDefinitions)
           
 
Method Summary
TypeMethod
 void addTableDefinition(TableDefinition tableDefinition)
          Add the table.
 void createConstraints(DatabaseSession session)
          Create constraints.
 void createTables(DatabaseSession session)
          This creates the tables on the database.
 void dropConstraints(DatabaseSession session)
          Drop the table constraints from the database.
 void dropPre25Constraints(DatabaseSession session)
          Deprecated. This method is only useful for the transition to TopLink for Java release 2.5.
 void dropTables(DatabaseSession session)
          Drop the tables from the database.
 java.lang.String getName()
          Return the name.
 java.util.Vector getTableDefinitions()
          Return the tables.
 void replaceTables(DatabaseSession session)
          Recreate the tables on the database.
 void setName(java.lang.String name)
          Set the name.
 void setTableDefinitions(java.util.Vector tableDefinitions)
          Set the tables.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableCreator

public TableCreator()

TableCreator

public TableCreator(java.util.Vector tableDefinitions)
Method Detail

addTableDefinition

public void addTableDefinition(TableDefinition tableDefinition)
Add the table.

createConstraints

public void createConstraints(DatabaseSession session)
Create constraints.

createTables

public void createTables(DatabaseSession session)
This creates the tables on the database. If the table already exists this will fail.

dropConstraints

public void dropConstraints(DatabaseSession session)
Drop the table constraints from the database.

dropPre25Constraints

public void dropPre25Constraints(DatabaseSession session)
Deprecated. This method is only useful for the transition to TopLink for Java release 2.5.

Run this method with a DatabaseSession to drop the constraints that were created when running createTables(DatabaseSession) with a release previous to TopLink for Java 2.5. This method only has to be run once before createTables().
See Also:
TableCreator#createTables()

dropTables

public void dropTables(DatabaseSession session)
Drop the tables from the database.

getName

public java.lang.String getName()
Return the name.

getTableDefinitions

public java.util.Vector getTableDefinitions()
Return the tables.

replaceTables

public void replaceTables(DatabaseSession session)
Recreate the tables on the database. This will drop the tables if they exist and recreate them.

setName

public void setName(java.lang.String name)
Set the name.

setTableDefinitions

public void setTableDefinitions(java.util.Vector tableDefinitions)
Set the tables.