com.bea.wli.worklist.api
Class TaskQuery

java.lang.Object
  extended by com.bea.wli.worklist.api.TaskSelector
      extended by com.bea.wli.worklist.api.TaskQuery
All Implemented Interfaces:
Serializable

public final class TaskQuery
extends TaskSelector
implements Serializable

TaskQuery is used to select tasks based on specific properties.

A value for querying can be set against interested properties. If the value is not null, it will be used to filter tasks. Null values and empty arrays (applicable in case of String and String[]) will not be used for filtering.

If multiple querying conditions are specified, only the tasks fulfilling all the conditions will be selected. This selector also allows the results to be sorted in ascending or descending order.

To search for tasks without assignees, use an Assignee object without user or group. Note that if Assignee is part of sorting criteria, only tasks with assignees will be returned.

For sorting the results, use the setSortByXXX(short order) methods. The order parameter indicates the precedence of the sort criteria as well as sorting in descending order or ascending order.

A negative order parameter will result in descending sort order, while a positive parameter will result in ascending sort order.

The absolute value of the order parameter denotes the relative precedence of the sort criteria. A smaller absolute value indicates that the criteria be sorted first.

The following example illustrates the usage:

setSortByPriority((short)1);
setSortByTaskName((short)-2);

This means that the tasks will be sorted first by priority in ascending order, followed by sorting on task names in descending order. If the same order parameter is given to multiple criteria, the relative sort order among the criteria is not guaranteed. If the order parameter given is Short.MAX_VALUE, then the criteria will not take effect at all.

Some special criteria accept wildcard characters: % stands for any sequence of characters, _ stands for any single character.
You can escape these characters using \. i.e. %a_b\%%

Since:
9.2
See Also:
Serialized Form

Constructor Summary
TaskQuery()
          Construct a new empty task query.
TaskQuery(TaskQuery query)
           
TaskQuery(TaskSelector selector)
           
 
Method Summary
 AdminState.Type[] getAdminStates()
           
 boolean getCompletionDueDateIsNull()
          Should the query look for null completion due date values.
 String[] getCurrentStepNames()
           
 boolean getIncludeTaskAssignee()
          Should we retrieve assignee information along with the TaskData?
 boolean getIncludeTasksFromOtherHostApps()
          Should we retrieve task instances from other applications in the domain? This flag will be ignored if task plan ids are set on the task query.
 boolean getIncludeTaskStepTimeEstimates()
          Should we retrieve step time estimate information along with the TaskData? Defaults to true.
 String getListeningControlHandleStringValue()
           
 String getParentControlHandleStringValue()
           
 short getSortByAdminState()
           
 short getSortByCurrentStepName()
           
 short getSortByListeningControlHandleStringValue()
           
 short getSortByParentControlHandleStringValue()
           
 short getSortByTaskPlanId()
           
 short getSortByWorkingState()
           
 TaskPlanId[] getTaskPlanIds()
           
 WorkingState.Type[] getWorkingStates()
           
 boolean isListeningControlHandleStringValuePattern()
           
 boolean isParentControlHandleStringValuePattern()
           
 void setAdminStates(AdminState.Type[] states)
          For querying tasks at different admin states, use the Type enum in the AdminState class.
 void setCompletionDueDateIsNull(boolean completionDueDateIsNull)
          Should the query look for null completion due date values.
 void setCurrentStepNames(String[] steps)
          For querying tasks at different steps.
 void setIncludeTaskAssignee(boolean include)
          Should we retrieve assignee information along with the TaskData? Defaults to true.
 void setIncludeTasksFromOtherHostApps(boolean include)
          Should we retrieve task instances from other applications in the domain? This flag will be ignored if task plan ids are set on the task query.
 void setIncludeTaskStepTimeEstimates(boolean include)
          Should we retrieve step time estimate information along with the TaskData? Defaults to true.
 void setListeningControlHandleStringValue(String value, boolean isPattern)
           
 void setParentControlHandleStringValue(String value, boolean isPattern)
           
 void setSortByAdminState(short order)
           
 void setSortByCurrentStepName(short order)
           
 void setSortByListeningControlHandleStringValue(short order)
           
 void setSortByParentControlHandleStringValue(short order)
           
 void setSortByTaskPlanId(short order)
           
 void setSortByWorkingState(short order)
           
 void setTaskPlanIds(TaskPlanId[] types)
          For querying tasks of different types.
 void setWorkingStates(WorkingState.Type[] states)
          For querying tasks at different working states, use the Type enum in the WorkingState class.
 
Methods inherited from class com.bea.wli.worklist.api.TaskSelector
addProperties, addProperty, addProperty, getAssignee, getCanBeAborted, getCanBeReassigned, getCanBeReturned, getClaimants, getClaimDueDateAfter, getClaimDueDateBefore, getComment, getCompletedDateAfter, getCompletedDateBefore, getCompletionDueDateAfter, getCompletionDueDateBefore, getCreationDateAfter, getCreationDateBefore, getDescription, getIncludedPropertyNames, getIncludeTaskProperties, getIncludeTaskRequestMessage, getIncludeTaskResponseMessage, getListeningProcessIds, getListeningProcessUri, getMaxPriority, getMaxTasksReturned, getMinPriority, getOwners, getParentProcessIds, getParentProcessUri, getPropertyName, getPropertyNames, getPropertyValue, getPropertyValue, getPropertyValues, getSortByAssignee, getSortByCanBeAborted, getSortByCanBeReassigned, getSortByCanBeReturned, getSortByClaimant, getSortByClaimDueDate, getSortByComment, getSortByCompletedDate, getSortByCompletionDueDate, getSortByCreationDate, getSortByDescription, getSortByListeningProcessId, getSortByListeningProcessUri, getSortByOwner, getSortByParentProcessId, getSortByParentProcessUri, getSortByPriority, getSortByPropertyMap, getSortByPropertyValue, getSortByPropertyValue, getSortByStateType, getSortByTaskId, getSortByTaskName, getStateTypes, getTaskIds, getTaskName, isCommentPattern, isDescriptionPattern, isListeningProcessUriPattern, isParentProcessUriPattern, isPropertyValuePattern, isPropertyValuePattern, isSingleton, isTaskNamePattern, setAssignee, setCanBeAborted, setCanBeReassigned, setCanBeReturned, setClaimants, setClaimDueDateAfter, setClaimDueDateBefore, setComment, setCompletedDateAfter, setCompletedDateBefore, setCompletionDueDateAfter, setCompletionDueDateBefore, setCreationDateAfter, setCreationDateBefore, setDescription, setIncludedPropertyNames, setIncludeTaskProperties, setIncludeTaskRequestMessage, setIncludeTaskResponseMessage, setListeningProcessIds, setListeningProcessUri, setMaxPriority, setMaxTasksReturned, setMinPriority, setOwners, setParentProcessIds, setParentProcessUri, setPropertyName, setPropertyNames, setPropertyValue, setPropertyValue, setPropertyValues, setSortByAssignee, setSortByCanBeAborted, setSortByCanBeReassigned, setSortByCanBeReturned, setSortByClaimant, setSortByClaimDueDate, setSortByComment, setSortByCompletedDate, setSortByCompletionDueDate, setSortByCreationDate, setSortByDescription, setSortByListeningProcessId, setSortByListeningProcessUri, setSortByOwner, setSortByParentProcessId, setSortByParentProcessUri, setSortByPriority, setSortByPropertyValue, setSortByPropertyValue, setSortByStateType, setSortByTaskId, setSortByTaskName, setStateTypes, setTaskIds, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskQuery

public TaskQuery()
Construct a new empty task query. If an empty task query is passed to the WorklistTaskQuery, it will return all the tasks in the database with no sorting applied.


TaskQuery

public TaskQuery(TaskSelector selector)

TaskQuery

public TaskQuery(TaskQuery query)
Method Detail

getCompletionDueDateIsNull

public boolean getCompletionDueDateIsNull()
Should the query look for null completion due date values. Setting this option true is different than setting completion due date before and after dates to null. This option specifically matches any task that has a null completion due date. Any value set for completion due date before and after will be ignored if this option is true.


setCompletionDueDateIsNull

public void setCompletionDueDateIsNull(boolean completionDueDateIsNull)
Should the query look for null completion due date values. Setting this option true is different than setting completion due date before and after dates to null. This option specifically matches any task that has a null completion due date. Any value set for completion due date before and after will be ignored if this option is true.


getAdminStates

public AdminState.Type[] getAdminStates()
Since:
9.0

setAdminStates

public void setAdminStates(AdminState.Type[] states)
For querying tasks at different admin states, use the Type enum in the AdminState class.

Parameters:
states - an array of admin states
Since:
9.0

setSortByAdminState

public void setSortByAdminState(short order)
Since:
9.0

getSortByAdminState

public short getSortByAdminState()
Since:
9.0

getWorkingStates

public WorkingState.Type[] getWorkingStates()
Since:
9.0

setWorkingStates

public void setWorkingStates(WorkingState.Type[] states)
For querying tasks at different working states, use the Type enum in the WorkingState class.

Parameters:
states - an array of working states
Since:
9.0

setSortByWorkingState

public void setSortByWorkingState(short order)
Since:
9.0

getSortByWorkingState

public short getSortByWorkingState()
Since:
9.0

getParentControlHandleStringValue

public String getParentControlHandleStringValue()
Since:
9.0

setParentControlHandleStringValue

public void setParentControlHandleStringValue(String value,
                                              boolean isPattern)
Since:
9.0

isParentControlHandleStringValuePattern

public boolean isParentControlHandleStringValuePattern()
Since:
9.0

setSortByParentControlHandleStringValue

public void setSortByParentControlHandleStringValue(short order)
Since:
9.0

getSortByParentControlHandleStringValue

public short getSortByParentControlHandleStringValue()
Since:
9.0

getListeningControlHandleStringValue

public String getListeningControlHandleStringValue()
Since:
9.0

setListeningControlHandleStringValue

public void setListeningControlHandleStringValue(String value,
                                                 boolean isPattern)
Since:
9.0

isListeningControlHandleStringValuePattern

public boolean isListeningControlHandleStringValuePattern()
Since:
9.0

setSortByListeningControlHandleStringValue

public void setSortByListeningControlHandleStringValue(short order)
Since:
9.0

getSortByListeningControlHandleStringValue

public short getSortByListeningControlHandleStringValue()
Since:
9.0

getTaskPlanIds

public TaskPlanId[] getTaskPlanIds()
Since:
9.0

setTaskPlanIds

public void setTaskPlanIds(TaskPlanId[] types)
For querying tasks of different types.

Parameters:
types - an array of task plan ids
Since:
9.0

setSortByTaskPlanId

public void setSortByTaskPlanId(short order)
Since:
9.0

getSortByTaskPlanId

public short getSortByTaskPlanId()
Since:
9.0

getCurrentStepNames

public String[] getCurrentStepNames()
Since:
9.0

setCurrentStepNames

public void setCurrentStepNames(String[] steps)
For querying tasks at different steps.

Parameters:
steps - an array of current step ids
Since:
9.0

setSortByCurrentStepName

public void setSortByCurrentStepName(short order)
Since:
9.0

getSortByCurrentStepName

public short getSortByCurrentStepName()
Since:
9.0

getIncludeTaskAssignee

public boolean getIncludeTaskAssignee()
Should we retrieve assignee information along with the TaskData?

Since:
9.0

setIncludeTaskAssignee

public void setIncludeTaskAssignee(boolean include)
Should we retrieve assignee information along with the TaskData? Defaults to true.

Since:
9.0

getIncludeTaskStepTimeEstimates

public boolean getIncludeTaskStepTimeEstimates()
Should we retrieve step time estimate information along with the TaskData? Defaults to true.

Since:
9.0

setIncludeTaskStepTimeEstimates

public void setIncludeTaskStepTimeEstimates(boolean include)
Should we retrieve step time estimate information along with the TaskData? Defaults to true.

Since:
9.0

getIncludeTasksFromOtherHostApps

public boolean getIncludeTasksFromOtherHostApps()
Should we retrieve task instances from other applications in the domain? This flag will be ignored if task plan ids are set on the task query.

Since:
9.0

setIncludeTasksFromOtherHostApps

public void setIncludeTasksFromOtherHostApps(boolean include)
Should we retrieve task instances from other applications in the domain? This flag will be ignored if task plan ids are set on the task query.

Since:
9.0