EclipseLink 2.1.2, build 'v20101206-r8635' API Reference

org.eclipse.persistence.tools.schemaframework
Class TableDefinition

java.lang.Object
  extended by org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
      extended by 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 Summary
protected  java.lang.String creationPrefix
           
protected  java.lang.String creationSuffix
           
protected  java.util.Vector<FieldDefinition> fields
           
protected  java.util.HashMap<java.lang.String,ForeignKeyConstraint> foreignKeyMap
           
protected  java.util.Vector<UniqueKeyConstraint> uniqueKeys
           
 
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
 
Constructor Summary
TableDefinition()
           
 
Method Summary
 void addField(FieldDefinition field)
          PUBLIC: Add the field to the table.
 void addField(java.lang.String fieldName, java.lang.Class type)
          PUBLIC: Add the field to the table, default sizes are used.
 void addField(java.lang.String fieldName, java.lang.Class type, int fieldSize)
          PUBLIC: Add the field to the table.
 void addField(java.lang.String fieldName, java.lang.Class type, int fieldSize, int fieldSubSize)
          PUBLIC: Add the field to the table.
 void addField(java.lang.String fieldName, java.lang.String typeName)
          PUBLIC: Add the field to the type to a nested type.
 void addForeignKeyConstraint(ForeignKeyConstraint foreignKey)
          PUBLIC: Add a foreign key constraint to the table.
 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.
 void addIdentityField(java.lang.String fieldName, java.lang.Class type)
          PUBLIC: Add the field to the table, default sizes are used.
 void addIdentityField(java.lang.String fieldName, java.lang.Class type, int fieldSize)
          PUBLIC: Add the field to the table, default sizes are used.
 void addPrimaryKeyField(java.lang.String fieldName, java.lang.Class type)
          PUBLIC: Add the field to the table, default sizes are used.
 void addPrimaryKeyField(java.lang.String fieldName, java.lang.Class type, int fieldSize)
          PUBLIC: Add the field to the table, default sizes are used.
 void addUniqueKeyConstraint(java.lang.String name, java.lang.String sourceField)
          PUBLIC: Add a unique key constraint to the table.
 void addUniqueKeyConstraint(java.lang.String name, java.lang.String[] sourceFields)
          PUBLIC: Add a unique key constraint to the table.
 void addUniqueKeyConstraint(UniqueKeyConstraint uniqueKey)
          PUBLIC: Add a unique key constraint to the table.
 java.io.Writer buildConstraintCreationWriter(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.Writer buildConstraintDeletionWriter(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.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Return the create table statement.
 java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.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(FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
          Build a foreign key constraint using FieldDefinition.getForeignKeyFieldName().
protected  ForeignKeyConstraint buildForeignKeyConstraint(java.util.Vector fkFieldNames, java.util.Vector pkFieldNames, TableDefinition targetTable, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
          Build a foreign key constraint.
protected  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.
 java.io.Writer buildIndexCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String key, java.util.List<java.lang.String> columnNames, java.io.Writer writer)
          INTERNAL: Return the index creation statement.
 java.io.Writer buildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String key, java.io.Writer writer)
          INTERNAL: Return the index drop statement.
protected  java.lang.String buildIndexName(java.lang.String tableName, java.lang.String key, 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.
 java.io.Writer buildUniqueConstraintCreationWriter(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.Writer buildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, UniqueKeyConstraint uniqueKey, java.io.Writer writer)
          INTERNAL: Return the alter table statement to drop the constraints.
protected  UniqueKeyConstraint buildUniqueKeyConstraint(java.lang.String name, java.util.List<java.lang.String> fieldNames, int serialNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
           
protected  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.
 java.lang.Object clone()
          PUBLIC: Performs a deep copy of this table definition.
 void createConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.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 createIndexOnPrimaryKey(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)
          INTERNAL:
Write the SQL create index string to create index on primary key if passed a writer, else delegate to a method that executes the string on the database.
 void createIndexOnPrimaryKeyOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL:
Execute the SQL create index statement to create index on the primary key.
 void createIndicesOnUniqueKeys(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)
          INTERNAL:
Write the SQL create index string if passed a writer, else delegate to a method that executes the string on the database.
 void createIndicesOnUniqueKeysOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL:
Execute the SQL create index statement to create index on the unique keys.
 void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Execute the DDL to create this table.
 java.lang.String deletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor)
          INTERNAL: Return the delete SQL string.
 void dropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.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 dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Execute the DDL to drop the table.
 void dropIndexOnPrimaryKey(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)
          INTERNAL:
Write the SQL drop index string to drop index on PK if passed a writer, else delegate to a method that executes the string on the database.
 void dropIndexOnPrimaryKeyOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL:
Execute the SQL drop index string to drop the index on the PK.
 void dropIndicesOnUniqueKeys(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)
          INTERNAL:
Execute the SQL drop index string to drop indices.
 void dropIndicesOnUniqueKeysOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL:
Execute the SQL drop index string on the database.
 void dropObject(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter, boolean createSQLFiles)
          INTERNAL: Execute the DDL to drop the table.
 java.lang.String getCreationPrefix()
          INTERNAL: Return the beginning of the sql create statement - the part before the name.
 java.lang.String getCreationSuffix()
          INTERNAL: Return the end of the sql create statement - the part after the field list.
 java.util.Vector<FieldDefinition> getFields()
          PUBLIC:
 java.util.Vector<ForeignKeyConstraint> getForeignKeys()
          PUBLIC: Returns the ForeignKeyConstraint list.
 java.util.Vector<java.lang.String> getPrimaryKeyFieldNames()
          PUBLIC:
 java.util.Vector<UniqueKeyConstraint> getUniqueKeys()
          PUBLIC:
 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
 void setCreateSQLFiles(boolean genFlag)
          PUBLIC:
 void setCreationPrefix(java.lang.String creationPrefix)
          INTERNAL: Set the beginning of the sql create statement - the part before the name.
 void setCreationSuffix(java.lang.String creationSuffix)
          INTERNAL: Set the end of the sql create statement - the part after the field list.
 void setFields(java.util.Vector<FieldDefinition> fields)
          PUBLIC:
 void setForeignKeys(java.util.Vector<ForeignKeyConstraint> foreignKeys)
          PUBLIC: Set the ForeignKeyConstraint list.
 void setUniqueKeys(java.util.Vector<UniqueKeyConstraint> uniqueKeys)
          PUBLIC:
 
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
createObject, getFullName, getName, getQualifier, setName, setQualifier, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fields

protected java.util.Vector<FieldDefinition> fields

foreignKeyMap

protected java.util.HashMap<java.lang.String,ForeignKeyConstraint> foreignKeyMap

uniqueKeys

protected java.util.Vector<UniqueKeyConstraint> uniqueKeys

creationPrefix

protected java.lang.String creationPrefix

creationSuffix

protected java.lang.String creationSuffix
Constructor Detail

TableDefinition

public TableDefinition()
Method Detail

addField

public 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.

addField

public 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.

addField

public 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.

addField

public 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.

addField

public void addField(FieldDefinition field)
PUBLIC: Add the field to the table.


addForeignKeyConstraint

public 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.


addUniqueKeyConstraint

public void addUniqueKeyConstraint(java.lang.String name,
                                   java.lang.String sourceField)
PUBLIC: Add a unique key constraint to the table.


addUniqueKeyConstraint

public void addUniqueKeyConstraint(java.lang.String name,
                                   java.lang.String[] sourceFields)
PUBLIC: Add a unique key constraint to the table.


addForeignKeyConstraint

public 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.


addUniqueKeyConstraint

public void addUniqueKeyConstraint(UniqueKeyConstraint uniqueKey)
PUBLIC: Add a unique key constraint to the table.


addIdentityField

public 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.

addIdentityField

public 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.

addPrimaryKeyField

public 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.

addPrimaryKeyField

public 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.

buildConstraintCreationWriter

public java.io.Writer buildConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                    ForeignKeyConstraint foreignKey,
                                                    java.io.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 java.io.Writer buildConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                    ForeignKeyConstraint foreignKey,
                                                    java.io.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 java.io.Writer buildUniqueConstraintCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                          UniqueKeyConstraint uniqueKey,
                                                          java.io.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 java.io.Writer buildUniqueConstraintDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                          UniqueKeyConstraint uniqueKey,
                                                          java.io.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

buildIndexCreationWriter

public java.io.Writer buildIndexCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                               java.lang.String key,
                                               java.util.List<java.lang.String> columnNames,
                                               java.io.Writer writer)
                                        throws ValidationException
INTERNAL: Return the index creation statement.

Throws:
ValidationException

buildIndexDeletionWriter

public java.io.Writer buildIndexDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                               java.lang.String key,
                                               java.io.Writer writer)
                                        throws ValidationException
INTERNAL: Return the index drop statement.

Throws:
ValidationException

getCreationPrefix

public 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 "


setCreationPrefix

public 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.


getCreationSuffix

public 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.


setCreationSuffix

public void setCreationSuffix(java.lang.String creationSuffix)
INTERNAL: Set the end of the sql create statement - the part after the field list. Use to create temp table.


buildCreationWriter

public java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                          java.io.Writer writer)
                                   throws ValidationException
INTERNAL: Return the create table statement.

Specified by:
buildCreationWriter in class DatabaseObjectDefinition
Throws:
ValidationException

buildDeletionWriter

public java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                          java.io.Writer writer)
                                   throws ValidationException
INTERNAL: Return the drop table statement.

Specified by:
buildDeletionWriter in class DatabaseObjectDefinition
Throws:
ValidationException

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(java.util.Vector fkFieldNames,
                                                         java.util.Vector pkFieldNames,
                                                         TableDefinition targetTable,
                                                         org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
Build a foreign key constraint.


buildForeignKeyConstraintName

protected 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.


buildUniqueKeyConstraint

protected UniqueKeyConstraint buildUniqueKeyConstraint(java.lang.String name,
                                                       java.util.List<java.lang.String> fieldNames,
                                                       int serialNumber,
                                                       org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)

buildUniqueKeyConstraintName

protected 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.


buildIndexName

protected java.lang.String buildIndexName(java.lang.String tableName,
                                          java.lang.String key,
                                          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. To make the name short enough we:
 1. Drop the "IX_" 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 java.lang.Object clone()
PUBLIC: Performs a deep copy of this table definition.

Overrides:
clone in class DatabaseObjectDefinition

createConstraints

public void createConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session,
                              java.io.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

createIndexOnPrimaryKey

public void createIndexOnPrimaryKey(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                    java.io.Writer schemaWriter)
INTERNAL:
Write the SQL create index string to create index on primary key if passed a writer, else delegate to a method that executes the string on the database.

Throws:
ValidationException - wraps any IOException from the writer
See Also:
createIndexOnPrimaryKeyOnDatabase(AbstractSession)

createIndicesOnUniqueKeys

public void createIndicesOnUniqueKeys(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                      java.io.Writer schemaWriter)
                               throws EclipseLinkException
INTERNAL:
Write the SQL create index string if passed a writer, else delegate to a method that executes the string on the database.

Throws:
ValidationException - wraps any IOException from the writer
EclipseLinkException
See Also:
createIndicesOnUniqueKeysOnDatabase(AbstractSession)

createIndexOnPrimaryKeyOnDatabase

public void createIndexOnPrimaryKeyOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Execute the SQL create index statement to create index on the primary key.


createIndicesOnUniqueKeysOnDatabase

public void createIndicesOnUniqueKeysOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Execute the SQL create index statement to create index on the unique keys.


createOnDatabase

public void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                      throws EclipseLinkException
INTERNAL: Execute the DDL to create this table.

Overrides:
createOnDatabase in class DatabaseObjectDefinition
Throws:
EclipseLinkException

deletionStringFor

public java.lang.String deletionStringFor(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor)
INTERNAL: Return the delete SQL string.


dropConstraints

public void dropConstraints(org.eclipse.persistence.internal.sessions.AbstractSession session,
                            java.io.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

dropFromDatabase

public void dropFromDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                      throws EclipseLinkException
INTERNAL: Execute the DDL to drop the table.

Overrides:
dropFromDatabase in class DatabaseObjectDefinition
Throws:
EclipseLinkException

dropIndexOnPrimaryKey

public void dropIndexOnPrimaryKey(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                  java.io.Writer schemaWriter)
                           throws EclipseLinkException
INTERNAL:
Write the SQL drop index string to drop index on PK if passed a writer, else delegate to a method that executes the string on the database.

Throws:
ValidationException - wraps any IOException from the writer
EclipseLinkException
See Also:
dropIndexOnPrimaryKeyOnDatabase(AbstractSession)

dropIndicesOnUniqueKeys

public void dropIndicesOnUniqueKeys(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                    java.io.Writer schemaWriter)
                             throws EclipseLinkException
INTERNAL:
Execute the SQL drop index string to drop indices.
Exceptions are caught and masked so that all the indices are dropped (even if they don't exist).

Throws:
EclipseLinkException

dropIndexOnPrimaryKeyOnDatabase

public void dropIndexOnPrimaryKeyOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                                     throws EclipseLinkException
INTERNAL:
Execute the SQL drop index string to drop the index on the PK.
Exceptions are caught and masked (even if index doesn't exist).

Throws:
EclipseLinkException

dropIndicesOnUniqueKeysOnDatabase

public void dropIndicesOnUniqueKeysOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
                                       throws EclipseLinkException
INTERNAL:
Execute the SQL drop index string on the database.
Exceptions are caught and masked so that all the indices are dropped (even if they don't exist).

Throws:
EclipseLinkException

dropObject

public void dropObject(org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.io.Writer schemaWriter,
                       boolean createSQLFiles)
                throws EclipseLinkException
INTERNAL: Execute the DDL to drop the table. Either directly from the database of write out the statement to a file.

Overrides:
dropObject in class DatabaseObjectDefinition
Throws:
EclipseLinkException

getFields

public java.util.Vector<FieldDefinition> getFields()
PUBLIC:


getForeignKeys

public java.util.Vector<ForeignKeyConstraint> getForeignKeys()
PUBLIC: Returns the ForeignKeyConstraint list.


getUniqueKeys

public java.util.Vector<UniqueKeyConstraint> getUniqueKeys()
PUBLIC:


getPrimaryKeyFieldNames

public java.util.Vector<java.lang.String> getPrimaryKeyFieldNames()
PUBLIC:


postCreateObject

public 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:
postCreateObject in class DatabaseObjectDefinition
Parameters:
session -
createSchemaWriter -

setFields

public void setFields(java.util.Vector<FieldDefinition> fields)
PUBLIC:


setForeignKeys

public void setForeignKeys(java.util.Vector<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.


setUniqueKeys

public void setUniqueKeys(java.util.Vector<UniqueKeyConstraint> uniqueKeys)
PUBLIC:


setCreateSQLFiles

public void setCreateSQLFiles(boolean genFlag)
PUBLIC:


EclipseLink 2.1.2, build 'v20101206-r8635' API Reference