Class SequenceGeneratorImpl
- java.lang.Object
-
- com.flowable.platform.engine.impl.sequence.SequenceGeneratorImpl
-
- All Implemented Interfaces:
SequenceGenerator
public class SequenceGeneratorImpl extends Object implements SequenceGenerator
- Author:
- Filip Hrisafov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSequenceGeneratorImpl.GenerateLongValueCmdclassSequenceGeneratorImpl.GenerateStringValueCmdstatic classSequenceGeneratorImpl.SequenceValueProviderContext
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutorcommandExecutorprotected StringdefinitionIdprotected StringdefinitionKeyprotected StringdefinitionTenantId
-
Constructor Summary
Constructors Constructor Description SequenceGeneratorImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceGeneratordefinitionId(String definitionId)Use the definition with the given id.SequenceGeneratordefinitionKey(String definitionKey)Use the definition with the given key.SequenceGeneratordefinitionTenantId(String tenantId)Look for the definition in the given tenant.StringnextFormattedValue()Increment the sequence number and returns its value formatted as a String based on the sequence definition model.longnextLongValue()Increment the sequence number and return its value as a long.
-
-
-
Field Detail
-
commandExecutor
protected final CommandExecutor commandExecutor
-
definitionId
protected String definitionId
-
definitionKey
protected String definitionKey
-
definitionTenantId
protected String definitionTenantId
-
-
Constructor Detail
-
SequenceGeneratorImpl
public SequenceGeneratorImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
definitionId
public SequenceGenerator definitionId(String definitionId)
Description copied from interface:SequenceGeneratorUse the definition with the given id. Not allowed to be used in combination withSequenceGenerator.definitionKey(String)- Specified by:
definitionIdin interfaceSequenceGenerator- Parameters:
definitionId- the id of the sequence definition
-
definitionKey
public SequenceGenerator definitionKey(String definitionKey)
Description copied from interface:SequenceGeneratorUse the definition with the given key. Not allowed to be used in combination withSequenceGenerator.definitionId(String)- Specified by:
definitionKeyin interfaceSequenceGenerator- Parameters:
definitionKey- the key of the sequence definition
-
definitionTenantId
public SequenceGenerator definitionTenantId(String tenantId)
Description copied from interface:SequenceGeneratorLook for the definition in the given tenant. Only applicable in combination withSequenceGenerator.definitionKey(String)- Specified by:
definitionTenantIdin interfaceSequenceGenerator- Parameters:
tenantId- the tenant id of the sequence definition
-
nextLongValue
public long nextLongValue()
Description copied from interface:SequenceGeneratorIncrement the sequence number and return its value as a long.- Specified by:
nextLongValuein interfaceSequenceGenerator- Returns:
- the next value as a long
-
nextFormattedValue
public String nextFormattedValue()
Description copied from interface:SequenceGeneratorIncrement the sequence number and returns its value formatted as a String based on the sequence definition model.- Specified by:
nextFormattedValuein interfaceSequenceGenerator- Returns:
- the next value formatted as a String
-
-