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:
Serializable
,Cloneable
Purpose: Sequence definition Native Sequence object.
- See Also:
-
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
ConstructorDescriptionSequenceObjectDefinition
(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
Modifier and TypeMethodDescriptionvoid
alterIncrement
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) INTERNAL: Execute the SQL required to alter sequence increment.void
alterOnDatabase
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Execute the SQL required to alter sequence increment.buildAlterIncrementWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the SQL required to alter INCREMENT BYbuildCreationWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the SQL required to create the Oracle sequence object.buildDeletionWriter
(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the SQL required to drop the Oracle sequence object.boolean
checkIfExist
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Check if the sequence object already exists, in which case dont create it.INTERNAL: Most major databases support a creator name scope.boolean
isAlterSupported
(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Indicates whether alterIncrement is supportedMethods 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 Details
-
SequenceObjectDefinition
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 Details
-
buildCreationWriter
public Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the SQL required to create the Oracle sequence object.- Specified by:
buildCreationWriter
in classDatabaseObjectDefinition
-
buildDeletionWriter
public Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the SQL required to drop the Oracle sequence object.- Specified by:
buildDeletionWriter
in classDatabaseObjectDefinition
-
buildAlterIncrementWriter
public Writer buildAlterIncrementWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) INTERNAL: Return the SQL required to alter INCREMENT BY -
checkIfExist
public boolean checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException INTERNAL: Check if the sequence object already exists, in which case dont create it.- Specified by:
checkIfExist
in classSequenceDefinition
- Throws:
DatabaseException
-
isAlterSupported
public boolean isAlterSupported(org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Indicates whether alterIncrement is supported- Overrides:
isAlterSupported
in classSequenceDefinition
-
alterOnDatabase
public void alterOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException INTERNAL: Execute the SQL required to alter sequence increment. Assume that the sequence exists.- Overrides:
alterOnDatabase
in classSequenceDefinition
- Throws:
EclipseLinkException
-
alterIncrement
public void alterIncrement(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer schemaWriter) throws ValidationException INTERNAL: Execute the SQL required to alter sequence increment. Assume that the sequence exists.- Throws:
ValidationException
-
getFullName
INTERNAL: Most major databases support a creator name scope. This means whenever the database object is referenced, it must be qualified.- Overrides:
getFullName
in classDatabaseObjectDefinition
-