EclipseLink 2.4.2, build 'v20130514-5956486' 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 responsible 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.List<TableDefinition> tableDefinitions
           
 
Constructor Summary
TableCreator()
           
TableCreator(java.util.List<TableDefinition> tableDefinitions)
           
 
Method Summary
 void addTableDefinition(TableDefinition tableDefinition)
          Add the table.
 void addTableDefinitions(java.util.Collection<TableDefinition> tableDefs)
          Add a set of tables.
protected  void buildConstraints(SchemaManager schemaManager, boolean build)
          Convert any field constraint to constraint objects.
 void createConstraints(DatabaseSession session)
          Create constraints.
 void createConstraints(DatabaseSession session, SchemaManager schemaManager)
          Create constraints.
 void createConstraints(DatabaseSession session, SchemaManager schemaManager, boolean build)
          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 createTables(DatabaseSession session, SchemaManager schemaManager, boolean build)
          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 dropConstraints(DatabaseSession session, SchemaManager schemaManager, boolean build)
          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.
 void dropTables(DatabaseSession session, SchemaManager schemaManager, boolean build)
          Drop the tables from the database.
 void extendTables(DatabaseSession session, SchemaManager schemaManager)
          Create or extend the tables on the database.
 void extendTables(DatabaseSession session, SchemaManager schemaManager, boolean build)
          This creates/extends the tables on the database.
protected  void extendTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session)
           
 java.lang.String getName()
          Return the name.
protected  java.lang.String getSequenceTableName(Session session)
          This returns the Sequence Table's qualified name, without delimiting.
 java.util.List<TableDefinition> 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 dontReplaceSequenceTable)
          Recreate the tables on the database.
 void replaceTables(DatabaseSession session, SchemaManager schemaManager, boolean dontReplaceSequenceTable, boolean dontReplaceSequences)
          Recreate the tables on the database.
protected  void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session)
           
 void setIgnoreDatabaseException(boolean ignoreDatabaseException)
          Set flag whether DatabaseException should be ignored.
 void setName(java.lang.String name)
          Set the name.
 void setTableDefinitions(java.util.Vector tableDefinitions)
          Set the tables.
 boolean shouldIgnoreDatabaseException()
          Return true if DatabaseException is to be ignored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableDefinitions

protected java.util.List<TableDefinition> tableDefinitions

name

protected java.lang.String name

ignoreDatabaseException

protected boolean ignoreDatabaseException
Constructor Detail

TableCreator

public TableCreator()

TableCreator

public TableCreator(java.util.List<TableDefinition> tableDefinitions)
Method Detail

addTableDefinition

public void addTableDefinition(TableDefinition tableDefinition)
Add the table.


addTableDefinitions

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


createConstraints

public void createConstraints(DatabaseSession session)
Create constraints.


createConstraints

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


createConstraints

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


createTables

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


dropConstraints

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


dropTables

public void dropTables(DatabaseSession session,
                       SchemaManager schemaManager,
                       boolean build)
Drop the tables from the database.


getName

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


getTableDefinitions

public java.util.List<TableDefinition> 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 dontReplaceSequenceTable)
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 dontReplaceSequenceTable,
                          boolean dontReplaceSequences)
Recreate the tables on the database. This will drop the tables if they exist and recreate them.


replaceTablesAndConstraints

protected void replaceTablesAndConstraints(SchemaManager schemaManager,
                                           DatabaseSession session)

buildConstraints

protected void buildConstraints(SchemaManager schemaManager,
                                boolean build)
Convert any field constraint to constraint objects.


setName

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


setTableDefinitions

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


shouldIgnoreDatabaseException

public boolean shouldIgnoreDatabaseException()
Return true if DatabaseException is to be ignored.


setIgnoreDatabaseException

public void setIgnoreDatabaseException(boolean ignoreDatabaseException)
Set flag whether DatabaseException should be ignored.


getSequenceTableName

protected java.lang.String getSequenceTableName(Session session)
This returns the Sequence Table's qualified name, without delimiting.

Parameters:
session -
Returns:
the qualified table name

extendTables

public void extendTables(DatabaseSession session,
                         SchemaManager schemaManager)
Create or extend the tables on the database. This will alter existing tables to add missing fields or create the table otherwise. It will also create Sequences tables and objects.


extendTablesAndConstraints

protected void extendTablesAndConstraints(SchemaManager schemaManager,
                                          DatabaseSession session)

extendTables

public void extendTables(DatabaseSession session,
                         SchemaManager schemaManager,
                         boolean build)
This creates/extends the tables on the database.


EclipseLink 2.4.2, build 'v20130514-5956486' API Reference