Interface SequenceGenerator

All Known Implementing Classes:
SequenceGeneratorImpl

public interface SequenceGenerator
This is the sequence generator used which uses the Sequence Definitions to configure itself and perform the formatting for the generated sequence. The sequence incrementation is done by the SequenceValueProvider.
Author:
Filip Hrisafov
See Also:
  • Method Details

    • definitionId

      SequenceGenerator definitionId(String definitionId)
      Use the definition with the given id. Not allowed to be used in combination with definitionKey(String)
      Parameters:
      definitionId - the id of the sequence definition
    • definitionKey

      SequenceGenerator definitionKey(String definitionKey)
      Use the definition with the given key. Not allowed to be used in combination with definitionId(String)
      Parameters:
      definitionKey - the key of the sequence definition
    • definitionTenantId

      SequenceGenerator definitionTenantId(String tenantId)
      Look for the definition in the given tenant. Only applicable in combination with definitionKey(String)
      Parameters:
      tenantId - the tenant id of the sequence definition
    • nextLongValue

      long nextLongValue()
      Increment the sequence number and return its value as a long.
      Returns:
      the next value as a long
    • nextFormattedValue

      String nextFormattedValue()
      Increment the sequence number and returns its value formatted as a String based on the sequence definition model.
      Returns:
      the next value formatted as a String