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
FieldsModifier and TypeFieldDescriptionprotected List<CheckConstraint> protected Stringprotected Stringprotected Stringprotected List<FieldDefinition> protected Map<String, ForeignKeyConstraint> protected booleanprotected List<IndexDefinition> protected org.eclipse.persistence.internal.helper.DatabaseTableDeprecated, for removal: This API element is subject to removal in a future version.protected List<UniqueKeyConstraint> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCheckConstraint(CheckConstraint checkConstraint) voidAdd the field to the table, default sizes are used.voidAdd the field to the table.voidAdd the field to the table.voidAdd the field to the type to a nested type.voidaddField(FieldDefinition field) Add the field to the table.voidaddFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field) Deprecated, for removal: This API element is subject to removal in a future version.voidaddForeignKeyConstraint(String name, String sourceField, String targetField, String targetTable) Add a foreign key constraint to the table.voidaddForeignKeyConstraint(ForeignKeyConstraint foreignKey) Add a foreign key constraint to the table.voidaddIdentityField(String fieldName, Class<?> type) Add the field to the table, default sizes are used.voidaddIdentityField(String fieldName, Class<?> type, int fieldSize) Add the field to the table, default sizes are used.voidaddIndex(IndexDefinition index) Add an index to the table.voidaddPrimaryKeyField(String fieldName, Class<?> type) Add the field to the table, default sizes are used.voidaddPrimaryKeyField(String fieldName, Class<?> type, int fieldSize) Add the field to the table, default sizes are used.voidaddUniqueKeyConstraint(String name, String sourceField) Add a unique key constraint to the table.voidaddUniqueKeyConstraint(String name, String[] sourceFields) Add a unique key constraint to the table.voidaddUniqueKeyConstraint(UniqueKeyConstraint uniqueKey) Add a unique key constraint to the table.buildAddFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.protected WriterbuildDatabaseSchemaCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) Deprecated, for removal: This API element is subject to removal in a future version.protected WriterbuildDatabaseSchemaDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildDropFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, String fieldName, Writer writer) INTERNAL: Return the alter table statement to drop the field from the table.protected voidbuildFieldTypes(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Build the foreign key constraints.protected ForeignKeyConstraintbuildForeignKeyConstraint(List<String> fkFieldNames, List<String> pkFieldNames, TableDefinition targetTable, DDLPlatform platform) Deprecated, for removal: This API element is subject to removal in a future version.protected ForeignKeyConstraintbuildForeignKeyConstraint(FieldDefinition field, DDLPlatform platform) Deprecated, for removal: This API element is subject to removal in a future version.buildIndex(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, List<String> columnNames, boolean isUniqueSetOnField) Deprecated, for removal: This API element is subject to removal in a future version.buildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, Writer writer, boolean isUniqueSetOnField) Deprecated, for removal: This API element is subject to removal in a future version.buildUniqueConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.protected UniqueKeyConstraintbuildUniqueKeyConstraint(String name, List<String> fieldNames, int serialNumber, DDLPlatform platform) buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.clone()Performs a deep copy of this table definition.voidcreateConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) Deprecated, for removal: This API element is subject to removal in a future version.voidcreateIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.deletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor) Deprecated, for removal: This API element is subject to removal in a future version.voiddropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) Deprecated, for removal: This API element is subject to removal in a future version.voiddropConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voiddropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.voiddropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voiddropFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, String fieldName) INTERNAL: Execute the SQL alter table to drop the field from the table.voiddropIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.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.Return the schema associated with this table.Return the field the corresponds to the name.INTERNAL:Returns the ForeignKeyConstraint list.org.eclipse.persistence.internal.helper.DatabaseTablegetTable()Deprecated, for removal: This API element is subject to removal in a future version.voidpostCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.voidpreDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.voidsetComment(String comment) voidsetCreateSQLFiles(boolean genFlag) voidsetCreateVPDCalls(boolean createVPDCalls, String tenantFieldName) voidsetCreationPrefix(String creationPrefix) INTERNAL: Set the beginning of the sql create statement - the part before the name.voidsetCreationSuffix(String creationSuffix) INTERNAL: Set the end of the sql create statement - the part after the field list.voidsetFields(List<FieldDefinition> fields) voidsetForeignKeyMap(Map<String, ForeignKeyConstraint> foreignKeyMap) INTERNAL:voidsetForeignKeys(List<ForeignKeyConstraint> foreignKeys) Set the ForeignKeyConstraint list.voidsetIndexes(List<IndexDefinition> indexes) voidsetTable(org.eclipse.persistence.internal.helper.DatabaseTable table) Deprecated, for removal: This API element is subject to removal in a future version.voidsetUniqueKeys(List<UniqueKeyConstraint> uniqueKeys) voidsetUserDefinedForeignKeyConstraints(Map<String, ForeignKeyConstraint> foreignKeyConstraints) Set the foreign key constraints for this table.booleanshouldCreateDatabaseSchema(Set<String> createdDatabaseSchemas) If this table has a schema (and catalog specified) make sure it is created.booleanshouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voidwriteLineSeperator(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
createObject, createOnDatabase, dropFromDatabase, dropObject, getFullName, getName, getQualifier, hasDatabaseSchema, setName, setQualifier, toString
-
Field Details
-
fields
-
foreignKeyMap
-
uniqueKeys
-
checkConstraints
-
indexes
-
creationPrefix
-
creationSuffix
-
comment
-
table
@Deprecated(forRemoval=true, since="4.0.9") protected org.eclipse.persistence.internal.helper.DatabaseTable tableDeprecated, for removal: This API element is subject to removal in a future version. -
hasUserDefinedForeignKeyConstraints
protected boolean hasUserDefinedForeignKeyConstraints
-
-
Constructor Details
-
TableDefinition
public TableDefinition() -
TableDefinition
-
-
Method Details
-
addField
Add the field to the table, default sizes are used.- Parameters:
type- is the Java class type corresponding to the database type.
-
addField
Add the field to the table.- Parameters:
type- is the Java class type corresponding to the database type.
-
addField
Add the field to the table.- Parameters:
type- is the Java class type corresponding to the database type.
-
addField
Add the field to the type to a nested type.- Parameters:
typeName- is the name of the nested type.
-
addField
Add the field to the table. -
addFieldOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void addFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the SQL alter table to add the field to the table. -
buildAddFieldWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildAddFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, FieldDefinition field, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the alter table statement to add a field to the table.- Throws:
ValidationException
-
dropFieldOnDatabase
public void dropFieldOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, String fieldName) INTERNAL: Execute the SQL alter table to drop the field from the table.- Parameters:
session- current database sessionfieldName- name of the field to drop
-
buildDropFieldWriter
public Writer buildDropFieldWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, String fieldName, Writer writer) throws ValidationException INTERNAL: Return the alter table statement to drop the field from the table.- Parameters:
session- current database sessionfieldName- name of the field to dropwriter- target character stream writer- Throws:
ValidationException
-
addForeignKeyConstraint
public void addForeignKeyConstraint(String name, String sourceField, String targetField, String targetTable) Add a foreign key constraint to the table. If there is a same name foreign key constraint already, nothing will happen. -
addUniqueKeyConstraint
Add a unique key constraint to the table. -
addUniqueKeyConstraint
Add a unique key constraint to the table. -
addForeignKeyConstraint
Add a foreign key constraint to the table. If there is a same name foreign key constraint already, nothing will happen. -
addUniqueKeyConstraint
Add a unique key constraint to the table. -
addCheckConstraint
-
getCheckConstraints
-
addIndex
Add an index to the table. -
addIdentityField
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
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
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
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
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the alter table statement to add the constraints. This is done separately from the create because of dependencies.- Throws:
ValidationException
-
buildConstraintDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, ForeignKeyConstraint foreignKey, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.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
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildUniqueConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the alter table statement to add the constraints. This is done separately from the create because of dependencies.- Throws:
ValidationException
-
buildUniqueConstraintDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.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
@Deprecated(forRemoval=true, since="4.0.9") public IndexDefinition buildIndex(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, List<String> columnNames, boolean isUniqueSetOnField) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the index creation statement. -
buildIndexDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, String key, Writer writer, boolean isUniqueSetOnField) Deprecated, for removal: This API element is subject to removal in a future version.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
Return the schema associated with this table.- Overrides:
getDatabaseSchemain classDatabaseObjectDefinition- See Also:
-
setCreationSuffix
INTERNAL: Set the end of the sql create statement - the part after the field list. -
getComment
-
buildCreationWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the create table statement.- Specified by:
buildCreationWriterin classDatabaseObjectDefinition- Throws:
ValidationException
-
buildDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the drop table statement.- Specified by:
buildDeletionWriterin classDatabaseObjectDefinition- Throws:
ValidationException
-
buildVPDCreationPolicyWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildVPDCreationPolicyWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL:- Overrides:
buildVPDCreationPolicyWriterin classDatabaseObjectDefinition
-
buildVPDCreationFunctionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildVPDCreationFunctionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL:- Overrides:
buildVPDCreationFunctionWriterin classDatabaseObjectDefinition
-
buildDatabaseSchemaCreationWriter
@Deprecated(forRemoval=true, since="4.0.9") protected Writer buildDatabaseSchemaCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Build the create schema DDL. -
buildDatabaseSchemaDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") protected Writer buildDatabaseSchemaDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Build the drop schema DDL. -
buildVPDDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildVPDDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL:- Overrides:
buildVPDDeletionWriterin classDatabaseObjectDefinition
-
buildFieldTypes
protected void buildFieldTypes(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Build the foreign key constraints. -
buildForeignKeyConstraint
@Deprecated(forRemoval=true, since="4.0.9") protected ForeignKeyConstraint buildForeignKeyConstraint(FieldDefinition field, DDLPlatform platform) Deprecated, for removal: This API element is subject to removal in a future version.Build a foreign key constraint using FieldDefinition.getForeignKeyFieldName(). -
buildForeignKeyConstraint
@Deprecated(forRemoval=true, since="4.0.9") protected ForeignKeyConstraint buildForeignKeyConstraint(List<String> fkFieldNames, List<String> pkFieldNames, TableDefinition targetTable, DDLPlatform platform) Deprecated, for removal: This API element is subject to removal in a future version.Build a foreign key constraint. -
buildUniqueKeyConstraint
protected UniqueKeyConstraint buildUniqueKeyConstraint(String name, List<String> fieldNames, int serialNumber, DDLPlatform platform) -
clone
Performs a deep copy of this table definition.- Overrides:
clonein classDatabaseObjectDefinition
-
createConstraints
@Deprecated(forRemoval=true, since="4.0.9") public void createConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the SQL alter table constraint creation string.- Throws:
EclipseLinkException
-
createConstraintsOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void createConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the SQL alter table constraint creation string.- Throws:
EclipseLinkException
-
createDatabaseSchema
@Deprecated(forRemoval=true, since="4.0.9") public void createDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer, Set<String> createdDatabaseSchemas) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to create the database schema for this object.- Overrides:
createDatabaseSchemain classDatabaseObjectDefinition- Throws:
EclipseLinkException- See Also:
-
createDatabaseSchemaOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void createDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session, Set<String> createdDatabaseSchemas) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to create the database schema for this object.- Overrides:
createDatabaseSchemaOnDatabasein classDatabaseObjectDefinition- Throws:
EclipseLinkException- See Also:
-
createIndexes
@Deprecated(forRemoval=true, since="4.0.9") public void createIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.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
@Deprecated(forRemoval=true, since="4.0.9") public void writeLineSeperator(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version. -
deletionStringFor
@Deprecated(forRemoval=true, since="4.0.9") public String deletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the delete SQL string. -
dropDatabaseSchema
@Deprecated(forRemoval=true, since="4.0.9") public void dropDatabaseSchema(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to drop the database schema for this object.- Overrides:
dropDatabaseSchemain classDatabaseObjectDefinition- Throws:
EclipseLinkException- See Also:
-
dropDatabaseSchemaOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void dropDatabaseSchemaOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the DDL to drop the database schema for this object.- Overrides:
dropDatabaseSchemaOnDatabasein classDatabaseObjectDefinition- Throws:
EclipseLinkException- See Also:
-
dropConstraints
@Deprecated(forRemoval=true, since="4.0.9") public void dropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Execute the SQL alter table constraint creation string.- Throws:
EclipseLinkException
-
dropConstraintsOnDatabase
@Deprecated(forRemoval=true, since="4.0.9") public void dropConstraintsOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException Deprecated, for removal: This API element is subject to removal in a future version.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
@Deprecated(forRemoval=true, since="4.0.9") public void dropIndexes(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.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
Return the field the corresponds to the name. -
getFields
-
getForeignKeys
Returns the ForeignKeyConstraint list. -
getUniqueKeys
-
setIndexes
-
setCreateVPDCalls
-
getIndexes
-
getPrimaryKeyFieldNames
-
postCreateObject
@Deprecated(forRemoval=true, since="4.0.9") public void postCreateObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer createSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.Execute any statements required after the creation of the object- Overrides:
postCreateObjectin classDatabaseObjectDefinition
-
preDropObject
@Deprecated(forRemoval=true, since="4.0.9") public void preDropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer dropSchemaWriter, boolean createSQLFiles) Deprecated, for removal: This API element is subject to removal in a future version.Execute any statements required before the deletion of the object- Overrides:
preDropObjectin classDatabaseObjectDefinition
-
setFields
-
setForeignKeys
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
-
setUserDefinedForeignKeyConstraints
public void setUserDefinedForeignKeyConstraints(Map<String, ForeignKeyConstraint> foreignKeyConstraints) Set the foreign key constraints for this table. -
shouldCreateDatabaseSchema
If this table has a schema (and catalog specified) make sure it is created.- Overrides:
shouldCreateDatabaseSchemain classDatabaseObjectDefinition
-
shouldCreateVPDCalls
@Deprecated(forRemoval=true, since="4.0.9") public boolean shouldCreateVPDCalls(org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Subclasses who care should override this method.- Overrides:
shouldCreateVPDCallsin classDatabaseObjectDefinition
-
setCreateSQLFiles
public void setCreateSQLFiles(boolean genFlag) -
getTable
@Deprecated(forRemoval=true, since="4.0.9") public org.eclipse.persistence.internal.helper.DatabaseTable getTable()Deprecated, for removal: This API element is subject to removal in a future version. -
setTable
@Deprecated(forRemoval=true, since="4.0.9") public void setTable(org.eclipse.persistence.internal.helper.DatabaseTable table) Deprecated, for removal: This API element is subject to removal in a future version. -
setComment
-