Class TableDefinition
- java.lang.Object
- 
- org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
- 
- org.eclipse.persistence.tools.schemaframework.TableDefinition
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable
 - Direct Known Subclasses:
- TypeTableDefinition
 
 public class TableDefinition extends DatabaseObjectDefinition Purpose: Allow a generic way of creating tables on the different platforms. - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringcreationPrefixprotected java.lang.StringcreationSuffixprotected java.util.List<FieldDefinition>fieldsprotected java.util.Map<java.lang.String,ForeignKeyConstraint>foreignKeyMapprotected booleanhasUserDefinedForeignKeyConstraintsprotected java.util.List<IndexDefinition>indexesprotected org.eclipse.persistence.internal.helper.DatabaseTabletableprotected java.util.List<UniqueKeyConstraint>uniqueKeys- 
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinitionname, qualifier
 
- 
 - 
Constructor SummaryConstructors Constructor Description TableDefinition()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddField(java.lang.String fieldName, java.lang.Class type)PUBLIC: Add the field to the table, default sizes are used.voidaddField(java.lang.String fieldName, java.lang.Class type, int fieldSize)PUBLIC: Add the field to the table.voidaddField(java.lang.String fieldName, java.lang.Class type, int fieldSize, int fieldSubSize)PUBLIC: Add the field to the table.voidaddField(java.lang.String fieldName, java.lang.String typeName)PUBLIC: Add the field to the type to a nested type.voidaddField(FieldDefinition field)PUBLIC: Add the field to the table.voidaddFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field)INTERNAL: Execute the SQL alter table to add the field to the table.voidaddForeignKeyConstraint(java.lang.String name, java.lang.String sourceField, java.lang.String targetField, java.lang.String targetTable)PUBLIC: Add a foreign key constraint to the table.voidaddForeignKeyConstraint(ForeignKeyConstraint foreignKey)PUBLIC: Add a foreign key constraint to the table.voidaddIdentityField(java.lang.String fieldName, java.lang.Class type)PUBLIC: Add the field to the table, default sizes are used.voidaddIdentityField(java.lang.String fieldName, java.lang.Class type, int fieldSize)PUBLIC: Add the field to the table, default sizes are used.voidaddIndex(IndexDefinition index)PUBLIC: Add an index to the table.voidaddPrimaryKeyField(java.lang.String fieldName, java.lang.Class type)PUBLIC: Add the field to the table, default sizes are used.voidaddPrimaryKeyField(java.lang.String fieldName, java.lang.Class type, int fieldSize)PUBLIC: Add the field to the table, default sizes are used.voidaddUniqueKeyConstraint(java.lang.String name, java.lang.String sourceField)PUBLIC: Add a unique key constraint to the table.voidaddUniqueKeyConstraint(java.lang.String name, java.lang.String[] sourceFields)PUBLIC: Add a unique key constraint to the table.voidaddUniqueKeyConstraint(UniqueKeyConstraint uniqueKey)PUBLIC: Add a unique key constraint to the table.java.io.WriterbuildAddFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field, java.io.Writer writer)INTERNAL: Return the alter table statement to add a field to the table.java.io.WriterbuildConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, java.io.Writer writer)INTERNAL: Return the alter table statement to add the constraints.java.io.WriterbuildConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, java.io.Writer writer)INTERNAL: Return the alter table statement to drop the constraints.java.io.WriterbuildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the create table statement.protected java.io.WriterbuildDatabaseSchemaCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer, java.util.Set<java.lang.String> createdDatabaseSchemas)INTERNAL: Build the create schema DDL.protected java.io.WriterbuildDatabaseSchemaDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Build the drop schema DDL.java.io.WriterbuildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the drop table statement.protected voidbuildFieldTypes(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Build the foreign key constraints.protected ForeignKeyConstraintbuildForeignKeyConstraint(java.util.List<java.lang.String> fkFieldNames, java.util.List<java.lang.String> pkFieldNames, TableDefinition targetTable, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)Build a foreign key constraint.protected ForeignKeyConstraintbuildForeignKeyConstraint(FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)Build a foreign key constraint using FieldDefinition.getForeignKeyFieldName().protected java.lang.StringbuildForeignKeyConstraintName(java.lang.String tableName, java.lang.String fieldName, int maximumNameLength, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)Return foreign key constraint name built from the table and field name with the specified maximum length.IndexDefinitionbuildIndex(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String key, java.util.List<java.lang.String> columnNames, boolean isUniqueSetOnField)INTERNAL: Return the index creation statement.java.io.WriterbuildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String key, java.io.Writer writer, boolean isUniqueSetOnField)INTERNAL: Return the index drop statement.protected java.lang.StringbuildIndexName(java.lang.String tableName, java.lang.String key, java.lang.String indexPrefix, int maximumNameLength, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)Return key constraint name built from the table and key name with the specified maximum length and index prefix.java.io.WriterbuildUniqueConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, java.io.Writer writer)INTERNAL: Return the alter table statement to add the constraints.java.io.WriterbuildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, java.io.Writer writer)INTERNAL: Return the alter table statement to drop the constraints.protected UniqueKeyConstraintbuildUniqueKeyConstraint(java.lang.String name, java.util.List<java.lang.String> fieldNames, int serialNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)protected java.lang.StringbuildUniqueKeyConstraintName(java.lang.String tableName, int serialNumber, int maximumNameLength)Return unique key constraint name built from the table name and sequence number with the specified maximum length.java.io.WriterbuildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:java.io.WriterbuildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:java.io.WriterbuildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:java.lang.Objectclone()PUBLIC: Performs a deep copy of this table definition.voidcreateConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)INTERNAL: Execute the SQL alter table constraint creation string.voidcreateConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Execute the SQL alter table constraint creation string.voidcreateDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer, java.util.Set<java.lang.String> createdDatabaseSchemas)INTERNAL: Execute the DDL to create the database schema for this object.voidcreateDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, java.util.Set<java.lang.String> createdDatabaseSchemas)INTERNAL: Execute the DDL to create the database schema for this object.voidcreateIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:
 Write the SQL create index string to create index if passed a writer, else delegate to a method that executes the string on the database.java.lang.StringdeletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor)INTERNAL: Return the delete SQL string.voiddropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)INTERNAL: Execute the SQL alter table constraint creation string.voiddropConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Execute the SQL alter table constraint creation string.voiddropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Execute the DDL to drop the database schema for this object.voiddropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Execute the DDL to drop the database schema for this object.voiddropIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:
 Write the SQL drop index string to drop indexes if passed a writer, else delegate to a method that executes the string on the database.java.lang.StringgetCreationPrefix()INTERNAL: Return the beginning of the sql create statement - the part before the name.java.lang.StringgetCreationSuffix()INTERNAL: Return the end of the sql create statement - the part after the field list.java.lang.StringgetDatabaseSchema()PUBLIC: Return the schema associated with this table.FieldDefinitiongetField(java.lang.String fieldName)PUBLIC: Return the field the corresponds to the name.java.util.List<FieldDefinition>getFields()PUBLIC:java.util.Map<java.lang.String,ForeignKeyConstraint>getForeignKeyMap()INTERNAL:java.util.Collection<ForeignKeyConstraint>getForeignKeys()PUBLIC: Returns the ForeignKeyConstraint list.java.util.List<IndexDefinition>getIndexes()PUBLIC:java.util.List<java.lang.String>getPrimaryKeyFieldNames()PUBLIC:org.eclipse.persistence.internal.helper.DatabaseTablegetTable()java.util.List<UniqueKeyConstraint>getUniqueKeys()PUBLIC:voidpostCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer createSchemaWriter, boolean createSQLFiles)Execute any statements required after the creation of the objectvoidpreDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer dropSchemaWriter, boolean createSQLFiles)Execute any statements required before the deletion of the objectvoidsetCreateSQLFiles(boolean genFlag)PUBLIC:voidsetCreateVPDCalls(boolean createVPDCalls, java.lang.String tenantFieldName)PUBLIC:voidsetCreationPrefix(java.lang.String creationPrefix)INTERNAL: Set the beginning of the sql create statement - the part before the name.voidsetCreationSuffix(java.lang.String creationSuffix)INTERNAL: Set the end of the sql create statement - the part after the field list.voidsetFields(java.util.List<FieldDefinition> fields)PUBLIC:voidsetForeignKeyMap(java.util.Map<java.lang.String,ForeignKeyConstraint> foreignKeyMap)INTERNAL:voidsetForeignKeys(java.util.List<ForeignKeyConstraint> foreignKeys)PUBLIC: Set the ForeignKeyConstraint list.voidsetIndexes(java.util.List<IndexDefinition> indexes)PUBLIC:voidsetTable(org.eclipse.persistence.internal.helper.DatabaseTable table)voidsetUniqueKeys(java.util.List<UniqueKeyConstraint> uniqueKeys)PUBLIC:voidsetUserDefinedForeignKeyConstraints(java.util.Map<java.lang.String,ForeignKeyConstraint> foreignKeyConstraints)PUBLIC: Set the foreign key constraints for this table.booleanshouldCreateDatabaseSchema(java.util.Set<java.lang.String> createdDatabaseSchemas)If this table has a schema (and catalog specified) make sure it is created.booleanshouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Subclasses who care should override this method.voidwriteLineSeperator(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)- 
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinitioncreateObject, createOnDatabase, dropFromDatabase, dropObject, getFieldTypeDefinition, getFieldTypeDefinition, getFullName, getName, getQualifier, hasDatabaseSchema, setName, setQualifier, toString
 
- 
 
- 
- 
- 
Field Detail- 
fieldsprotected java.util.List<FieldDefinition> fields 
 - 
foreignKeyMapprotected java.util.Map<java.lang.String,ForeignKeyConstraint> foreignKeyMap 
 - 
uniqueKeysprotected java.util.List<UniqueKeyConstraint> uniqueKeys 
 - 
indexesprotected java.util.List<IndexDefinition> indexes 
 - 
creationPrefixprotected java.lang.String creationPrefix 
 - 
creationSuffixprotected java.lang.String creationSuffix 
 - 
tableprotected org.eclipse.persistence.internal.helper.DatabaseTable table 
 - 
hasUserDefinedForeignKeyConstraintsprotected boolean hasUserDefinedForeignKeyConstraints 
 
- 
 - 
Method Detail- 
addFieldpublic void addField(java.lang.String fieldName, java.lang.Class type)PUBLIC: Add the field to the table, default sizes are used.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
addFieldpublic void addField(java.lang.String fieldName, java.lang.Class type, int fieldSize)PUBLIC: Add the field to the table.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
addFieldpublic void addField(java.lang.String fieldName, java.lang.Class type, int fieldSize, int fieldSubSize)PUBLIC: Add the field to the table.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
addFieldpublic void addField(java.lang.String fieldName, java.lang.String typeName)PUBLIC: Add the field to the type to a nested type.- Parameters:
- typeName- is the name of the nested type.
 
 - 
addFieldpublic void addField(FieldDefinition field) PUBLIC: Add the field to the table.
 - 
addFieldOnDatabasepublic void addFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field)INTERNAL: Execute the SQL alter table to add the field to the table.
 - 
buildAddFieldWriterpublic java.io.Writer buildAddFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the alter table statement to add a field to the table.- Throws:
- ValidationException
 
 - 
addForeignKeyConstraintpublic void addForeignKeyConstraint(java.lang.String name, java.lang.String sourceField, java.lang.String targetField, java.lang.String targetTable)PUBLIC: Add a foreign key constraint to the table. If there is a same name foreign key constraint already, nothing will happen.
 - 
addUniqueKeyConstraintpublic void addUniqueKeyConstraint(java.lang.String name, java.lang.String sourceField)PUBLIC: Add a unique key constraint to the table.
 - 
addUniqueKeyConstraintpublic void addUniqueKeyConstraint(java.lang.String name, java.lang.String[] sourceFields)PUBLIC: Add a unique key constraint to the table.
 - 
addForeignKeyConstraintpublic void addForeignKeyConstraint(ForeignKeyConstraint foreignKey) PUBLIC: Add a foreign key constraint to the table. If there is a same name foreign key constraint already, nothing will happen.
 - 
addUniqueKeyConstraintpublic void addUniqueKeyConstraint(UniqueKeyConstraint uniqueKey) PUBLIC: Add a unique key constraint to the table.
 - 
addIndexpublic void addIndex(IndexDefinition index) PUBLIC: Add an index to the table.
 - 
addIdentityFieldpublic void addIdentityField(java.lang.String fieldName, java.lang.Class type)PUBLIC: Add the field to the table, default sizes are used. Identity fields are used on Sybase for native sequencing, The field must be of number type and cannot have a subsize.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
addIdentityFieldpublic void addIdentityField(java.lang.String fieldName, java.lang.Class type, int fieldSize)PUBLIC: Add the field to the table, default sizes are used. Identity fields are used on Sybase for native sequencing, The field must be of number type and cannot have a subsize.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
addPrimaryKeyFieldpublic void addPrimaryKeyField(java.lang.String fieldName, java.lang.Class type)PUBLIC: Add the field to the table, default sizes are used. This field is set as part of the primary key.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
addPrimaryKeyFieldpublic void addPrimaryKeyField(java.lang.String fieldName, java.lang.Class type, int fieldSize)PUBLIC: Add the field to the table, default sizes are used. This field is set as part of the primary key.- Parameters:
- type- is the Java class type corresponding to the database type.
 
 - 
buildConstraintCreationWriterpublic java.io.Writer buildConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the alter table statement to add the constraints. This is done separately from the create because of dependencies.- Throws:
- ValidationException
 
 - 
buildConstraintDeletionWriterpublic java.io.Writer buildConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the alter table statement to drop the constraints. This is done separately to allow constraints to be dropped before the tables.- Throws:
- ValidationException
 
 - 
buildUniqueConstraintCreationWriterpublic java.io.Writer buildUniqueConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the alter table statement to add the constraints. This is done separately from the create because of dependencies.- Throws:
- ValidationException
 
 - 
buildUniqueConstraintDeletionWriterpublic java.io.Writer buildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the alter table statement to drop the constraints. This is done separately to allow constraints to be dropped before the tables.- Throws:
- ValidationException
 
 - 
buildIndexpublic IndexDefinition buildIndex(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String key, java.util.List<java.lang.String> columnNames, boolean isUniqueSetOnField) INTERNAL: Return the index creation statement.
 - 
buildIndexDeletionWriterpublic java.io.Writer buildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String key, java.io.Writer writer, boolean isUniqueSetOnField)INTERNAL: Return the index drop statement.
 - 
getCreationPrefixpublic java.lang.String getCreationPrefix() INTERNAL: Return the beginning of the sql create statement - the part before the name. Unless temp table is created should be "CREATE TABLE "
 - 
setCreationPrefixpublic void setCreationPrefix(java.lang.String creationPrefix) INTERNAL: Set the beginning of the sql create statement - the part before the name. Use to create temp. table.
 - 
getCreationSuffixpublic java.lang.String getCreationSuffix() INTERNAL: Return the end of the sql create statement - the part after the field list. Unless temp table is created should be empty.
 - 
getDatabaseSchemapublic java.lang.String getDatabaseSchema() PUBLIC: Return the schema associated with this table.- Overrides:
- getDatabaseSchemain class- DatabaseObjectDefinition
- See Also:
- TableDefinition
 
 - 
setCreationSuffixpublic void setCreationSuffix(java.lang.String creationSuffix) INTERNAL: Set the end of the sql create statement - the part after the field list.
 - 
buildCreationWriterpublic java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the create table statement.- Specified by:
- buildCreationWriterin class- DatabaseObjectDefinition
- Throws:
- ValidationException
 
 - 
buildDeletionWriterpublic java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationExceptionINTERNAL: Return the drop table statement.- Specified by:
- buildDeletionWriterin class- DatabaseObjectDefinition
- Throws:
- ValidationException
 
 - 
buildVPDCreationPolicyWriterpublic java.io.Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:- Overrides:
- buildVPDCreationPolicyWriterin class- DatabaseObjectDefinition
 
 - 
buildVPDCreationFunctionWriterpublic java.io.Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:- Overrides:
- buildVPDCreationFunctionWriterin class- DatabaseObjectDefinition
 
 - 
buildDatabaseSchemaCreationWriterprotected java.io.Writer buildDatabaseSchemaCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer, java.util.Set<java.lang.String> createdDatabaseSchemas)INTERNAL: Build the create schema DDL.
 - 
buildDatabaseSchemaDeletionWriterprotected java.io.Writer buildDatabaseSchemaDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Build the drop schema DDL.
 - 
buildVPDDeletionWriterpublic java.io.Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:- Overrides:
- buildVPDDeletionWriterin class- DatabaseObjectDefinition
 
 - 
buildFieldTypesprotected void buildFieldTypes(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Build the foreign key constraints.
 - 
buildForeignKeyConstraintprotected ForeignKeyConstraint buildForeignKeyConstraint(FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) Build a foreign key constraint using FieldDefinition.getForeignKeyFieldName().
 - 
buildForeignKeyConstraintprotected ForeignKeyConstraint buildForeignKeyConstraint(java.util.List<java.lang.String> fkFieldNames, java.util.List<java.lang.String> pkFieldNames, TableDefinition targetTable, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) Build a foreign key constraint.
 - 
buildForeignKeyConstraintNameprotected java.lang.String buildForeignKeyConstraintName(java.lang.String tableName, java.lang.String fieldName, int maximumNameLength, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)Return foreign key constraint name built from the table and field name with the specified maximum length. To make the name short enough we 1. Drop the "FK_" prefix. 2. Drop the underscore characters if any. 3. Drop the vowels from the table and field name. 4. Truncate the table name to zero length if necessary.
 - 
buildUniqueKeyConstraintprotected UniqueKeyConstraint buildUniqueKeyConstraint(java.lang.String name, java.util.List<java.lang.String> fieldNames, int serialNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) 
 - 
buildUniqueKeyConstraintNameprotected java.lang.String buildUniqueKeyConstraintName(java.lang.String tableName, int serialNumber, int maximumNameLength)Return unique key constraint name built from the table name and sequence number with the specified maximum length. To make the name short enough we 1. Drop the "UNQ_" prefix. 2. Drop the underscore characters if any. 3. Drop the vowels from the table name. 4. Truncate the table name to zero length if necessary.
 - 
buildIndexNameprotected java.lang.String buildIndexName(java.lang.String tableName, java.lang.String key, java.lang.String indexPrefix, int maximumNameLength, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)Return key constraint name built from the table and key name with the specified maximum length and index prefix. If indexPrefix is null, "IX_" is used for prefix. To make the name short enough we:1. Drop the prefix. 2. Drop the underscore characters if any. 3. Drop the vowels from the table and key name. 4. Truncate the table name to zero length if necessary. 
 - 
clonepublic java.lang.Object clone() PUBLIC: Performs a deep copy of this table definition.- Overrides:
- clonein class- DatabaseObjectDefinition
 
 - 
createConstraintspublic void createConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter) throws EclipseLinkExceptionINTERNAL: Execute the SQL alter table constraint creation string.- Throws:
- EclipseLinkException
 
 - 
createConstraintsOnDatabasepublic void createConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkExceptionINTERNAL: Execute the SQL alter table constraint creation string.- Throws:
- EclipseLinkException
 
 - 
createDatabaseSchemapublic void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer, java.util.Set<java.lang.String> createdDatabaseSchemas) throws EclipseLinkExceptionINTERNAL: Execute the DDL to create the database schema for this object.- Overrides:
- createDatabaseSchemain class- DatabaseObjectDefinition
- Throws:
- EclipseLinkException
- See Also:
- TableDefinition
 
 - 
createDatabaseSchemaOnDatabasepublic void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, java.util.Set<java.lang.String> createdDatabaseSchemas) throws EclipseLinkExceptionINTERNAL: Execute the DDL to create the database schema for this object.- Overrides:
- createDatabaseSchemaOnDatabasein class- DatabaseObjectDefinition
- Throws:
- EclipseLinkException
- See Also:
- TableDefinition
 
 - 
createIndexespublic void createIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:
 Write the SQL create index string to create index if passed a writer, else delegate to a method that executes the string on the database.- Throws:
- ValidationException- wraps any IOException from the writer
 
 - 
writeLineSeperatorpublic void writeLineSeperator(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
 - 
deletionStringForpublic java.lang.String deletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor) INTERNAL: Return the delete SQL string.
 - 
dropDatabaseSchemapublic void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws EclipseLinkExceptionINTERNAL: Execute the DDL to drop the database schema for this object.- Overrides:
- dropDatabaseSchemain class- DatabaseObjectDefinition
- Throws:
- EclipseLinkException
- See Also:
- TableDefinition
 
 - 
dropDatabaseSchemaOnDatabasepublic void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkExceptionINTERNAL: Execute the DDL to drop the database schema for this object.- Overrides:
- dropDatabaseSchemaOnDatabasein class- DatabaseObjectDefinition
- Throws:
- EclipseLinkException
- See Also:
- TableDefinition
 
 - 
dropConstraintspublic void dropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter) throws EclipseLinkExceptionINTERNAL: Execute the SQL alter table constraint creation string.- Throws:
- EclipseLinkException
 
 - 
dropConstraintsOnDatabasepublic void dropConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkExceptionINTERNAL: Execute the SQL alter table constraint creation string. Exceptions are caught and masked so that all the foreign keys are dropped (even if they don't exist).- Throws:
- EclipseLinkException
 
 - 
dropIndexespublic void dropIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL:
 Write the SQL drop index string to drop indexes if passed a writer, else delegate to a method that executes the string on the database.- Throws:
- ValidationException- wraps any IOException from the writer
 
 - 
getForeignKeyMappublic java.util.Map<java.lang.String,ForeignKeyConstraint> getForeignKeyMap() INTERNAL:
 - 
setForeignKeyMappublic void setForeignKeyMap(java.util.Map<java.lang.String,ForeignKeyConstraint> foreignKeyMap) INTERNAL:
 - 
getFieldpublic FieldDefinition getField(java.lang.String fieldName) PUBLIC: Return the field the corresponds to the name.
 - 
getFieldspublic java.util.List<FieldDefinition> getFields() PUBLIC:
 - 
getForeignKeyspublic java.util.Collection<ForeignKeyConstraint> getForeignKeys() PUBLIC: Returns the ForeignKeyConstraint list.
 - 
getUniqueKeyspublic java.util.List<UniqueKeyConstraint> getUniqueKeys() PUBLIC:
 - 
setIndexespublic void setIndexes(java.util.List<IndexDefinition> indexes) PUBLIC:
 - 
setCreateVPDCallspublic void setCreateVPDCalls(boolean createVPDCalls, java.lang.String tenantFieldName)PUBLIC:
 - 
getIndexespublic java.util.List<IndexDefinition> getIndexes() PUBLIC:
 - 
getPrimaryKeyFieldNamespublic java.util.List<java.lang.String> getPrimaryKeyFieldNames() PUBLIC:
 - 
postCreateObjectpublic void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer createSchemaWriter, boolean createSQLFiles)Execute any statements required after the creation of the object- Overrides:
- postCreateObjectin class- DatabaseObjectDefinition
- Parameters:
- session-
- createSchemaWriter-
 
 - 
preDropObjectpublic void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer dropSchemaWriter, boolean createSQLFiles)Execute any statements required before the deletion of the object- Overrides:
- preDropObjectin class- DatabaseObjectDefinition
- Parameters:
- session-
- dropSchemaWriter-
 
 - 
setFieldspublic void setFields(java.util.List<FieldDefinition> fields) PUBLIC:
 - 
setForeignKeyspublic void setForeignKeys(java.util.List<ForeignKeyConstraint> foreignKeys) PUBLIC: Set the ForeignKeyConstraint list. If the list contains the same name foreign key constraints, only the first one of that name will be added.
 - 
setUniqueKeyspublic void setUniqueKeys(java.util.List<UniqueKeyConstraint> uniqueKeys) PUBLIC:
 - 
setUserDefinedForeignKeyConstraintspublic void setUserDefinedForeignKeyConstraints(java.util.Map<java.lang.String,ForeignKeyConstraint> foreignKeyConstraints) PUBLIC: Set the foreign key constraints for this table.
 - 
shouldCreateDatabaseSchemapublic boolean shouldCreateDatabaseSchema(java.util.Set<java.lang.String> createdDatabaseSchemas) If this table has a schema (and catalog specified) make sure it is created.- Overrides:
- shouldCreateDatabaseSchemain class- DatabaseObjectDefinition
 
 - 
shouldCreateVPDCallspublic boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Subclasses who care should override this method.- Overrides:
- shouldCreateVPDCallsin class- DatabaseObjectDefinition
 
 - 
setCreateSQLFilespublic void setCreateSQLFiles(boolean genFlag) PUBLIC:
 - 
getTablepublic org.eclipse.persistence.internal.helper.DatabaseTable getTable() 
 - 
setTablepublic void setTable(org.eclipse.persistence.internal.helper.DatabaseTable table) 
 
- 
 
-