Class NullProcessCaseDao
- java.lang.Object
-
- com.aquima.interactions.process.dao.impl.NullProcessCaseDao
-
- All Implemented Interfaces:
IProcessCaseDao
public class NullProcessCaseDao extends Object implements IProcessCaseDao
Empty implementation of IProcessCaseDao which will be used when no other implementation is found. Throws exception whenever it is used, as the process engine needs a proper implementation of theIProcessCaseDao
, either the one instantiated by enabling the process-sql-store profile or a custom implementation.- Since:
- 10.0
- Author:
- Emoke Olti
-
-
Constructor Summary
Constructors Constructor Description NullProcessCaseDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICaseModel
acquireLock(long id, String lockedBy)
Method for locking a Case.void
clearDelayedEvent(long caseId, long eventId)
Notifies the persistence layer that an event is no longer delayed.ICaseModel
createCase(String name, String appId, CaseStatusType status, String lockedBy, IMultilingualText displayName)
This method creates a case.ICaseEventModel
createEvent(ApplicationID appId, String name, Long caseId, Long taskId, CaseEventType type, CaseEventStatusType status, Date timestamp, String user, Map<String,IValue> content)
This method creates a case event.ICaseDataInstance
createInstance(long caseId, String entityName, GUID instanceId, String instanceName)
This method creates an instance for a certain case.ITaskModel
createTask(long caseId, Long parentId, String name, TaskType type, TaskStatusType status, IAssigneeInfo assignee, GUID nodeId, DateTimeValue startDate, DateTimeValue timeoutDate, DateTimeValue dueDate, String exitState, String eventName, boolean isConditional, boolean isRequired, boolean isUserSet, Integer priority, DateTimeValue lastPriorityCheck, Map<String,String> properties, String[] unauthorizedUserIds, IMultilingualText displayName)
This method creates a task.ICaseDataValue
createValue(long instanceId, String attributeName, IValue attrValue)
This method creates a value for an instance.void
delayEvent(long caseId, ICaseEventModel caseEventModel)
Delays the event with the given id for the case with the given id.void
deleteBroadcastEvents()
Deletes all broadcast events.void
deleteCase(long id)
This method deletes a case.void
deleteInstance(long instanceId)
This method deletes an instancevoid
deleteValue(long instanceId, String attributeName)
This method deletes a value of an instance.ICaseEventModel[]
findAllCaseEvents()
This method finds the list all case events.CaseViewResult
findByCriteria(CaseViewCriteria criteria)
Finds case views based on the specified criteria.TaskViewResult
findByCriteria(TaskViewCriteria criteria)
Finds task views based on the specified criteria.ICaseEventModel
findCaseEventById(Long eventId)
This method finds a case event by id.ICaseEventModel[]
findCaseEventsByCriteria(CaseEventCriteria criteria)
This method finds a list of case events by criteria.long[]
findCaseIds(CaseCriteria caseFilter, TaskCriteria taskFilter)
Searches for cases matching the specified case and task filters and returns their IDs.ICaseModel[]
findCases(CaseCriteria caseFilter, TaskCriteria taskFilter)
This method searches for cases containing tasks matching the filter.ICaseEventModel[]
findDelayedEvents(long caseId)
Returns events whose processing has been delayed due to the case being locked.ICaseQueryResult[]
findExtendedCases(CaseCriteria caseFilter)
This method searches for cases matching the task filter.ITaskQueryResult[]
findExtendedTasks(TaskCriteria taskFilter)
This method searches for tasks matching the task filter.ITaskModel[]
findTasks(TaskCriteria taskFilter)
This method searches for tasks matching the task filter.ICaseEventModel
findTimerEvent(Long caseId, Long taskId)
Returns the timer event associated with the given case and timer task, or null if it does not exist.ICaseModel
getCase(long caseId)
This method returns the case for the specified id.ITaskModel[]
getChildTasks(long parentTaskId)
This method returns the child tasks of a certain task.ICaseDataInstance[]
getInstancesForCase(long caseId)
This method returns the instances of a certain case.ICaseDataInstance[]
getInstancesForCases(long[] caseIds)
Returns the instances of the specified cases.ITaskModel
getTask(long id)
This method returns the task of a certain id.ITaskModel[]
getTasksForCase(long caseId)
This method returns the tasks of a certain case.ICaseDataValue[]
getValuesForCase(long caseId)
This method returns all the values belonging to a case.ICaseDataValue[]
getValuesForInstances(long[] instanceIds)
Returns all the values for the specified instances.boolean
isCaseLocked(long caseId)
Checks is a case is locked in the databaseICaseEventModel
replayEvent(ICaseEventModel original, Long caseId, String user)
Creates a copy of a case event.void
setCaseEventStatus(ICaseEventModel caseEvent, CaseEventStatusType status)
This method updates the status of a case event.ICaseModel
unlockCase(long id)
Method for unlocking a case.ICaseModel
updateCase(long id, CaseStatusType status, String lockedBy)
This method updates a case.ICaseModel
updateCaseApplicationId(long id, String applicationId)
Updates the application id of a case.ICaseModel
updateCaseDisplayName(long id, IMultilingualText displayName)
This method will remove the current display names and will add the new new display names provided as parameter In case of null, the case name will be setITaskModel
updateDueDate(long taskId, DateTimeValue dueDate)
This methods updates the due date of the task.ITaskModel
updateLastPriorityCheck(long taskId, DateTimeValue lastPriorityCheck)
This method updates the last priority check of the task with the specified id.ITaskModel
updatePriority(long taskId, Integer priority, DateTimeValue lastPriorityCheck)
This methods updates the priority and the last priority check of the task with the specified id.ITaskModel
updateStartDate(long taskId, DateTimeValue startDate)
This methods updates the start date of the task.ITaskModel
updateTask(long taskId, TaskStatusType status, IAssigneeInfo assigneeInfo, DateTimeValue timeoutDate, String exitState, String executedBy, boolean isRequired, boolean isUserSet, Integer priority, DateTimeValue lastPriorityCheck, IMultilingualText displayName)
This method updates a task with the specified id.ITaskModel
updateTaskDisplayName(long taskId, IMultilingualText displayName)
Updates the display name of the task with the specified id.ITaskModel
updateTaskExitState(long taskId, String newExitState)
Method for updating the taskExitStateITaskModel
updateTaskUnauthorizedUsers(long taskId, String[] unauthorizedUsers)
This method updates the unauthorizedUsers property of a task.ITaskModel
updateTimeoutDate(long taskId, DateTimeValue timeoutDate)
This methods updates the timeout date of the task.ICaseDataValue
updateValue(long instanceId, String attributeName, IValue attrValue)
This method updates a value of an instance.
-
-
-
Method Detail
-
getCase
public ICaseModel getCase(long caseId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method returns the case for the specified id.- Specified by:
getCase
in interfaceIProcessCaseDao
- Parameters:
caseId
- The id of the case.- Returns:
- The model of the case for the specified id, or null if the case could not be found.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findCases
public ICaseModel[] findCases(CaseCriteria caseFilter, TaskCriteria taskFilter) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method searches for cases containing tasks matching the filter.- Specified by:
findCases
in interfaceIProcessCaseDao
- Parameters:
caseFilter
- The case filter.taskFilter
- The task filter.- Returns:
- The matching cases.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findCaseIds
public long[] findCaseIds(CaseCriteria caseFilter, TaskCriteria taskFilter) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Searches for cases matching the specified case and task filters and returns their IDs.- Specified by:
findCaseIds
in interfaceIProcessCaseDao
- Parameters:
caseFilter
- the filter cases should matchtaskFilter
- the filter tasks should match- Returns:
- the IDs of the matching cases.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
createCase
public ICaseModel createCase(String name, String appId, CaseStatusType status, String lockedBy, IMultilingualText displayName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method creates a case.- Specified by:
createCase
in interfaceIProcessCaseDao
- Parameters:
name
- The name of the case.appId
- The application id.status
- The status of the case.lockedBy
- The user locking the case.- Returns:
- The model for the case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateCase
public ICaseModel updateCase(long id, CaseStatusType status, String lockedBy) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method updates a case.- Specified by:
updateCase
in interfaceIProcessCaseDao
- Parameters:
id
- The id of the case.status
- The new status of the case.lockedBy
- The user locking the case.- Returns:
- The model for the case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateCaseDisplayName
public ICaseModel updateCaseDisplayName(long id, IMultilingualText displayName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method will remove the current display names and will add the new new display names provided as parameter In case of null, the case name will be set- Specified by:
updateCaseDisplayName
in interfaceIProcessCaseDao
- Parameters:
id
- The id of the case.displayName
- the display name to set- Returns:
- The model for the case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateTaskDisplayName
public ITaskModel updateTaskDisplayName(long taskId, IMultilingualText displayName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Updates the display name of the task with the specified id.- Specified by:
updateTaskDisplayName
in interfaceIProcessCaseDao
- Parameters:
taskId
- the id of the taskdisplayName
- the display name- Returns:
- the updated task model
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
deleteCase
public void deleteCase(long id) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method deletes a case.- Specified by:
deleteCase
in interfaceIProcessCaseDao
- Parameters:
id
- The id of the case.- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getTask
public ITaskModel getTask(long id) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method returns the task of a certain id.- Specified by:
getTask
in interfaceIProcessCaseDao
- Parameters:
id
- The id of the task.- Returns:
- The model for the task, or null if a task model with the given id is not found.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findTasks
public ITaskModel[] findTasks(TaskCriteria taskFilter) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method searches for tasks matching the task filter.- Specified by:
findTasks
in interfaceIProcessCaseDao
- Parameters:
taskFilter
- The filter tasks should match.- Returns:
- The models of tasks matching the filter.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findExtendedTasks
public ITaskQueryResult[] findExtendedTasks(TaskCriteria taskFilter) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method searches for tasks matching the task filter.- Specified by:
findExtendedTasks
in interfaceIProcessCaseDao
- Parameters:
taskFilter
- The filter tasks should match.- Returns:
- The result of the tasks, case and values.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findExtendedCases
public ICaseQueryResult[] findExtendedCases(CaseCriteria caseFilter) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method searches for cases matching the task filter.- Specified by:
findExtendedCases
in interfaceIProcessCaseDao
- Parameters:
caseFilter
- The filter cases should match.- Returns:
- The result of the case and values.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getTasksForCase
public ITaskModel[] getTasksForCase(long caseId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method returns the tasks of a certain case.- Specified by:
getTasksForCase
in interfaceIProcessCaseDao
- Parameters:
caseId
- The id of the case.- Returns:
- The models of the tasks belonging to the case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getChildTasks
public ITaskModel[] getChildTasks(long parentTaskId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method returns the child tasks of a certain task.- Specified by:
getChildTasks
in interfaceIProcessCaseDao
- Parameters:
parentTaskId
- The id of the parent task.- Returns:
- The models of the tasks being a child of the parent.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
createTask
public ITaskModel createTask(long caseId, Long parentId, String name, TaskType type, TaskStatusType status, IAssigneeInfo assignee, GUID nodeId, DateTimeValue startDate, DateTimeValue timeoutDate, DateTimeValue dueDate, String exitState, String eventName, boolean isConditional, boolean isRequired, boolean isUserSet, Integer priority, DateTimeValue lastPriorityCheck, Map<String,String> properties, String[] unauthorizedUserIds, IMultilingualText displayName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method creates a task.- Specified by:
createTask
in interfaceIProcessCaseDao
- Parameters:
caseId
- The id of the case.parentId
- The id of the parent task.name
- The name of the case.type
- The type of the task.status
- The status of the task.assignee
- The assignee of the task.nodeId
- The definition node id of the task.startDate
- The startData of the task.timeoutDate
- The dueDate of the task.exitState
- The exitState of the task.eventName
- The eventName this task is waiting for.isConditional
- Indicator whether the task is conditional.isRequired
- Indicator whether the task is required.isUserSet
- Indicator whether the task was assigned by an user manually or by a routing algorithmpriority
- The priority of the task.lastPriorityCheck
- The last date priority was checked.- Returns:
- The model of the task.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateTask
public ITaskModel updateTask(long taskId, TaskStatusType status, IAssigneeInfo assigneeInfo, DateTimeValue timeoutDate, String exitState, String executedBy, boolean isRequired, boolean isUserSet, Integer priority, DateTimeValue lastPriorityCheck, IMultilingualText displayName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method updates a task with the specified id.- Specified by:
updateTask
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.status
- The status of the task.assigneeInfo
- The assignee of the task.timeoutDate
- The duedate of the task.exitState
- The exitstate of the task.executedBy
- The user who executed the update.isRequired
- The required flag of the task.isUserSet
- Indicator whether the task was assigned by an user manually or by a routing algorithm.priority
- The priority of the task.lastPriorityCheck
- The last time priority was checked.displayName
- The display name of the task.- Returns:
- The updated model of the task.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateStartDate
public ITaskModel updateStartDate(long taskId, DateTimeValue startDate)
Description copied from interface:IProcessCaseDao
This methods updates the start date of the task.- Specified by:
updateStartDate
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.startDate
- The start date of the task.- Returns:
- the updated model of the task.
-
updateDueDate
public ITaskModel updateDueDate(long taskId, DateTimeValue dueDate)
Description copied from interface:IProcessCaseDao
This methods updates the due date of the task.- Specified by:
updateDueDate
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.dueDate
- The due date of the task.- Returns:
- the updated model of the task.
-
updateTimeoutDate
public ITaskModel updateTimeoutDate(long taskId, DateTimeValue timeoutDate)
Description copied from interface:IProcessCaseDao
This methods updates the timeout date of the task.- Specified by:
updateTimeoutDate
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.timeoutDate
- The timeout date of the task.- Returns:
- the updated model of the task.
-
updatePriority
public ITaskModel updatePriority(long taskId, Integer priority, DateTimeValue lastPriorityCheck) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This methods updates the priority and the last priority check of the task with the specified id. This method should be used when the priority of a task changes to a new value.- Specified by:
updatePriority
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.priority
- the priority of the tasklastPriorityCheck
- The last time priority was checked.- Returns:
- the updated model of the task.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateLastPriorityCheck
public ITaskModel updateLastPriorityCheck(long taskId, DateTimeValue lastPriorityCheck) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method updates the last priority check of the task with the specified id. This method should be used when the priority of a task was checked and it did not change to a new value.- Specified by:
updateLastPriorityCheck
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.lastPriorityCheck
- the last time priority was checked.- Returns:
- the updated model of the task.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateTaskUnauthorizedUsers
public ITaskModel updateTaskUnauthorizedUsers(long taskId, String[] unauthorizedUsers) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method updates the unauthorizedUsers property of a task.- Specified by:
updateTaskUnauthorizedUsers
in interfaceIProcessCaseDao
- Returns:
- The model of the task.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getInstancesForCase
public ICaseDataInstance[] getInstancesForCase(long caseId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method returns the instances of a certain case.- Specified by:
getInstancesForCase
in interfaceIProcessCaseDao
- Parameters:
caseId
- The id of the case.- Returns:
- The instances for the specified case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getInstancesForCases
public ICaseDataInstance[] getInstancesForCases(long[] caseIds) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Returns the instances of the specified cases.- Specified by:
getInstancesForCases
in interfaceIProcessCaseDao
- Parameters:
caseIds
- case IDs, must not be null- Returns:
- instances for the specified cases (never null)
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
createInstance
public ICaseDataInstance createInstance(long caseId, String entityName, GUID instanceId, String instanceName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method creates an instance for a certain case.- Specified by:
createInstance
in interfaceIProcessCaseDao
- Parameters:
caseId
- the id of the case.entityName
- The name of the entity.instanceId
- The id of the instance.instanceName
- The name of the instance.- Returns:
- The newly created instance.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
deleteInstance
public void deleteInstance(long instanceId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method deletes an instance- Specified by:
deleteInstance
in interfaceIProcessCaseDao
- Parameters:
instanceId
- The id of the instance to delete.- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getValuesForCase
public ICaseDataValue[] getValuesForCase(long caseId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method returns all the values belonging to a case.- Specified by:
getValuesForCase
in interfaceIProcessCaseDao
- Parameters:
caseId
- The case id for the values.- Returns:
- All values of the specified case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
getValuesForInstances
public ICaseDataValue[] getValuesForInstances(long[] instanceIds) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Returns all the values for the specified instances.- Specified by:
getValuesForInstances
in interfaceIProcessCaseDao
- Parameters:
instanceIds
- the (persistence) IDs of the instances, must not be null.- Returns:
- the values for the specified instances, never null.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
createValue
public ICaseDataValue createValue(long instanceId, String attributeName, IValue attrValue) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method creates a value for an instance.- Specified by:
createValue
in interfaceIProcessCaseDao
- Parameters:
instanceId
- The id of the instance.attributeName
- The value attribute.attrValue
- The value of the attribute.- Returns:
- The value model.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateValue
public ICaseDataValue updateValue(long instanceId, String attributeName, IValue attrValue) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method updates a value of an instance.- Specified by:
updateValue
in interfaceIProcessCaseDao
- Parameters:
instanceId
- The id of the instance.attributeName
- The value attribute.attrValue
- The value of the attribute.- Returns:
- The updated value model.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
deleteValue
public void deleteValue(long instanceId, String attributeName) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method deletes a value of an instance.- Specified by:
deleteValue
in interfaceIProcessCaseDao
- Parameters:
instanceId
- The id of the instance.attributeName
- The name of the attribute.- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
createEvent
public ICaseEventModel createEvent(ApplicationID appId, String name, Long caseId, Long taskId, CaseEventType type, CaseEventStatusType status, Date timestamp, String user, Map<String,IValue> content) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method creates a case event.- Specified by:
createEvent
in interfaceIProcessCaseDao
- Parameters:
appId
- The application ID where the event occurred.name
- The name of the event.caseId
- The case id of the case this message is intended for.taskId
- The task id of the task associated with this event (may be null).type
- The type of the event (message or timer).status
- The status of the event (waiting or processed).timestamp
- The timestamp of the event;user
- The user name of the event creator.content
- A Map of custom data to be persisted.- Returns:
- The case event model object.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
replayEvent
public ICaseEventModel replayEvent(ICaseEventModel original, Long caseId, String user) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Creates a copy of a case event.The following properties are different in the copy compared to the original:
- caseId - is set to the specified caseId
- status - is set to WAITING
- timestamp - is set to current datetime
- user - is set to the specified user
- replayEventId - is set to the id of the original case event
- Specified by:
replayEvent
in interfaceIProcessCaseDao
- Parameters:
original
- the original case event.caseId
- optional caseId, may be null.user
- the user that is replaying the event.- Returns:
- the copied event.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
deleteBroadcastEvents
public void deleteBroadcastEvents() throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Deletes all broadcast events.- Specified by:
deleteBroadcastEvents
in interfaceIProcessCaseDao
- Throws:
ProcessDataAccessException
-
findTimerEvent
public ICaseEventModel findTimerEvent(Long caseId, Long taskId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Returns the timer event associated with the given case and timer task, or null if it does not exist.- Specified by:
findTimerEvent
in interfaceIProcessCaseDao
- Parameters:
caseId
- the case id, must not be null.taskId
- the task id, must not be null.- Returns:
- the timer event or null.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
setCaseEventStatus
public void setCaseEventStatus(ICaseEventModel caseEvent, CaseEventStatusType status) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method updates the status of a case event.- Specified by:
setCaseEventStatus
in interfaceIProcessCaseDao
- Parameters:
caseEvent
- The case event to be updated.status
- The new status.- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findCaseEventById
public ICaseEventModel findCaseEventById(Long eventId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method finds a case event by id.- Specified by:
findCaseEventById
in interfaceIProcessCaseDao
- Parameters:
eventId
- The id of the case event.- Returns:
- The case event.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findAllCaseEvents
public ICaseEventModel[] findAllCaseEvents() throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method finds the list all case events.- Specified by:
findAllCaseEvents
in interfaceIProcessCaseDao
- Returns:
- The list with all case events.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findCaseEventsByCriteria
public ICaseEventModel[] findCaseEventsByCriteria(CaseEventCriteria criteria) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
This method finds a list of case events by criteria.- Specified by:
findCaseEventsByCriteria
in interfaceIProcessCaseDao
- Parameters:
criteria
- The case events criteria used for finding case events.- Returns:
- A list of case events.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findDelayedEvents
public ICaseEventModel[] findDelayedEvents(long caseId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Returns events whose processing has been delayed due to the case being locked. The returned events are ordered by timestamp ascending.- Specified by:
findDelayedEvents
in interfaceIProcessCaseDao
- Parameters:
caseId
- the ID of the case for which delayed events are retrieved.- Returns:
- the delayed events for the given case, never null.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
delayEvent
public void delayEvent(long caseId, ICaseEventModel caseEventModel) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Delays the event with the given id for the case with the given id. If the event with the given id is already delayed for the given case, this method has no effect.- Specified by:
delayEvent
in interfaceIProcessCaseDao
- Parameters:
caseId
- the ID of the case.caseEventModel
- the event.- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
clearDelayedEvent
public void clearDelayedEvent(long caseId, long eventId) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Notifies the persistence layer that an event is no longer delayed.- Specified by:
clearDelayedEvent
in interfaceIProcessCaseDao
- Parameters:
caseId
- the ID of the case.eventId
- the ID of the event.- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findByCriteria
public TaskViewResult findByCriteria(TaskViewCriteria criteria) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Finds task views based on the specified criteria.Unlike
ProcessEngine#findByCriteria(TaskViewCriteria)
, this method does not alter the criteria.- Specified by:
findByCriteria
in interfaceIProcessCaseDao
- Returns:
- The task view result object.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
findByCriteria
public CaseViewResult findByCriteria(CaseViewCriteria criteria) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Finds case views based on the specified criteria.Unlike
ProcessEngine#findByCriteria(CaseViewCriteria)
, this method does not alter the criteria.- Specified by:
findByCriteria
in interfaceIProcessCaseDao
- Returns:
- The case view result object.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateCaseApplicationId
public ICaseModel updateCaseApplicationId(long id, String applicationId)
Description copied from interface:IProcessCaseDao
Updates the application id of a case.- Specified by:
updateCaseApplicationId
in interfaceIProcessCaseDao
- Parameters:
id
- the id of the case which has to be updatedapplicationId
- the new application id- Returns:
- The model of the case for the specified id, or null if the case could not be found.
-
acquireLock
public ICaseModel acquireLock(long id, String lockedBy) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Method for locking a Case. This method can only lock a case if it not already locked. this is needed in order not override a lock of another user.- Specified by:
acquireLock
in interfaceIProcessCaseDao
- Parameters:
id
- the id of the case which has to be updatedlockedBy
- The user locking the case.- Returns:
- The updated model of the case for the specified id
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
unlockCase
public ICaseModel unlockCase(long id) throws ProcessDataAccessException
Description copied from interface:IProcessCaseDao
Method for unlocking a case. This method only unlocks a case if it was locked.- Specified by:
unlockCase
in interfaceIProcessCaseDao
- Parameters:
id
- The id of the case to unlock- Returns:
- The updated model for the case.
- Throws:
ProcessDataAccessException
- if something goes wrong during the data access operation.
-
updateTaskExitState
public ITaskModel updateTaskExitState(long taskId, String newExitState)
Description copied from interface:IProcessCaseDao
Method for updating the taskExitState- Specified by:
updateTaskExitState
in interfaceIProcessCaseDao
- Parameters:
taskId
- The id of the task.newExitState
- The new Task Exit State to set- Returns:
- The updated model of the task.
-
isCaseLocked
public boolean isCaseLocked(long caseId)
Description copied from interface:IProcessCaseDao
Checks is a case is locked in the database- Specified by:
isCaseLocked
in interfaceIProcessCaseDao
- Parameters:
caseId
- the id of the case to check- Returns:
- true if the case is locked, false otherwise
-
-