Class TableDefinition
java.lang.Object
org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
org.eclipse.persistence.tools.schemaframework.TableDefinition
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
TypeTableDefinition
Purpose: Allow a generic way of creating tables on the different platforms.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected List<FieldDefinition>
protected Map<String,
ForeignKeyConstraint> protected boolean
protected List<IndexDefinition>
protected org.eclipse.persistence.internal.helper.DatabaseTable
protected List<UniqueKeyConstraint>
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
PUBLIC: Add the field to the table, default sizes are used.void
PUBLIC: Add the field to the table.void
PUBLIC: Add the field to the table.void
PUBLIC: Add the field to the type to a nested type.void
addField
(FieldDefinition field) PUBLIC: Add the field to the table.void
addFieldOnDatabase
(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field) INTERNAL: Execute the SQL alter table to add the field to the table.void
addForeignKeyConstraint
(String name, String sourceField, String targetField, String targetTable) PUBLIC: Add a foreign key constraint to the table.void
addForeignKeyConstraint
(ForeignKeyConstraint foreignKey) PUBLIC: Add a foreign key constraint to the table.void
addIdentityField
(String fieldName, Class type) PUBLIC: Add the field to the table, default sizes are used.void
addIdentityField
(String fieldName, Class type, int fieldSize) PUBLIC: Add the field to the table, default sizes are used.void
addIndex
(IndexDefinition index) PUBLIC: Add an index to the table.void
addPrimaryKeyField
(String fieldName, Class type) PUBLIC: Add the field to the table, default sizes are used.void
addPrimaryKeyField
(String fieldName, Class type, int fieldSize) PUBLIC: Add the field to the table, default sizes are used.void
addUniqueKeyConstraint
(String name, String sourceField) PUBLIC: Add a unique key constraint to the table.void
addUniqueKeyConstraint
(String name, String[] sourceFields) PUBLIC: Add a unique key constraint to the table.void
addUniqueKeyConstraint
(UniqueKeyConstraint uniqueKey) PUBLIC: Add a unique key constraint to the table.buildAddFieldWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field, Writer writer) INTERNAL: Return the alter table statement to add a field to the table.buildConstraintCreationWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) INTERNAL: Return the alter table statement to add the constraints.buildConstraintDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) INTERNAL: Return the alter table statement to drop the constraints.buildCreationWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the create table statement.protected Writer
buildDatabaseSchemaCreationWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) INTERNAL: Build the create schema DDL.protected Writer
buildDatabaseSchemaDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Build the drop schema DDL.buildDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the drop table statement.protected void
buildFieldTypes
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Build the foreign key constraints.protected ForeignKeyConstraint
buildForeignKeyConstraint
(List<String> fkFieldNames, List<String> pkFieldNames, TableDefinition targetTable, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) Build a foreign key constraint.protected ForeignKeyConstraint
buildForeignKeyConstraint
(FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) Build a foreign key constraint using FieldDefinition.getForeignKeyFieldName().protected String
buildForeignKeyConstraintName
(String tableName, 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.buildIndex
(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, List<String> columnNames, boolean isUniqueSetOnField) INTERNAL: Return the index creation statement.buildIndexDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, Writer writer, boolean isUniqueSetOnField) INTERNAL: Return the index drop statement.protected String
buildIndexName
(String tableName, String key, 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.buildUniqueConstraintCreationWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) INTERNAL: Return the alter table statement to add the constraints.buildUniqueConstraintDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) INTERNAL: Return the alter table statement to drop the constraints.protected UniqueKeyConstraint
buildUniqueKeyConstraint
(String name, List<String> fieldNames, int serialNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) protected String
buildUniqueKeyConstraintName
(String tableName, int serialNumber, int maximumNameLength) Return unique key constraint name built from the table name and sequence number with the specified maximum length.buildVPDCreationFunctionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL:buildVPDCreationPolicyWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL:buildVPDDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL:clone()
PUBLIC: Performs a deep copy of this table definition.void
createConstraints
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) INTERNAL: Execute the SQL alter table constraint creation string.void
createConstraintsOnDatabase
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Execute the SQL alter table constraint creation string.void
createDatabaseSchema
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) INTERNAL: Execute the DDL to create the database schema for this object.void
createDatabaseSchemaOnDatabase
(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) INTERNAL: Execute the DDL to create the database schema for this object.void
createIndexes
(org.eclipse.persistence.internal.sessions.AbstractSession session, 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.deletionStringFor
(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor) INTERNAL: Return the delete SQL string.void
dropConstraints
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) INTERNAL: Execute the SQL alter table constraint creation string.void
dropConstraintsOnDatabase
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Execute the SQL alter table constraint creation string.void
dropDatabaseSchema
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Execute the DDL to drop the database schema for this object.void
dropDatabaseSchemaOnDatabase
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Execute the DDL to drop the database schema for this object.void
dropIndexes
(org.eclipse.persistence.internal.sessions.AbstractSession session, 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.INTERNAL: Return the beginning of the sql create statement - the part before the name.INTERNAL: Return the end of the sql create statement - the part after the field list.PUBLIC: Return the schema associated with this table.PUBLIC: Return the field the corresponds to the name.PUBLIC:INTERNAL:PUBLIC: Returns the ForeignKeyConstraint list.PUBLIC:PUBLIC:org.eclipse.persistence.internal.helper.DatabaseTable
getTable()
PUBLIC:void
postCreateObject
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Execute any statements required after the creation of the objectvoid
preDropObject
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Execute any statements required before the deletion of the objectvoid
setCreateSQLFiles
(boolean genFlag) PUBLIC:void
setCreateVPDCalls
(boolean createVPDCalls, String tenantFieldName) PUBLIC:void
setCreationPrefix
(String creationPrefix) INTERNAL: Set the beginning of the sql create statement - the part before the name.void
setCreationSuffix
(String creationSuffix) INTERNAL: Set the end of the sql create statement - the part after the field list.void
setFields
(List<FieldDefinition> fields) PUBLIC:void
setForeignKeyMap
(Map<String, ForeignKeyConstraint> foreignKeyMap) INTERNAL:void
setForeignKeys
(List<ForeignKeyConstraint> foreignKeys) PUBLIC: Set the ForeignKeyConstraint list.void
setIndexes
(List<IndexDefinition> indexes) PUBLIC:void
setTable
(org.eclipse.persistence.internal.helper.DatabaseTable table) void
setUniqueKeys
(List<UniqueKeyConstraint> uniqueKeys) PUBLIC:void
setUserDefinedForeignKeyConstraints
(Map<String, ForeignKeyConstraint> foreignKeyConstraints) PUBLIC: Set the foreign key constraints for this table.boolean
shouldCreateDatabaseSchema
(Set<String> createdDatabaseSchemas) If this table has a schema (and catalog specified) make sure it is created.boolean
shouldCreateVPDCalls
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Subclasses who care should override this method.void
writeLineSeperator
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
createObject, createOnDatabase, dropFromDatabase, dropObject, getFieldTypeDefinition, getFieldTypeDefinition, getFullName, getName, getQualifier, hasDatabaseSchema, setName, setQualifier, toString
-
Field Details
-
fields
-
foreignKeyMap
-
uniqueKeys
-
indexes
-
creationPrefix
-
creationSuffix
-
table
protected org.eclipse.persistence.internal.helper.DatabaseTable table -
hasUserDefinedForeignKeyConstraints
protected boolean hasUserDefinedForeignKeyConstraints
-
-
Constructor Details
-
TableDefinition
public TableDefinition()
-
-
Method Details
-
addField
PUBLIC: Add the field to the table, default sizes are used.- Parameters:
type
- is the Java class type corresponding to the database type.
-
addField
PUBLIC: Add the field to the table.- Parameters:
type
- is the Java class type corresponding to the database type.
-
addField
PUBLIC: Add the field to the table.- Parameters:
type
- is the Java class type corresponding to the database type.
-
addField
PUBLIC: Add the field to the type to a nested type.- Parameters:
typeName
- is the name of the nested type.
-
addField
PUBLIC: Add the field to the table. -
addFieldOnDatabase
public void addFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field) INTERNAL: Execute the SQL alter table to add the field to the table. -
buildAddFieldWriter
public Writer buildAddFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field, Writer writer) throws ValidationException INTERNAL: Return the alter table statement to add a field to the table.- Throws:
ValidationException
-
addForeignKeyConstraint
public void addForeignKeyConstraint(String name, String sourceField, String targetField, String targetTable) PUBLIC: Add a foreign key constraint to the table. If there is a same name foreign key constraint already, nothing will happen. -
addUniqueKeyConstraint
PUBLIC: Add a unique key constraint to the table. -
addUniqueKeyConstraint
PUBLIC: Add a unique key constraint to the table. -
addForeignKeyConstraint
PUBLIC: Add a foreign key constraint to the table. If there is a same name foreign key constraint already, nothing will happen. -
addUniqueKeyConstraint
PUBLIC: Add a unique key constraint to the table. -
addIndex
PUBLIC: Add an index to the table. -
addIdentityField
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.
-
addIdentityField
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.
-
addPrimaryKeyField
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.
-
addPrimaryKeyField
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.
-
buildConstraintCreationWriter
public Writer buildConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) throws ValidationException INTERNAL: Return the alter table statement to add the constraints. This is done separately from the create because of dependencies.- Throws:
ValidationException
-
buildConstraintDeletionWriter
public Writer buildConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) throws ValidationException INTERNAL: Return the alter table statement to drop the constraints. This is done separately to allow constraints to be dropped before the tables.- Throws:
ValidationException
-
buildUniqueConstraintCreationWriter
public Writer buildUniqueConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) throws ValidationException INTERNAL: Return the alter table statement to add the constraints. This is done separately from the create because of dependencies.- Throws:
ValidationException
-
buildUniqueConstraintDeletionWriter
public Writer buildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) throws ValidationException INTERNAL: Return the alter table statement to drop the constraints. This is done separately to allow constraints to be dropped before the tables.- Throws:
ValidationException
-
buildIndex
public IndexDefinition buildIndex(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, List<String> columnNames, boolean isUniqueSetOnField) INTERNAL: Return the index creation statement. -
buildIndexDeletionWriter
public Writer buildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, Writer writer, boolean isUniqueSetOnField) INTERNAL: Return the index drop statement. -
getCreationPrefix
INTERNAL: Return the beginning of the sql create statement - the part before the name. Unless temp table is created should be "CREATE TABLE " -
setCreationPrefix
INTERNAL: Set the beginning of the sql create statement - the part before the name. Use to create temp. table. -
getCreationSuffix
INTERNAL: Return the end of the sql create statement - the part after the field list. Unless temp table is created should be empty. -
getDatabaseSchema
PUBLIC: Return the schema associated with this table.- Overrides:
getDatabaseSchema
in classDatabaseObjectDefinition
- See Also:
-
setCreationSuffix
INTERNAL: Set the end of the sql create statement - the part after the field list. -
buildCreationWriter
public Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException INTERNAL: Return the create table statement.- Specified by:
buildCreationWriter
in classDatabaseObjectDefinition
- Throws:
ValidationException
-
buildDeletionWriter
public Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException INTERNAL: Return the drop table statement.- Specified by:
buildDeletionWriter
in classDatabaseObjectDefinition
- Throws:
ValidationException
-
buildVPDCreationPolicyWriter
public Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL:- Overrides:
buildVPDCreationPolicyWriter
in classDatabaseObjectDefinition
-
buildVPDCreationFunctionWriter
public Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL:- Overrides:
buildVPDCreationFunctionWriter
in classDatabaseObjectDefinition
-
buildDatabaseSchemaCreationWriter
protected Writer buildDatabaseSchemaCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) INTERNAL: Build the create schema DDL. -
buildDatabaseSchemaDeletionWriter
protected Writer buildDatabaseSchemaDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Build the drop schema DDL. -
buildVPDDeletionWriter
public Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL:- Overrides:
buildVPDDeletionWriter
in classDatabaseObjectDefinition
-
buildFieldTypes
protected void buildFieldTypes(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Build the foreign key constraints. -
buildForeignKeyConstraint
protected ForeignKeyConstraint buildForeignKeyConstraint(FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) Build a foreign key constraint using FieldDefinition.getForeignKeyFieldName(). -
buildForeignKeyConstraint
protected ForeignKeyConstraint buildForeignKeyConstraint(List<String> fkFieldNames, List<String> pkFieldNames, TableDefinition targetTable, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) Build a foreign key constraint. -
buildForeignKeyConstraintName
protected String buildForeignKeyConstraintName(String tableName, 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. -
buildUniqueKeyConstraint
protected UniqueKeyConstraint buildUniqueKeyConstraint(String name, List<String> fieldNames, int serialNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform) -
buildUniqueKeyConstraintName
protected String buildUniqueKeyConstraintName(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. -
buildIndexName
protected String buildIndexName(String tableName, String key, 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.
-
clone
PUBLIC: Performs a deep copy of this table definition.- Overrides:
clone
in classDatabaseObjectDefinition
-
createConstraints
public void createConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws EclipseLinkException INTERNAL: Execute the SQL alter table constraint creation string.- Throws:
EclipseLinkException
-
createConstraintsOnDatabase
public void createConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException INTERNAL: Execute the SQL alter table constraint creation string.- Throws:
EclipseLinkException
-
createDatabaseSchema
public void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) throws EclipseLinkException INTERNAL: Execute the DDL to create the database schema for this object.- Overrides:
createDatabaseSchema
in classDatabaseObjectDefinition
- Throws:
EclipseLinkException
- See Also:
-
createDatabaseSchemaOnDatabase
public void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) throws EclipseLinkException INTERNAL: Execute the DDL to create the database schema for this object.- Overrides:
createDatabaseSchemaOnDatabase
in classDatabaseObjectDefinition
- Throws:
EclipseLinkException
- See Also:
-
createIndexes
public void createIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, 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
-
writeLineSeperator
public void writeLineSeperator(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) -
deletionStringFor
public String deletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor) INTERNAL: Return the delete SQL string. -
dropDatabaseSchema
public void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws EclipseLinkException INTERNAL: Execute the DDL to drop the database schema for this object.- Overrides:
dropDatabaseSchema
in classDatabaseObjectDefinition
- Throws:
EclipseLinkException
- See Also:
-
dropDatabaseSchemaOnDatabase
public void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException INTERNAL: Execute the DDL to drop the database schema for this object.- Overrides:
dropDatabaseSchemaOnDatabase
in classDatabaseObjectDefinition
- Throws:
EclipseLinkException
- See Also:
-
dropConstraints
public void dropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws EclipseLinkException INTERNAL: Execute the SQL alter table constraint creation string.- Throws:
EclipseLinkException
-
dropConstraintsOnDatabase
public void dropConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException INTERNAL: 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
-
dropIndexes
public void dropIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, 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
-
getForeignKeyMap
INTERNAL: -
setForeignKeyMap
INTERNAL: -
getField
PUBLIC: Return the field the corresponds to the name. -
getFields
PUBLIC: -
getForeignKeys
PUBLIC: Returns the ForeignKeyConstraint list. -
getUniqueKeys
PUBLIC: -
setIndexes
PUBLIC: -
setCreateVPDCalls
PUBLIC: -
getIndexes
PUBLIC: -
getPrimaryKeyFieldNames
PUBLIC: -
postCreateObject
public void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Execute any statements required after the creation of the object- Overrides:
postCreateObject
in classDatabaseObjectDefinition
- Parameters:
session
-createSchemaWriter
-
-
preDropObject
public void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Execute any statements required before the deletion of the object- Overrides:
preDropObject
in classDatabaseObjectDefinition
- Parameters:
session
-dropSchemaWriter
-
-
setFields
PUBLIC: -
setForeignKeys
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. -
setUniqueKeys
PUBLIC: -
setUserDefinedForeignKeyConstraints
public void setUserDefinedForeignKeyConstraints(Map<String, ForeignKeyConstraint> foreignKeyConstraints) PUBLIC: Set the foreign key constraints for this table. -
shouldCreateDatabaseSchema
If this table has a schema (and catalog specified) make sure it is created.- Overrides:
shouldCreateDatabaseSchema
in classDatabaseObjectDefinition
-
shouldCreateVPDCalls
public boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Subclasses who care should override this method.- Overrides:
shouldCreateVPDCalls
in classDatabaseObjectDefinition
-
setCreateSQLFiles
public void setCreateSQLFiles(boolean genFlag) PUBLIC: -
getTable
public org.eclipse.persistence.internal.helper.DatabaseTable getTable() -
setTable
public void setTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
-