Module eclipselink
Class TableSequenceDefinition
- java.lang.Object
-
- org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
-
- org.eclipse.persistence.tools.schemaframework.SequenceDefinition
-
- org.eclipse.persistence.tools.schemaframework.TableSequenceDefinition
-
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
UnaryTableSequenceDefinition
public class TableSequenceDefinition extends SequenceDefinition
Purpose: Allow a generic way of creating sequences on the different platforms, and allow optional parameters to be specified.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandeleteSchemaprotected TableDefinitiontableDefinition-
Fields inherited from class org.eclipse.persistence.tools.schemaframework.SequenceDefinition
sequence
-
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
-
-
Constructor Summary
Constructors Constructor Description TableSequenceDefinition(String name, boolean deleteSchema)INTERNAL: Should be a sequence defining table sequence in the db: either TableSequence DefaultSequence (only if case platform.getDefaultSequence() is a TableSequence).TableSequenceDefinition(Sequence sequence, boolean deleteSchema)Deprecated, for removal: This API element is subject to removal in a future version.Use TableSequenceDefinition(String, boolean) instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WriterbuildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)Deprecated, for removal: This API element is subject to removal in a future version.WriterbuildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer)Deprecated, for removal: This API element is subject to removal in a future version.TableDefinitionbuildTableDefinition()INTERNAL: Return a TableDefinition specifying sequence table.booleancheckIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session)Deprecated, for removal: This API element is subject to removal in a future version.ImplementDatabasePlatform.checkSequenceExists(...)instead.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.StringgetDatabaseSchema()PUBLIC: Return the schema associated with this table sequence.StringgetSequenceCounterFieldName()PUBLIC:StringgetSequenceNameFieldName()PUBLIC:org.eclipse.persistence.internal.helper.DatabaseTablegetSequenceTable()Deprecated, for removal: This API element is subject to removal in a future version.To be removed with no replacement.List<IndexDefinition>getSequenceTableIndexes()PUBLIC:StringgetSequenceTableName()PUBLIC:StringgetSequenceTableQualifiedName()PUBLIC:StringgetSequenceTableQualifier()PUBLIC:protected TableSequencegetTableSequence()Deprecated, for removal: This API element is subject to removal in a future version.To be removed with no replacement.booleanisTableSequenceDefinition()INTERNAL: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.voidsetSequenceCounterFieldName(String sequenceCounterFieldName)voidsetSequenceNameFieldName(String sequenceNameFieldName)voidsetSequenceTableIndexes(List<IndexDefinition> sequenceTableIndexes)voidsetSequenceTableName(String sequenceTableName)voidsetSequenceTableQualifier(String sequenceTableQualifier)protected booleanshouldDropTableDefinition()INTERNAL: Returns true if the table definition should be dropped during buildDeletionWriter.-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.SequenceDefinition
alter, alterOnDatabase, createOnDatabase, getInitialValue, getPreallocationSize, isAlterSupported, setInitialValue, setPreallocationSize
-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
buildVPDCreationFunctionWriter, buildVPDCreationPolicyWriter, buildVPDDeletionWriter, clone, createDatabaseSchema, createDatabaseSchemaOnDatabase, createObject, dropFromDatabase, dropObject, getFieldTypeDefinition, getFieldTypeDefinition, getFullName, getName, getQualifier, hasDatabaseSchema, postCreateObject, setName, setQualifier, shouldCreateDatabaseSchema, shouldCreateVPDCalls, toString
-
-
-
-
Field Detail
-
tableDefinition
protected TableDefinition tableDefinition
-
deleteSchema
protected boolean deleteSchema
-
-
Constructor Detail
-
TableSequenceDefinition
@Deprecated(forRemoval=true, since="4.0.9") public TableSequenceDefinition(Sequence sequence, boolean deleteSchema)
Deprecated, for removal: This API element is subject to removal in a future version.Use TableSequenceDefinition(String, boolean) instead.INTERNAL: Should be a sequence defining table sequence in the db: either TableSequence DefaultSequence (only if case platform.getDefaultSequence() is a TableSequence).
-
TableSequenceDefinition
public TableSequenceDefinition(String name, boolean deleteSchema)
INTERNAL: Should be a sequence defining table sequence in the db: either TableSequence DefaultSequence (only if case platform.getDefaultSequence() is a TableSequence).
-
-
Method Detail
-
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 SQL required to insert the sequence row into the sequence table. Assume that the sequence table exists.- 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 SQL to delete the row from the sequence table. If we're dealing with create creation, then delegate to the table so that is dropped outright since we will delete the schema.- Specified by:
buildDeletionWriterin classDatabaseObjectDefinition- Throws:
ValidationException
-
checkIfExist
@Deprecated(forRemoval=true, since="4.0.9") public boolean checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
Deprecated, for removal: This API element is subject to removal in a future version.ImplementDatabasePlatform.checkSequenceExists(...)instead.INTERNAL: Execute the SQL required to insert the sequence row into the sequence table. Assume that the sequence table exists.- Specified by:
checkIfExistin classSequenceDefinition- Throws:
DatabaseException
-
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. Does nothing at this level, subclasses that support this must override this method.- Overrides:
dropDatabaseSchemain classDatabaseObjectDefinition- Throws:
EclipseLinkException- See Also:
TableDefinition
-
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. Does nothing at this level, subclasses that support this must override this method.- Overrides:
dropDatabaseSchemaOnDatabasein classDatabaseObjectDefinition- Throws:
EclipseLinkException- See Also:
TableDefinition
-
getDatabaseSchema
public String getDatabaseSchema()
PUBLIC: Return the schema associated with this table sequence.- Overrides:
getDatabaseSchemain classDatabaseObjectDefinition- See Also:
TableDefinition
-
getSequenceCounterFieldName
public String getSequenceCounterFieldName()
PUBLIC:
-
getSequenceNameFieldName
public String getSequenceNameFieldName()
PUBLIC:
-
getSequenceTable
@Deprecated(forRemoval=true, since="4.0.9") public org.eclipse.persistence.internal.helper.DatabaseTable getSequenceTable()
Deprecated, for removal: This API element is subject to removal in a future version.To be removed with no replacement.Return the database table for the sequence.
-
getSequenceTableIndexes
public List<IndexDefinition> getSequenceTableIndexes()
PUBLIC:
-
getSequenceTableName
public String getSequenceTableName()
PUBLIC:
-
getSequenceTableQualifier
public String getSequenceTableQualifier()
PUBLIC:
-
getSequenceTableQualifiedName
public String getSequenceTableQualifiedName()
PUBLIC:
-
buildTableDefinition
public TableDefinition buildTableDefinition()
INTERNAL: Return a TableDefinition specifying sequence table. Cache the table definition for re-use (during CREATE and DROP)- Overrides:
buildTableDefinitionin classSequenceDefinition
-
getTableSequence
@Deprecated(forRemoval=true, since="4.0.9") protected TableSequence getTableSequence()
Deprecated, for removal: This API element is subject to removal in a future version.To be removed with no replacement.
-
isTableSequenceDefinition
public boolean isTableSequenceDefinition()
INTERNAL:- Overrides:
isTableSequenceDefinitionin classSequenceDefinition
-
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
-
setSequenceCounterFieldName
public void setSequenceCounterFieldName(String sequenceCounterFieldName)
-
setSequenceNameFieldName
public void setSequenceNameFieldName(String sequenceNameFieldName)
-
setSequenceTableIndexes
public void setSequenceTableIndexes(List<IndexDefinition> sequenceTableIndexes)
-
setSequenceTableName
public void setSequenceTableName(String sequenceTableName)
-
setSequenceTableQualifier
public void setSequenceTableQualifier(String sequenceTableQualifier)
-
shouldDropTableDefinition
protected boolean shouldDropTableDefinition()
INTERNAL: Returns true if the table definition should be dropped during buildDeletionWriter.
-
-