public void setCachedEntityState(int cachedEntityState) { this.cachedEntityState = cachedEntityState; // Check for flags that are down. These lists can be safely initialized as // empty, preventing // additional queries that end up in an empty list anyway if (jobs == null && !BitMaskUtil.isBitOn(cachedEntityState, JOBS_STATE_BIT)) { jobs = new ArrayList<>(); } if (tasks == null && !BitMaskUtil.isBitOn(cachedEntityState, TASKS_STATE_BIT)) { tasks = new ArrayList<>(); } if (eventSubscriptions == null && !BitMaskUtil.isBitOn(cachedEntityState, EVENT_SUBSCRIPTIONS_STATE_BIT)) { eventSubscriptions = new ArrayList<>(); } if (incidents == null && !BitMaskUtil.isBitOn(cachedEntityState, INCIDENT_STATE_BIT)) { incidents = new ArrayList<>(); } if (!variableStore.isInitialized() && !BitMaskUtil.isBitOn(cachedEntityState, VARIABLES_STATE_BIT)) { variableStore.setVariablesProvider(VariableCollectionProvider.<VariableInstanceEntity>emptyVariables()); variableStore.forceInitialization(); } if (externalTasks == null && !BitMaskUtil.isBitOn(cachedEntityState, EXTERNAL_TASKS_BIT)) { externalTasks = new ArrayList<>(); } shouldQueryForSubprocessInstance = BitMaskUtil.isBitOn(cachedEntityState, SUB_PROCESS_INSTANCE_STATE_BIT); shouldQueryForSubCaseInstance = BitMaskUtil.isBitOn(cachedEntityState, SUB_CASE_INSTANCE_STATE_BIT); }
public void setCachedEntityState(int cachedEntityState) { this.cachedEntityState = cachedEntityState; // Check for flags that are down. These lists can be safely initialized as // empty, preventing // additional queries that end up in an empty list anyway if (jobs == null && !BitMaskUtil.isBitOn(cachedEntityState, JOBS_STATE_BIT)) { jobs = new ArrayList<>(); } if (tasks == null && !BitMaskUtil.isBitOn(cachedEntityState, TASKS_STATE_BIT)) { tasks = new ArrayList<>(); } if (eventSubscriptions == null && !BitMaskUtil.isBitOn(cachedEntityState, EVENT_SUBSCRIPTIONS_STATE_BIT)) { eventSubscriptions = new ArrayList<>(); } if (incidents == null && !BitMaskUtil.isBitOn(cachedEntityState, INCIDENT_STATE_BIT)) { incidents = new ArrayList<>(); } if (!variableStore.isInitialized() && !BitMaskUtil.isBitOn(cachedEntityState, VARIABLES_STATE_BIT)) { variableStore.setVariablesProvider(VariableCollectionProvider.<VariableInstanceEntity>emptyVariables()); variableStore.forceInitialization(); } if (externalTasks == null && !BitMaskUtil.isBitOn(cachedEntityState, EXTERNAL_TASKS_BIT)) { externalTasks = new ArrayList<>(); } shouldQueryForSubprocessInstance = BitMaskUtil.isBitOn(cachedEntityState, SUB_PROCESS_INSTANCE_STATE_BIT); shouldQueryForSubCaseInstance = BitMaskUtil.isBitOn(cachedEntityState, SUB_CASE_INSTANCE_STATE_BIT); }
public void setCachedEntityState(int cachedEntityState) { this.cachedEntityState = cachedEntityState; // Check for flags that are down. These lists can be safely initialized as // empty, preventing // additional queries that end up in an empty list anyway if (jobs == null && !BitMaskUtil.isBitOn(cachedEntityState, JOBS_STATE_BIT)) { jobs = new ArrayList<JobEntity>(); } if (tasks == null && !BitMaskUtil.isBitOn(cachedEntityState, TASKS_STATE_BIT)) { tasks = new ArrayList<TaskEntity>(); } if (eventSubscriptions == null && !BitMaskUtil.isBitOn(cachedEntityState, EVENT_SUBSCRIPTIONS_STATE_BIT)) { eventSubscriptions = new ArrayList<EventSubscriptionEntity>(); } if (incidents == null && !BitMaskUtil.isBitOn(cachedEntityState, INCIDENT_STATE_BIT)) { incidents = new ArrayList<IncidentEntity>(); } if (!variableStore.isInitialized() && !BitMaskUtil.isBitOn(cachedEntityState, VARIABLES_STATE_BIT)) { variableStore.setVariablesProvider(VariableCollectionProvider.<VariableInstanceEntity>emptyVariables()); variableStore.forceInitialization(); } if (externalTasks == null && !BitMaskUtil.isBitOn(cachedEntityState, EXTERNAL_TASKS_BIT)) { externalTasks = new ArrayList<ExternalTaskEntity>(); } shouldQueryForSubprocessInstance = BitMaskUtil.isBitOn(cachedEntityState, SUB_PROCESS_INSTANCE_STATE_BIT); shouldQueryForSubCaseInstance = BitMaskUtil.isBitOn(cachedEntityState, SUB_CASE_INSTANCE_STATE_BIT); }