All Implemented Interfaces:
Serializable, Cloneable

public class TableSequence extends QuerySequence

Purpose: Defines sequencing through using a SEQUENCE table.

Description This is the default sequencing mechanism. A table defaulting to SEQUENCE is used to generate unique ids. The table has a name field (SEQ_NAME) storing each sequences name, and a counter (SEQ_COUNT) storing the last sequence id generated. There will be a row in the table for each sequence object.

See Also:
  • Field Details

    • defaultTableName

      @Deprecated public static final String defaultTableName
      Deprecated.
      Use an empty string as a default sequence table name instead, that triggers usage of platform.getDefaultSequenceTableName() when the sequence is connected.
      Default sequence table name
      See Also:
    • table

      protected DatabaseTable table
      Hold the database table
    • counterFieldName

      protected String counterFieldName
      Hold the name of the column in the sequence table which specifies the sequence numeric value
    • nameFieldName

      protected String nameFieldName
      Hold the name of the column in the sequence table which specifies the sequence name
  • Constructor Details

    • TableSequence

      public TableSequence()
    • TableSequence

      public TableSequence(String name)
      Create a new sequence with the name.
    • TableSequence

      public TableSequence(String name, int size)
      Create a new sequence with the name and sequence pre-allocation size.
    • TableSequence

      public TableSequence(String name, int size, int initialValue)
    • TableSequence

      public TableSequence(String name, String tableName)
      Create a new sequence with the name, and the sequence table name.
    • TableSequence

      public TableSequence(String name, String tableName, String nameFieldName, String counterFieldName)
      Create a new sequence with the name, and the sequence table information.
    • TableSequence

      public TableSequence(String name, int size, String tableName)
    • TableSequence

      public TableSequence(String name, int size, String tableName, String nameFieldName, String counterFieldName)
  • Method Details