public class TimerJobEntityManagerImpl extends AbstractEntityManager<TimerJobEntity> implements TimerJobEntityManager
| Modifier and Type | Field and Description |
|---|---|
protected TimerJobDataManager |
jobDataManager |
processEngineConfiguration| Constructor and Description |
|---|
TimerJobEntityManagerImpl(ProcessEngineConfigurationImpl processEngineConfiguration,
TimerJobDataManager jobDataManager) |
| Modifier and Type | Method and Description |
|---|---|
protected Date |
calculateNextTimer(JobEntity timerEntity,
VariableScope variableScope) |
protected int |
calculateRepeatValue(JobEntity timerEntity) |
TimerJobEntity |
createAndCalculateNextTimer(JobEntity timerEntity,
VariableScope variableScope)
Creates a new
TimerJobEntity, typically when a timer is used in a
repeating way. |
protected TimerJobEntity |
createTimer(JobEntity te) |
void |
delete(TimerJobEntity jobEntity) |
protected void |
deleteExceptionByteArrayRef(TimerJobEntity jobEntity)
Deletes a the byte array used to store the exception information.
|
protected boolean |
doInsert(TimerJobEntity jobEntity,
boolean fireCreateEvent) |
long |
findJobCountByQueryCriteria(TimerJobQueryImpl jobQuery)
Same as
TimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl, Page), but only returns a count
and not the instances itself. |
List<TimerJobEntity> |
findJobsByExecutionId(String id)
Returns all
TimerJobEntity instances related to on ExecutionEntity. |
List<TimerJobEntity> |
findJobsByProcessInstanceId(String id)
Returns all
TimerJobEntity instances related to on ExecutionEntity. |
List<Job> |
findJobsByQueryCriteria(TimerJobQueryImpl jobQuery,
Page page)
Executes a
JobQueryImpl and returns the matching TimerJobEntity instances. |
List<TimerJobEntity> |
findJobsByTypeAndProcessDefinitionId(String jobHandlerType,
String processDefinitionId)
Returns the
TimerJobEntity for a given process definition. |
List<TimerJobEntity> |
findJobsByTypeAndProcessDefinitionKeyAndTenantId(String jobHandlerType,
String processDefinitionKey,
String tenantId)
The same as
TimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but
by key and for a specific tenantId. |
List<TimerJobEntity> |
findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType,
String processDefinitionKey)
The same as
TimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but
by key and specifically for the 'no tenant' mode. |
List<TimerJobEntity> |
findTimerJobsToExecute(Page page)
Returns the
TimerJobEntity instances that are elegible to execute,
meaning the due date of the timer has been passed. |
protected String |
getBusinessCalendarName(String calendarName,
VariableScope variableScope) |
protected TimerJobDataManager |
getDataManager() |
void |
insert(TimerJobEntity jobEntity) |
void |
insert(TimerJobEntity jobEntity,
boolean fireCreateEvent) |
boolean |
insertTimerJobEntity(TimerJobEntity timerJobEntity)
Insert the
TimerJobEntity, similar to #insert(TimerJobEntity),
but returns a boolean in case the insert did not go through. |
protected boolean |
isValidTime(JobEntity timerEntity,
Date newTimerDate,
VariableScope variableScope) |
protected void |
removeExecutionLink(TimerJobEntity jobEntity)
Removes the job's execution's reference to this job, if the job has an associated execution.
|
void |
setJobDataManager(TimerJobDataManager jobDataManager) |
protected void |
setNewRepeat(JobEntity timerEntity,
int newRepeatValue) |
void |
updateJobTenantIdForDeployment(String deploymentId,
String newTenantId)
Changes the tenantId for all jobs related to a given
DeploymentEntity. |
create, delete, delete, findById, isExecutionRelatedEntityCountEnabled, isExecutionRelatedEntityCountEnabled, isExecutionRelatedEntityCountEnabledGlobally, update, updategetAsyncExecutor, getAttachmentEntityManager, getByteArrayEntityManager, getClock, getCommandContext, getCommandExecutor, getCommentEntityManager, getDeadLetterJobEntityManager, getDeploymentEntityManager, getEventDispatcher, getEventSubscriptionEntityManager, getExecutionEntityManager, getGroupEntityManager, getHistoricActivityInstanceEntityManager, getHistoricDetailEntityManager, getHistoricIdentityLinkEntityManager, getHistoricProcessInstanceEntityManager, getHistoricTaskInstanceEntityManager, getHistoricVariableInstanceEntityManager, getHistoryManager, getIdentityInfoEntityManager, getIdentityLinkEntityManager, getJobEntityManager, getJobManager, getMembershipEntityManager, getModelEntityManager, getProcessDefinitionEntityManager, getProcessDefinitionInfoEntityManager, getProcessEngineConfiguration, getResourceEntityManager, getSession, getSuspendedJobEntityManager, getTaskEntityManager, getTimerJobEntityManager, getUserIdentityEntityManager, getVariableInstanceEntityManagerprotected TimerJobDataManager jobDataManager
public TimerJobEntityManagerImpl(ProcessEngineConfigurationImpl processEngineConfiguration, TimerJobDataManager jobDataManager)
public TimerJobEntity createAndCalculateNextTimer(JobEntity timerEntity, VariableScope variableScope)
TimerJobEntityManagerTimerJobEntity, typically when a timer is used in a
repeating way. The returns TimerJobEntity is not yet inserted.
Returns null if the timer has finished its repetitions.createAndCalculateNextTimer in interface TimerJobEntityManagerpublic List<TimerJobEntity> findTimerJobsToExecute(Page page)
TimerJobEntityManagerTimerJobEntity instances that are elegible to execute,
meaning the due date of the timer has been passed.findTimerJobsToExecute in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByTypeAndProcessDefinitionId(String jobHandlerType, String processDefinitionId)
TimerJobEntityManagerTimerJobEntity for a given process definition.
This is for example used when deleting a process definition: it finds
the TimerJobEntity representing the timer start events.findJobsByTypeAndProcessDefinitionId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyNoTenantId(String jobHandlerType, String processDefinitionKey)
TimerJobEntityManagerTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but
by key and specifically for the 'no tenant' mode.findJobsByTypeAndProcessDefinitionKeyNoTenantId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByTypeAndProcessDefinitionKeyAndTenantId(String jobHandlerType, String processDefinitionKey, String tenantId)
TimerJobEntityManagerTimerJobEntityManager.findJobsByTypeAndProcessDefinitionId(String, String), but
by key and for a specific tenantId.findJobsByTypeAndProcessDefinitionKeyAndTenantId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByExecutionId(String id)
TimerJobEntityManagerTimerJobEntity instances related to on ExecutionEntity.findJobsByExecutionId in interface TimerJobEntityManagerpublic List<TimerJobEntity> findJobsByProcessInstanceId(String id)
TimerJobEntityManagerTimerJobEntity instances related to on ExecutionEntity.findJobsByProcessInstanceId in interface TimerJobEntityManagerpublic List<Job> findJobsByQueryCriteria(TimerJobQueryImpl jobQuery, Page page)
TimerJobEntityManagerJobQueryImpl and returns the matching TimerJobEntity instances.findJobsByQueryCriteria in interface TimerJobEntityManagerpublic long findJobCountByQueryCriteria(TimerJobQueryImpl jobQuery)
TimerJobEntityManagerTimerJobEntityManager.findJobsByQueryCriteria(TimerJobQueryImpl, Page), but only returns a count
and not the instances itself.findJobCountByQueryCriteria in interface TimerJobEntityManagerpublic void updateJobTenantIdForDeployment(String deploymentId, String newTenantId)
TimerJobEntityManagerDeploymentEntity.updateJobTenantIdForDeployment in interface TimerJobEntityManagerpublic boolean insertTimerJobEntity(TimerJobEntity timerJobEntity)
TimerJobEntityManagerTimerJobEntity, similar to #insert(TimerJobEntity),
but returns a boolean in case the insert did not go through.
This could happen if the execution related to the TimerJobEntity
has been removed (for example due to a task complete for a timer boundary on that task).insertTimerJobEntity in interface TimerJobEntityManagerpublic void insert(TimerJobEntity jobEntity)
insert in interface EntityManager<TimerJobEntity>insert in class AbstractEntityManager<TimerJobEntity>public void insert(TimerJobEntity jobEntity, boolean fireCreateEvent)
insert in interface EntityManager<TimerJobEntity>insert in class AbstractEntityManager<TimerJobEntity>protected boolean doInsert(TimerJobEntity jobEntity, boolean fireCreateEvent)
public void delete(TimerJobEntity jobEntity)
delete in interface EntityManager<TimerJobEntity>delete in class AbstractEntityManager<TimerJobEntity>protected void removeExecutionLink(TimerJobEntity jobEntity)
protected void deleteExceptionByteArrayRef(TimerJobEntity jobEntity)
protected TimerJobEntity createTimer(JobEntity te)
protected void setNewRepeat(JobEntity timerEntity, int newRepeatValue)
protected boolean isValidTime(JobEntity timerEntity, Date newTimerDate, VariableScope variableScope)
protected Date calculateNextTimer(JobEntity timerEntity, VariableScope variableScope)
protected int calculateRepeatValue(JobEntity timerEntity)
protected String getBusinessCalendarName(String calendarName, VariableScope variableScope)
protected TimerJobDataManager getDataManager()
getDataManager in class AbstractEntityManager<TimerJobEntity>public void setJobDataManager(TimerJobDataManager jobDataManager)
Copyright © 2016 Alfresco. All rights reserved.