EclipseLink 2.0.0, build 'v20091127-r5931' API Reference

org.eclipse.persistence.tools.schemaframework
Class SequenceDefinition

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

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
protected  Sequence sequence
           
 
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
 
Constructor Summary
SequenceDefinition(Sequence sequence)
           
SequenceDefinition(java.lang.String name)
           
 
Method Summary
 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 TableDefinition
abstract  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 supported
 
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
buildCreationWriter, buildDeletionWriter, clone, createObject, dropFromDatabase, dropObject, getFullName, getName, getQualifier, postCreateObject, setName, setQualifier, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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


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 class DatabaseObjectDefinition
Throws:
EclipseLinkException

buildTableDefinition

public TableDefinition buildTableDefinition()
INTERNAL: Return a TableDefinition


EclipseLink 2.0.0, build 'v20091127-r5931' API Reference