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 class
SequenceGeneratorImpl.GenerateLongValueCmd
class
SequenceGeneratorImpl.GenerateStringValueCmd
static class
SequenceGeneratorImpl.SequenceValueProviderContext
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected String
definitionId
protected String
definitionKey
protected String
definitionTenantId
-
Constructor Summary
Constructors Constructor Description SequenceGeneratorImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceGenerator
definitionId(String definitionId)
Use the definition with the given id.SequenceGenerator
definitionKey(String definitionKey)
Use the definition with the given key.SequenceGenerator
definitionTenantId(String tenantId)
Look for the definition in the given tenant.String
nextFormattedValue()
Increment the sequence number and returns its value formatted as a String based on the sequence definition model.long
nextLongValue()
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:SequenceGenerator
Use the definition with the given id. Not allowed to be used in combination withSequenceGenerator.definitionKey(String)
- Specified by:
definitionId
in interfaceSequenceGenerator
- Parameters:
definitionId
- the id of the sequence definition
-
definitionKey
public SequenceGenerator definitionKey(String definitionKey)
Description copied from interface:SequenceGenerator
Use the definition with the given key. Not allowed to be used in combination withSequenceGenerator.definitionId(String)
- Specified by:
definitionKey
in interfaceSequenceGenerator
- Parameters:
definitionKey
- the key of the sequence definition
-
definitionTenantId
public SequenceGenerator definitionTenantId(String tenantId)
Description copied from interface:SequenceGenerator
Look for the definition in the given tenant. Only applicable in combination withSequenceGenerator.definitionKey(String)
- Specified by:
definitionTenantId
in interfaceSequenceGenerator
- Parameters:
tenantId
- the tenant id of the sequence definition
-
nextLongValue
public long nextLongValue()
Description copied from interface:SequenceGenerator
Increment the sequence number and return its value as a long.- Specified by:
nextLongValue
in interfaceSequenceGenerator
- Returns:
- the next value as a long
-
nextFormattedValue
public String nextFormattedValue()
Description copied from interface:SequenceGenerator
Increment the sequence number and returns its value formatted as a String based on the sequence definition model.- Specified by:
nextFormattedValue
in interfaceSequenceGenerator
- Returns:
- the next value formatted as a String
-
-