public class TableCreator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
CHECK_EXISTENCE
Flag to disable table existence check before create.
|
protected boolean |
ignoreDatabaseException |
protected java.lang.String |
name |
protected java.util.List<TableDefinition> |
tableDefinitions |
Constructor and Description |
---|
TableCreator() |
TableCreator(java.util.List<TableDefinition> tableDefinitions) |
Modifier and Type | Method and Description |
---|---|
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 |
createConstraints(java.util.List<TableDefinition> tables,
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 |
createTables(DatabaseSession session,
SchemaManager schemaManager,
boolean build,
boolean check,
boolean createSequenceTables,
boolean createSequences)
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 createSequenceTables)
Recreate the tables on the database.
|
void |
replaceTables(DatabaseSession session,
SchemaManager schemaManager,
boolean createSequenceTables,
boolean createSequences)
Recreate the tables on the database.
|
protected void |
replaceTablesAndConstraints(SchemaManager schemaManager,
DatabaseSession session) |
protected void |
replaceTablesAndConstraints(SchemaManager schemaManager,
DatabaseSession session,
boolean createSequenceTables,
boolean createSequences) |
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.
|
public static boolean CHECK_EXISTENCE
protected java.util.List<TableDefinition> tableDefinitions
protected java.lang.String name
protected boolean ignoreDatabaseException
public TableCreator()
public TableCreator(java.util.List<TableDefinition> tableDefinitions)
public void addTableDefinition(TableDefinition tableDefinition)
public void addTableDefinitions(java.util.Collection<TableDefinition> tableDefs)
public void createConstraints(DatabaseSession session)
public void createConstraints(DatabaseSession session, SchemaManager schemaManager)
public void createConstraints(DatabaseSession session, SchemaManager schemaManager, boolean build)
public void createConstraints(java.util.List<TableDefinition> tables, DatabaseSession session, SchemaManager schemaManager, boolean build)
public void createTables(DatabaseSession session)
public void createTables(DatabaseSession session, SchemaManager schemaManager)
public void createTables(DatabaseSession session, SchemaManager schemaManager, boolean build)
public void createTables(DatabaseSession session, SchemaManager schemaManager, boolean build, boolean check, boolean createSequenceTables, boolean createSequences)
public void dropConstraints(DatabaseSession session)
public void dropConstraints(DatabaseSession session, SchemaManager schemaManager)
public void dropConstraints(DatabaseSession session, SchemaManager schemaManager, boolean build)
public void dropTables(DatabaseSession session)
public void dropTables(DatabaseSession session, SchemaManager schemaManager)
public void dropTables(DatabaseSession session, SchemaManager schemaManager, boolean build)
public java.lang.String getName()
public java.util.List<TableDefinition> getTableDefinitions()
public void replaceTables(DatabaseSession session)
public void replaceTables(DatabaseSession session, SchemaManager schemaManager)
public void replaceTables(DatabaseSession session, SchemaManager schemaManager, boolean createSequenceTables)
public void replaceTables(DatabaseSession session, SchemaManager schemaManager, boolean createSequenceTables, boolean createSequences)
protected void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session, boolean createSequenceTables, boolean createSequences)
protected void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session)
protected void buildConstraints(SchemaManager schemaManager, boolean build)
public void setName(java.lang.String name)
public void setTableDefinitions(java.util.Vector tableDefinitions)
public boolean shouldIgnoreDatabaseException()
public void setIgnoreDatabaseException(boolean ignoreDatabaseException)
protected java.lang.String getSequenceTableName(Session session)
session
- public void extendTables(DatabaseSession session, SchemaManager schemaManager)
protected void extendTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session)
public void extendTables(DatabaseSession session, SchemaManager schemaManager, boolean build)