EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.tools.schemaframework
Class UnaryTableSequenceDefinition

java.lang.Object
  extended by org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
      extended by org.eclipse.persistence.tools.schemaframework.SequenceDefinition
          extended by org.eclipse.persistence.tools.schemaframework.UnaryTableSequenceDefinition
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class UnaryTableSequenceDefinition
extends SequenceDefinition

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.SequenceDefinition
sequence
 
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
 
Constructor Summary
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).
 
Method Summary
 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 table
protected  UnaryTableSequence getUnaryTableSequence()
           
 
Methods inherited from class org.eclipse.persistence.tools.schemaframework.SequenceDefinition
alter, alterOnDatabase, createOnDatabase, isAlterSupported
 
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
clone, createObject, dropFromDatabase, dropObject, getFullName, getName, getQualifier, postCreateObject, preDropObject, setName, setQualifier, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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).

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.

Specified by:
buildCreationWriter in class DatabaseObjectDefinition
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.

Specified by:
buildDeletionWriter in class DatabaseObjectDefinition
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.

Specified by:
checkIfExist in class SequenceDefinition
Throws:
DatabaseException

getSequenceCounterFieldName

public java.lang.String getSequenceCounterFieldName()
PUBLIC: Return the name of the only field of this table


buildTableDefinition

public TableDefinition buildTableDefinition()
INTERNAL: Return a TableDefinition specifying a unary sequence table.

Overrides:
buildTableDefinition in class SequenceDefinition

getUnaryTableSequence

protected UnaryTableSequence getUnaryTableSequence()

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference