Class SequenceObjectDefinition
- java.lang.Object
-
- org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
-
- org.eclipse.persistence.tools.schemaframework.SequenceDefinition
-
- org.eclipse.persistence.tools.schemaframework.SequenceObjectDefinition
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class SequenceObjectDefinition extends SequenceDefinition
Purpose: Sequence definition Native Sequence object.
- See Also:
- Serialized Form
-
-
Field Summary
-
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 SequenceObjectDefinition(Sequence sequence)INTERNAL: Should be a sequence defining sequence object in the db: either NativeSequence with shouldAcquireValueAfterInsert() returning false; or DefaultSequence (only if case platform.getDefaultSequence() is a NativeSequence with shouldAcquireValueAfterInsert() returning false).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalterIncrement(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter)INTERNAL: Execute the SQL required to alter sequence increment.voidalterOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Execute the SQL required to alter sequence increment.java.io.WriterbuildAlterIncrementWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the SQL required to alter INCREMENT BYjava.io.WriterbuildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the SQL required to create the Oracle sequence object.java.io.WriterbuildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the SQL required to drop the Oracle sequence object.booleancheckIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Check if the sequence object already exists, in which case dont create it.java.lang.StringgetFullName()INTERNAL: Most major databases support a creator name scope.booleanisAlterSupported(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Indicates whether alterIncrement is supported-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.SequenceDefinition
alter, buildTableDefinition, createOnDatabase, isTableSequenceDefinition
-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
buildVPDCreationFunctionWriter, buildVPDCreationPolicyWriter, buildVPDDeletionWriter, clone, createDatabaseSchema, createDatabaseSchemaOnDatabase, createObject, dropDatabaseSchema, dropDatabaseSchemaOnDatabase, dropFromDatabase, dropObject, getDatabaseSchema, getFieldTypeDefinition, getFieldTypeDefinition, getName, getQualifier, hasDatabaseSchema, postCreateObject, preDropObject, setName, setQualifier, shouldCreateDatabaseSchema, shouldCreateVPDCalls, toString
-
-
-
-
Constructor Detail
-
SequenceObjectDefinition
public SequenceObjectDefinition(Sequence sequence)
INTERNAL: Should be a sequence defining sequence object in the db: either NativeSequence with shouldAcquireValueAfterInsert() returning false; or DefaultSequence (only if case platform.getDefaultSequence() is a NativeSequence with shouldAcquireValueAfterInsert() returning false).
-
-
Method Detail
-
buildCreationWriter
public java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the SQL required to create the Oracle sequence object.- Specified by:
buildCreationWriterin classDatabaseObjectDefinition
-
buildDeletionWriter
public java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the SQL required to drop the Oracle sequence object.- Specified by:
buildDeletionWriterin classDatabaseObjectDefinition
-
buildAlterIncrementWriter
public java.io.Writer buildAlterIncrementWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)INTERNAL: Return the SQL required to alter INCREMENT BY
-
checkIfExist
public boolean checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseExceptionINTERNAL: Check if the sequence object already exists, in which case dont create it.- Specified by:
checkIfExistin classSequenceDefinition- Throws:
DatabaseException
-
isAlterSupported
public boolean isAlterSupported(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Indicates whether alterIncrement is supported- Overrides:
isAlterSupportedin classSequenceDefinition
-
alterOnDatabase
public void alterOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkExceptionINTERNAL: Execute the SQL required to alter sequence increment. Assume that the sequence exists.- Overrides:
alterOnDatabasein classSequenceDefinition- Throws:
EclipseLinkException
-
alterIncrement
public void alterIncrement(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer schemaWriter) throws ValidationExceptionINTERNAL: Execute the SQL required to alter sequence increment. Assume that the sequence exists.- Throws:
ValidationException
-
getFullName
public java.lang.String getFullName()
INTERNAL: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified.- Overrides:
getFullNamein classDatabaseObjectDefinition
-
-