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 SummaryModifier and TypeMethodDescriptiondefinitionId(String definitionId) Use the definition with the given id.definitionKey(String definitionKey) Use the definition with the given key.definitionTenantId(String tenantId) Look for the definition in the given tenant.Increment the sequence number and returns its value formatted as a String based on the sequence definition model.longIncrement the sequence number and return its value as a long.
- 
Method Details- 
definitionIdUse the definition with the given id. Not allowed to be used in combination withdefinitionKey(String)- Parameters:
- definitionId- the id of the sequence definition
 
- 
definitionKeyUse the definition with the given key. Not allowed to be used in combination withdefinitionId(String)- Parameters:
- definitionKey- the key of the sequence definition
 
- 
definitionTenantIdLook for the definition in the given tenant. Only applicable in combination withdefinitionKey(String)- Parameters:
- tenantId- the tenant id of the sequence definition
 
- 
nextLongValuelong nextLongValue()Increment the sequence number and return its value as a long.- Returns:
- the next value as a long
 
- 
nextFormattedValueString 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
 
 
-