Class VariableScopeImpl
java.lang.Object
org.flowable.common.engine.impl.persistence.entity.AbstractEntity
org.flowable.variable.service.impl.persistence.entity.VariableScopeImpl
- All Implemented Interfaces:
Serializable,VariableContainer,HasRevision,Entity,VariableScope
public abstract class VariableScopeImpl
extends AbstractEntity
implements Serializable, VariableScope
- Author:
- Tom Baeyens, Joram Barrez, Tijs Rademakers, Saeid Mirzaei
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ELContextprotected Map<String,VariableInstance> protected Map<String,VariableInstanceEntity> protected Map<String,VariableInstanceEntity> Fields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity
id, isDeleted, isInserted, isUpdated, originalPersistentState, revision -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddLoggingSessionInfo(com.fasterxml.jackson.databind.node.ObjectNode loggingNode) collectTransientVariables(HashMap<String, Object> variables) protected Map<String,VariableInstance> collectVariableInstances(HashMap<String, VariableInstance> variables) collectVariableNames(Set<String> variableNames) collectVariables(HashMap<String, Object> variables) protected VariableInstanceEntitycreateVariableInstance(String variableName, Object value) protected voidcreateVariableLocal(String variableName, Object value) only called when a new variable is created on this variable scope.voidcreateVariablesLocal(Map<String, ? extends Object> variables) protected voiddeleteVariableInstanceForExplicitUserCall(VariableInstanceEntity variableInstance) protected voidprotected abstract VariableScopeImplprotected abstract VariableInstanceEntitygetSpecificVariable(String variableName) protected abstract List<VariableInstanceEntity>getSpecificVariables(Collection<String> variableNames) getTransientVariable(String variableName) getTransientVariableLocal(String variableName) getVariable(String variableName) getVariable(String variableName, boolean fetchAllVariables) The same operation asgetVariable(String), but with an extra parameter to indicate whether or not all variables need to be fetched.<T> TgetVariable(String variableName, Class<T> variableClass) getVariableInstance(String variableName) getVariableInstance(String variableName, boolean fetchAllVariables) getVariableInstanceLocal(String variableName) getVariableInstanceLocal(String variableName, boolean fetchAllVariables) getVariableInstances(Collection<String> variableNames) getVariableInstances(Collection<String> variableNames, boolean fetchAllVariables) getVariableInstancesLocal(Collection<String> variableNames) getVariableInstancesLocal(Collection<String> variableNames, boolean fetchAllVariables) getVariableLocal(String variableName) getVariableLocal(String variableName, boolean fetchAllVariables) <T> TgetVariableLocal(String variableName, Class<T> variableClass) getVariables(Collection<String> variableNames) getVariables(Collection<String> variableNames, boolean fetchAllVariables) protected abstract VariableServiceConfigurationgetVariablesLocal(Collection<String> variableNames) getVariablesLocal(Collection<String> variableNames, boolean fetchAllVariables) booleanhasVariable(String variableName) booleanhasVariableLocal(String variableName) booleanbooleanprotected abstract voidinitializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) voidinternalSetVariableInstances(Map<String, VariableInstanceEntity> variableInstances) Only to be used when creating a new entity, to avoid an extra call to the database.protected booleanisExpression(String variableName) protected abstract booleanReturn whether changes to the variables are propagated to the history storage.protected abstract Collection<VariableInstanceEntity>voidremoveTransientVariable(String variableName) voidremoveTransientVariableLocal(String variableName) voidvoidvoidremoveVariable(String variableName) voidremoveVariableLocal(String variableName) voidvoidremoveVariables(Collection<String> variableNames) voidvoidremoveVariablesLocal(Collection<String> variableNames) voidsetCachedElContext(ELContext cachedElContext) voidsetTransientVariable(String variableName, Object variableValue) voidsetTransientVariableLocal(String variableName, Object variableValue) voidsetTransientVariables(Map<String, Object> transientVariables) voidsetTransientVariablesLocal(Map<String, Object> transientVariables) voidsetVariable(String variableName, Object value) voidsetVariable(String variableName, Object value, boolean fetchAllVariables) The defaultsetVariable(String, Object)fetches all variables (for historical and backwards compatible reasons) while setting the variables.setVariableLocal(String variableName, Object value) setVariableLocal(String variableName, Object value, boolean fetchAllVariables) The defaultsetVariableLocal(String, Object)fetches all variables (for historical and backwards compatible reasons) while setting the variables.voidsetVariables(Map<String, ? extends Object> variables) voidsetVariablesLocal(Map<String, ? extends Object> variables) protected booleanstoreVariableLocal(String variableName) protected voidupdateVariableInstance(VariableInstanceEntity variableInstance, Object value) Methods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity
getId, getOriginalPersistentState, getRevision, getRevisionNext, isDeleted, isInserted, isUpdated, setDeleted, setId, setInserted, setOriginalPersistentState, setRevision, setUpdatedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.flowable.common.engine.impl.persistence.entity.Entity
getIdPrefix, getPersistentStateMethods inherited from interface org.flowable.common.engine.api.variable.VariableContainer
getTenantId
-
Field Details
-
variableInstances
-
usedVariablesCache
-
transientVariables
-
cachedElContext
-
-
Constructor Details
-
VariableScopeImpl
public VariableScopeImpl()
-
-
Method Details
-
loadVariableInstances
-
getParentVariableScope
-
initializeVariableInstanceBackPointer
protected abstract void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) -
addLoggingSessionInfo
protected abstract void addLoggingSessionInfo(com.fasterxml.jackson.databind.node.ObjectNode loggingNode) -
ensureVariableInstancesInitialized
protected void ensureVariableInstancesInitialized() -
internalSetVariableInstances
Only to be used when creating a new entity, to avoid an extra call to the database. -
getVariables
- Specified by:
getVariablesin interfaceVariableScope
-
getVariableInstances
- Specified by:
getVariableInstancesin interfaceVariableScope
-
getVariables
- Specified by:
getVariablesin interfaceVariableScope
-
getVariableInstances
- Specified by:
getVariableInstancesin interfaceVariableScope
-
getVariables
- Specified by:
getVariablesin interfaceVariableScope
-
getVariableInstances
public Map<String,VariableInstance> getVariableInstances(Collection<String> variableNames, boolean fetchAllVariables) - Specified by:
getVariableInstancesin interfaceVariableScope
-
collectVariables
-
collectVariableInstances
protected Map<String,VariableInstance> collectVariableInstances(HashMap<String, VariableInstance> variables) -
getVariable
- Specified by:
getVariablein interfaceVariableContainer- Specified by:
getVariablein interfaceVariableScope
-
getVariableInstance
- Specified by:
getVariableInstancein interfaceVariableScope
-
getVariable
The same operation asgetVariable(String), but with an extra parameter to indicate whether or not all variables need to be fetched. Note that the default way (because of backwards compatibility) is to fetch all the variables when doing a get/set of variables. So this means 'true' is the default value for this method, and in fact it will simply delegate togetVariable(String). This can also be the most performant, if you're doing a lot of variable gets in the same transaction (eg in service tasks). In case 'false' is used, only the specific variable will be fetched.- Specified by:
getVariablein interfaceVariableScope
-
getVariableInstance
- Specified by:
getVariableInstancein interfaceVariableScope
-
getSpecificVariable
-
getVariableLocal
- Specified by:
getVariableLocalin interfaceVariableScope
-
getVariableInstanceLocal
- Specified by:
getVariableInstanceLocalin interfaceVariableScope
-
getVariableLocal
- Specified by:
getVariableLocalin interfaceVariableScope
-
getVariableInstanceLocal
- Specified by:
getVariableInstanceLocalin interfaceVariableScope
-
hasVariables
public boolean hasVariables()- Specified by:
hasVariablesin interfaceVariableScope
-
hasVariablesLocal
public boolean hasVariablesLocal()- Specified by:
hasVariablesLocalin interfaceVariableScope
-
hasVariable
- Specified by:
hasVariablein interfaceVariableContainer- Specified by:
hasVariablein interfaceVariableScope
-
hasVariableLocal
- Specified by:
hasVariableLocalin interfaceVariableScope
-
collectVariableNames
-
getVariableNames
- Specified by:
getVariableNamesin interfaceVariableScope
-
getVariablesLocal
- Specified by:
getVariablesLocalin interfaceVariableScope
-
getVariableInstancesLocal
- Specified by:
getVariableInstancesLocalin interfaceVariableScope
-
getVariablesLocal
- Specified by:
getVariablesLocalin interfaceVariableScope
-
getVariableInstancesLocal
- Specified by:
getVariableInstancesLocalin interfaceVariableScope
-
getVariablesLocal
public Map<String,Object> getVariablesLocal(Collection<String> variableNames, boolean fetchAllVariables) - Specified by:
getVariablesLocalin interfaceVariableScope
-
getVariableInstancesLocal
public Map<String,VariableInstance> getVariableInstancesLocal(Collection<String> variableNames, boolean fetchAllVariables) - Specified by:
getVariableInstancesLocalin interfaceVariableScope
-
getSpecificVariables
protected abstract List<VariableInstanceEntity> getSpecificVariables(Collection<String> variableNames) -
getVariableNamesLocal
- Specified by:
getVariableNamesLocalin interfaceVariableScope
-
getVariableInstanceEntities
-
getUsedVariablesCache
-
createVariablesLocal
-
setVariables
- Specified by:
setVariablesin interfaceVariableScope
-
setVariablesLocal
- Specified by:
setVariablesLocalin interfaceVariableScope
-
removeVariables
public void removeVariables()- Specified by:
removeVariablesin interfaceVariableScope
-
removeVariablesLocal
public void removeVariablesLocal()- Specified by:
removeVariablesLocalin interfaceVariableScope
-
removeVariables
- Specified by:
removeVariablesin interfaceVariableScope
-
removeVariablesLocal
- Specified by:
removeVariablesLocalin interfaceVariableScope
-
setVariable
- Specified by:
setVariablein interfaceVariableContainer- Specified by:
setVariablein interfaceVariableScope
-
setVariable
The defaultsetVariable(String, Object)fetches all variables (for historical and backwards compatible reasons) while setting the variables. Setting the fetchAllVariables parameter to true is the default behaviour (ie fetching all variables) Setting the fetchAllVariables parameter to false does not do that.- Specified by:
setVariablein interfaceVariableScope
-
setVariableLocal
- Specified by:
setVariableLocalin interfaceVariableScope
-
setVariableLocal
The defaultsetVariableLocal(String, Object)fetches all variables (for historical and backwards compatible reasons) while setting the variables. Setting the fetchAllVariables parameter to true is the default behaviour (ie fetching all variables) Setting the fetchAllVariables parameter to false does not do that.- Specified by:
setVariableLocalin interfaceVariableScope
-
createVariableLocal
only called when a new variable is created on this variable scope. This method is also responsible for propagating the creation of this variable to the history. -
removeVariable
- Specified by:
removeVariablein interfaceVariableScope
-
removeVariableLocal
- Specified by:
removeVariableLocalin interfaceVariableScope
-
deleteVariableInstanceForExplicitUserCall
-
updateVariableInstance
-
createVariableInstance
-
storeVariableLocal
-
setTransientVariablesLocal
- Specified by:
setTransientVariablesLocalin interfaceVariableScope
-
setTransientVariableLocal
- Specified by:
setTransientVariableLocalin interfaceVariableScope
-
setTransientVariables
- Specified by:
setTransientVariablesin interfaceVariableScope
-
setTransientVariable
- Specified by:
setTransientVariablein interfaceVariableContainer- Specified by:
setTransientVariablein interfaceVariableScope
-
getTransientVariableLocal
- Specified by:
getTransientVariableLocalin interfaceVariableScope
-
getTransientVariablesLocal
- Specified by:
getTransientVariablesLocalin interfaceVariableScope
-
getTransientVariable
- Specified by:
getTransientVariablein interfaceVariableScope
-
getTransientVariables
- Specified by:
getTransientVariablesin interfaceVariableScope
-
collectTransientVariables
-
removeTransientVariableLocal
- Specified by:
removeTransientVariableLocalin interfaceVariableScope
-
removeTransientVariablesLocal
public void removeTransientVariablesLocal()- Specified by:
removeTransientVariablesLocalin interfaceVariableScope
-
removeTransientVariable
- Specified by:
removeTransientVariablein interfaceVariableScope
-
removeTransientVariables
public void removeTransientVariables()- Specified by:
removeTransientVariablesin interfaceVariableScope
-
isPropagateToHistoricVariable
protected abstract boolean isPropagateToHistoricVariable()Return whether changes to the variables are propagated to the history storage. -
getVariableServiceConfiguration
-
getCachedElContext
-
setCachedElContext
-
getVariable
- Specified by:
getVariablein interfaceVariableScope
-
getVariableLocal
- Specified by:
getVariableLocalin interfaceVariableScope
-
isExpression
-