EclipseLink 1.2.0, build 'v20091016-r5565' API Reference

org.eclipse.persistence.tools.schemaframework
Class TableCreator

java.lang.Object
  extended by org.eclipse.persistence.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.

Author:
Peter Krogh
Since:
TopLink 2.0

Field Summary
protected  boolean ignoreDatabaseException
           
protected  java.lang.String name
           
protected  java.util.Vector tableDefinitions
           
 
Constructor Summary
TableCreator()
           
TableCreator(java.util.Vector tableDefinitions)
           
 
Method Summary
 void addTableDefinition(TableDefinition tableDefinition)
          Add the table.
 void addTableDefinitions(java.util.Collection tableDefs)
          Add a set of tables.
 void createConstraints(DatabaseSession session)
          Create constraints.
 void createConstraints(DatabaseSession session, SchemaManager schemaManager)
          Create constraints.
 void createTables(DatabaseSession session)
          This creates the tables on the database.
 void createTables(DatabaseSession session, SchemaManager schemaManager)
          This creates the tables on the database.
 void dropConstraints(DatabaseSession session)
          Drop the table constraints from the database.
 void dropConstraints(DatabaseSession session, SchemaManager schemaManager)
          Drop the table constraints from the database.
 void dropTables(DatabaseSession session)
          Drop the tables from the database.
 void dropTables(DatabaseSession session, SchemaManager schemaManager)
          Drop the tables from the database.
 java.lang.String getName()
          Return the name.
protected  java.lang.String getSequenceTableName(Session session)
           
 java.util.Vector getTableDefinitions()
          Return the tables.
 void replaceTables(DatabaseSession session)
          Recreate the tables on the database.
 void replaceTables(DatabaseSession session, SchemaManager schemaManager)
          Recreate the tables on the database.
 void replaceTables(DatabaseSession session, SchemaManager schemaManager, boolean keepSequenceTable)
          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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableDefinitions

protected java.util.Vector tableDefinitions

name

protected java.lang.String name

ignoreDatabaseException

protected boolean ignoreDatabaseException
Constructor Detail

TableCreator

public TableCreator()

TableCreator

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

addTableDefinition

public void addTableDefinition(TableDefinition tableDefinition)
Add the table.


addTableDefinitions

public void addTableDefinitions(java.util.Collection tableDefs)
Add a set of tables.


createConstraints

public void createConstraints(DatabaseSession session)
Create constraints.


createConstraints

public void createConstraints(DatabaseSession session,
                              SchemaManager schemaManager)
Create constraints.


createTables

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


createTables

public void createTables(DatabaseSession session,
                         SchemaManager schemaManager)
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.


dropConstraints

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


dropTables

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


dropTables

public void dropTables(DatabaseSession session,
                       SchemaManager schemaManager)
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.


replaceTables

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


replaceTables

public void replaceTables(DatabaseSession session,
                          SchemaManager schemaManager,
                          boolean keepSequenceTable)
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.


getSequenceTableName

protected java.lang.String getSequenceTableName(Session session)

EclipseLink 1.2.0, build 'v20091016-r5565' API Reference