Class SetRemovalTimeToHistoricProcessInstancesBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.history.SetRemovalTimeToHistoricProcessInstancesBuilderImpl
-
- All Implemented Interfaces:
SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
,SetRemovalTimeToHistoricProcessInstancesBuilder
public class SetRemovalTimeToHistoricProcessInstancesBuilderImpl extends Object implements SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Author:
- Tassilo Weidner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetRemovalTimeToHistoricProcessInstancesBuilderImpl.Mode
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected List<String>
ids
protected boolean
isHierarchical
protected SetRemovalTimeToHistoricProcessInstancesBuilderImpl.Mode
mode
protected HistoricProcessInstanceQuery
query
protected Date
removalTime
-
Constructor Summary
Constructors Constructor Description SetRemovalTimeToHistoricProcessInstancesBuilderImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetRemovalTimeToHistoricProcessInstancesBuilder
absoluteRemovalTime(Date removalTime)
Sets the removal time to an absolute date.SetRemovalTimeToHistoricProcessInstancesBuilder
byIds(String... ids)
Selects historic decision instances by the given ids.SetRemovalTimeToHistoricProcessInstancesBuilder
byQuery(HistoricProcessInstanceQuery query)
Selects historic process instances by the given query.SetRemovalTimeToHistoricProcessInstancesBuilder
calculatedRemovalTime()
Calculates the removal time dynamically based on the respective process definition time to live and the process engine's removal time strategy.SetRemovalTimeToHistoricProcessInstancesBuilder
clearedRemovalTime()
Sets the removal time tonull
.Batch
executeAsync()
Sets the removal time asynchronously as batch.List<String>
getIds()
SetRemovalTimeToHistoricProcessInstancesBuilderImpl.Mode
getMode()
HistoricProcessInstanceQuery
getQuery()
Date
getRemovalTime()
SetRemovalTimeToHistoricProcessInstancesBuilder
hierarchical()
Takes additionally those historic process instances into account that are part of the hierarchy of the given historic process instance.boolean
isHierarchical()
-
-
-
Field Detail
-
query
protected HistoricProcessInstanceQuery query
-
removalTime
protected Date removalTime
-
mode
protected SetRemovalTimeToHistoricProcessInstancesBuilderImpl.Mode mode
-
isHierarchical
protected boolean isHierarchical
-
commandExecutor
protected CommandExecutor commandExecutor
-
-
Constructor Detail
-
SetRemovalTimeToHistoricProcessInstancesBuilderImpl
public SetRemovalTimeToHistoricProcessInstancesBuilderImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
byQuery
public SetRemovalTimeToHistoricProcessInstancesBuilder byQuery(HistoricProcessInstanceQuery query)
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Selects historic process instances by the given query.- Specified by:
byQuery
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Parameters:
query
- to be evaluated.- Returns:
- the builder.
-
byIds
public SetRemovalTimeToHistoricProcessInstancesBuilder byIds(String... ids)
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Selects historic decision instances by the given ids.- Specified by:
byIds
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Parameters:
ids
- supposed to be affected.- Returns:
- the builder.
-
absoluteRemovalTime
public SetRemovalTimeToHistoricProcessInstancesBuilder absoluteRemovalTime(Date removalTime)
Description copied from interface:SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
Sets the removal time to an absolute date.- Specified by:
absoluteRemovalTime
in interfaceSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Parameters:
removalTime
- supposed to be set to historic entities.- Returns:
- the builder.
-
calculatedRemovalTime
public SetRemovalTimeToHistoricProcessInstancesBuilder calculatedRemovalTime()
Description copied from interface:SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
Calculates the removal time dynamically based on the respective process definition time to live and the process engine's removal time strategy.
In case
SetRemovalTimeToHistoricProcessInstancesBuilder.hierarchical()
is enabled, the removal time is being calculated based on the base time and time to live of the historic root process instance.- Specified by:
calculatedRemovalTime
in interfaceSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
clearedRemovalTime
public SetRemovalTimeToHistoricProcessInstancesBuilder clearedRemovalTime()
Description copied from interface:SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
Sets the removal time to
null
.- Specified by:
clearedRemovalTime
in interfaceSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
hierarchical
public SetRemovalTimeToHistoricProcessInstancesBuilder hierarchical()
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Takes additionally those historic process instances into account that are part of the hierarchy of the given historic process instance. If the root process instance id of the given historic process instance isnull
, the hierarchy is ignored. This is the case for instances that were started with a version prior 7.10.- Specified by:
hierarchical
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
executeAsync
public Batch executeAsync()
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Sets the removal time asynchronously as batch. The returned batch can be used to track the progress of setting a removal time.- Specified by:
executeAsync
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Returns:
- the batch which sets the removal time asynchronously.
-
getQuery
public HistoricProcessInstanceQuery getQuery()
-
getRemovalTime
public Date getRemovalTime()
-
getMode
public SetRemovalTimeToHistoricProcessInstancesBuilderImpl.Mode getMode()
-
isHierarchical
public boolean isHierarchical()
-
-