Class SequenceDefinition
- java.lang.Object
-
- org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
-
- org.eclipse.persistence.tools.schemaframework.SequenceDefinition
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
SequenceObjectDefinition
,TableSequenceDefinition
public abstract class SequenceDefinition extends DatabaseObjectDefinition
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 Sequence
sequence
-
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
-
-
Constructor Summary
Constructors Constructor Description SequenceDefinition(java.lang.String name)
SequenceDefinition(Sequence sequence)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
alter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
INTERNAL: Execute the SQL required to alter sequence.void
alterOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: By default does nothing.TableDefinition
buildTableDefinition()
INTERNAL: Return a TableDefinitionabstract boolean
checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERAL: Verify whether the sequence exists.void
createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Creates this sequence definition on the database.boolean
isAlterSupported(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Indicates whether alter is supportedboolean
isTableSequenceDefinition()
INTERNAL:-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
buildCreationWriter, buildDeletionWriter, buildVPDCreationFunctionWriter, buildVPDCreationPolicyWriter, buildVPDDeletionWriter, clone, createDatabaseSchema, createDatabaseSchemaOnDatabase, createObject, dropDatabaseSchema, dropDatabaseSchemaOnDatabase, dropFromDatabase, dropObject, getDatabaseSchema, getFieldTypeDefinition, getFieldTypeDefinition, getFullName, getName, getQualifier, hasDatabaseSchema, postCreateObject, preDropObject, setName, setQualifier, shouldCreateDatabaseSchema, shouldCreateVPDCalls, toString
-
-
-
-
Field Detail
-
sequence
protected Sequence sequence
-
-
Constructor Detail
-
SequenceDefinition
public SequenceDefinition(java.lang.String name)
-
SequenceDefinition
public SequenceDefinition(Sequence sequence)
-
-
Method Detail
-
checkIfExist
public abstract boolean checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
INTERAL: Verify whether the sequence exists.- Throws:
DatabaseException
-
isAlterSupported
public boolean isAlterSupported(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Indicates whether alter is supported
-
isTableSequenceDefinition
public boolean isTableSequenceDefinition()
INTERNAL:
-
alterOnDatabase
public void alterOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException
INTERNAL: By default does nothing.- Throws:
EclipseLinkException
-
alter
public void alter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationException
INTERNAL: Execute the SQL required to alter sequence. By default does nothing.- Throws:
ValidationException
-
createOnDatabase
public void createOnDatabase(org.eclipse.persistence.internal.sessions.AbstractSession session) throws EclipseLinkException
INTERNAL: Creates this sequence definition on the database. If it already exists, the method will attempt to alter it based on what the platform supports.- Overrides:
createOnDatabase
in classDatabaseObjectDefinition
- Throws:
EclipseLinkException
-
buildTableDefinition
public TableDefinition buildTableDefinition()
INTERNAL: Return a TableDefinition
-
-