Class UnaryTableSequenceDefinition
- java.lang.Object
-
- org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
-
- org.eclipse.persistence.tools.schemaframework.SequenceDefinition
-
- org.eclipse.persistence.tools.schemaframework.TableSequenceDefinition
-
- org.eclipse.persistence.tools.schemaframework.UnaryTableSequenceDefinition
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class UnaryTableSequenceDefinition extends TableSequenceDefinition
Purpose: Creates / drops an unary sequence table: the name of the table is sequence name; its only field is named unarySequenceCounterFieldName
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.tools.schemaframework.TableSequenceDefinition
deleteSchema, tableDefinition
-
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 UnaryTableSequenceDefinition(Sequence sequence)
INTERNAL: Should be a sequence defining unary table sequence in the db: either UnaryTableSequence DefaultSequence (only if case platform.getDefaultSequence() is an UnaryTableSequence).UnaryTableSequenceDefinition(Sequence sequence, boolean deleteSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Writer
buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
INTERNAL: Return the SQL required to create the unary sequence table.java.io.Writer
buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
INTERNAL: Return the SQL to delete the unary sequence table.TableDefinition
buildTableDefinition()
INTERNAL: Return a TableDefinition specifying a unary sequence table.boolean
checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERAL: Verify whether the sequence exists.java.lang.String
getSequenceCounterFieldName()
PUBLIC: Return the name of the only field of this tableprotected UnaryTableSequence
getUnaryTableSequence()
boolean
isTableSequenceDefinition()
INTERNAL:-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.TableSequenceDefinition
dropDatabaseSchema, dropDatabaseSchemaOnDatabase, getDatabaseSchema, getSequenceNameFieldName, getSequenceTable, getSequenceTableIndexes, getSequenceTableName, getSequenceTableQualifiedName, getSequenceTableQualifier, getTableSequence, preDropObject, shouldDropTableDefinition
-
Methods inherited from class org.eclipse.persistence.tools.schemaframework.SequenceDefinition
alter, alterOnDatabase, createOnDatabase, isAlterSupported
-
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
-
-
-
-
Constructor Detail
-
UnaryTableSequenceDefinition
public UnaryTableSequenceDefinition(Sequence sequence)
INTERNAL: Should be a sequence defining unary table sequence in the db: either UnaryTableSequence DefaultSequence (only if case platform.getDefaultSequence() is an UnaryTableSequence).
-
UnaryTableSequenceDefinition
public UnaryTableSequenceDefinition(Sequence sequence, boolean deleteSchema)
-
-
Method Detail
-
buildCreationWriter
public java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationException
INTERNAL: Return the SQL required to create the unary sequence table.- Overrides:
buildCreationWriter
in classTableSequenceDefinition
- Throws:
ValidationException
-
buildDeletionWriter
public java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationException
INTERNAL: Return the SQL to delete the unary sequence table.- Overrides:
buildDeletionWriter
in classTableSequenceDefinition
- Throws:
ValidationException
-
checkIfExist
public boolean checkIfExist(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
INTERAL: Verify whether the sequence exists. Assume that the unary sequence table exists.- Overrides:
checkIfExist
in classTableSequenceDefinition
- Throws:
DatabaseException
-
getSequenceCounterFieldName
public java.lang.String getSequenceCounterFieldName()
PUBLIC: Return the name of the only field of this table- Overrides:
getSequenceCounterFieldName
in classTableSequenceDefinition
-
buildTableDefinition
public TableDefinition buildTableDefinition()
INTERNAL: Return a TableDefinition specifying a unary sequence table.- Overrides:
buildTableDefinition
in classTableSequenceDefinition
-
getUnaryTableSequence
protected UnaryTableSequence getUnaryTableSequence()
-
isTableSequenceDefinition
public boolean isTableSequenceDefinition()
INTERNAL:- Overrides:
isTableSequenceDefinition
in classTableSequenceDefinition
-
-