Class SequenceDefinition

java.lang.Object
org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
org.eclipse.persistence.tools.schemaframework.SequenceDefinition
All Implemented Interfaces:
Serializable, 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:
  • Field Details

    • sequence

      protected Sequence sequence
  • Constructor Details

    • SequenceDefinition

      public SequenceDefinition(String name)
    • SequenceDefinition

      public SequenceDefinition(Sequence sequence)
  • Method Details

    • 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, 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