Class TaskQuery.FilterQuery
- All Implemented Interfaces:
TaskQuery.IFilterableColumns,TaskQuery.IFilterLink,TaskQuery.IFilterQuery
- Enclosing class:
TaskQuery
- API:
- This is a public API.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.ivyteam.ivy.workflow.query.TaskQuery
TaskQuery.AggregationQuery, TaskQuery.EnumValueOrderByColumnQuery<T extends ch.ivyteam.ivy.persistence.IPersistentEnumeration>, TaskQuery.FilterLink, TaskQuery.FilterQuery, TaskQuery.GroupByQuery, TaskQuery.IAggregationQuery, TaskQuery.IBooleanColumnFilterQuery, TaskQuery.IBoolFilterQuery, TaskQuery.IClobColumnFilterQuery, TaskQuery.IColumnFilterQuery, TaskQuery.ICustomFieldAggregationQuery, TaskQuery.ICustomFieldFilterQuery, TaskQuery.ICustomFieldGroupBy, TaskQuery.ICustomFieldOrderBy, TaskQuery.IDateColumnFilterQuery, TaskQuery.IFilterableColumns, TaskQuery.IFilterLink, TaskQuery.IFilterQuery, TaskQuery.IGroupByQueryColumns, TaskQuery.IIntegerColumnFilterQuery, TaskQuery.INumberColumnFilterQuery, TaskQuery.IOrderByQueryColumns, TaskQuery.IPatternColumnFilterQuery, TaskQuery.IStringColumnFilterQuery, TaskQuery.ITaskBusinessStateFilterQuery, TaskQuery.ITaskStateFilterQuery, TaskQuery.IUUIDColumnFilterQuery, TaskQuery.IWorkflowPriorityFilterQuery, TaskQuery.LongValueOrderByColumnQuery, TaskQuery.OrderByColumnQuery, TaskQuery.OrderByQuery, TaskQuery.StringValueOrderByColumnQuery -
Method Summary
Modifier and TypeMethodDescriptionadditionalProperty(String key) Deprecated.Prepares a where statement for the columnBusinessCaseId.
Must be followed by a call to a condition method.canWorkOn(ISecurityMember member) Filters all tasks the given security member (user or role) can now work on.Filters all tasks where the security member with given member name (user or role) in the given application can now work on.
Compared to the methodcanWorkOn(ISecurityMember), this method evaluates the correspondingISecurityMemberon query execution.Adds an expression to the where clause that selects those tasks that belong to cases which matches the givencaseQuery.Filters all tasks the current session user can now work on.Filters all tasks the current session user has worked on.Filters all tasks the user of the current session user is involved in.Filters all tasks the current user or any of his roles are involved in.Prepares a where statement for a custom field.
Must be followed by a call to a field value type.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.hasWorkedOn(ISecurityMember member) Filters all tasks the given security member (user or role) has worked on.hasWorkedOn(String memberName, String applicationName) Filters all tasks where the security member with given member name (user or role) in the given application has worked on.
Compared to the methodhasWorkedOn(ISecurityMember), this method evaluates the correspondingISecurityMemberon query execution.haveTriggeredCases(CaseQuery caseQuery) Adds an expression to the where clause that selects those tasks that have triggered the creation of cases which matches the givencaseQuery.isInvolved(ISecurityMember member) Filters all tasks the security member is involved in.
If the given security member is a user, this method is equivalent toTaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser). If the given security member is a role, this method is equivalent toTaskQuery.IFilterableColumns.roleIsInvolved(ch.ivyteam.ivy.security.IRole).isInvolved(String memberName, String applicationName) Filters all tasks where the security member with given member name (user or role) in the given application is involved in.roleIsInvolved(IRole role) Filters all tasks the role is involved in.roleIsInvolved(String roleName, String applicationName) Filters all tasks where the role with given name in the given application is involved in.userIsInvolved(IUser user) Filters all tasks the user is involved in.userIsInvolved(String userName, String applicationName) Filters all tasks where the user with given name in the given application is involved in.Filters all tasks the given user or any of his roles are involved in.userOrHisRolesAreInvolved(String userName, String applicationName) Filters all tasks the user with the given name in the given application or any of his roles are involved in.Methods inherited from class ch.ivyteam.ivy.workflow.query.TaskQuery.FilterLink
and, and, andOverall, andOverall, or, orMethods inherited from class ch.ivyteam.ivy.workflow.query.TaskQuery
aggregate, asJson, create, executor, fromJson, groupBy, orderBy, toType, whereMethods inherited from interface ch.ivyteam.ivy.workflow.query.TaskQuery.IFilterLink
and, and, andOverall, andOverall, or, or
-
Method Details
-
cases
Description copied from interface:TaskQuery.IFilterableColumnsAdds an expression to the where clause that selects those tasks that belong to cases which matches the given
caseQuery.This method considers only the where clause of the given
caseQuery. All other parts are ignored.Example:
Get all tasks that belong to cases with the custom varchar field1 set to "HRM"import ITask; import ch.ivyteam.ivy.workflow.TaskState; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery; TaskQuery query = TaskQuery.create().where().cases(CaseQuery.create().where().customVarCharField1().isEqual("HRM")); List<ITask> tasksWithBelongToHrmCases = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
casesin interfaceTaskQuery.IFilterableColumns- Parameters:
caseQuery- case query with where clause to filter the cases- Returns:
- the query for further composition
- API:
- This public API is available in Java.
-
haveTriggeredCases
Description copied from interface:TaskQuery.IFilterableColumnsAdds an expression to the where clause that selects those tasks that have triggered the creation of cases which matches the given
caseQuery.Tasks can trigger the creation of cases by using the Trigger process element.
This method considers only the where clause of the given
caseQuery. All other parts are ignoredExample:
Get all tasks that have created cases with the custom varchar field1 set to "HRM"import ITask; import ch.ivyteam.ivy.workflow.TaskState; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery; TaskQuery query = TaskQuery.create().where().haveTriggeredCases(CaseQuery.create().where().customVarCharField1().isEqual("HRM")); List<ITask> tasksThatTriggeredHrmCases = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
haveTriggeredCasesin interfaceTaskQuery.IFilterableColumns- Parameters:
caseQuery- case query with where clause to filter the cases- Returns:
- the query for further composition
- API:
- This public API is available in Java.
-
isInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the security member is involved in.
- If the given security member is a user, this method is equivalent to
TaskQuery.IFilterableColumns.userIsInvolved(ch.ivyteam.ivy.security.IUser). - If the given security member is a role, this method is equivalent to
TaskQuery.IFilterableColumns.roleIsInvolved(ch.ivyteam.ivy.security.IRole).
- Specified by:
isInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
member-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
- If the given security member is a user, this method is equivalent to
-
currentUserIsInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the user of the current session user is involved in.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; TaskQuery query = TaskQuery.create().where().currentUserIsInvolved(); List<ITask> tasksSessionIsInvolved = ivy.wf.getTaskQueryExecutor().getResults(query);
- Specified by:
currentUserIsInvolvedin interfaceTaskQuery.IFilterableColumns- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
currentUserOrHisRolesAreInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the current user or any of his roles are involved in. See
TaskQuery.IFilterableColumns.currentUserIsInvolved()for a description of when the current user is involved in a task andTaskQuery.IFilterableColumns.roleIsInvolved(IRole)for when a role is involved in a task.- Specified by:
currentUserOrHisRolesAreInvolvedin interfaceTaskQuery.IFilterableColumns- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
isInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks where the security member with given member name (user or role) in the given application is involved in.Compared to the method
isInvolved(ISecurityMember), this method evaluates the correspondingISecurityMemberon query execution.Example:
Get all tasks where the current user or the user 'UserHans' is involved in:import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create() .where().isInvolved("#UserHans", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().isInvolved(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
isInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
memberName- e.g. "#UserHans" or "TopManagementRole"applicationName- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
userIsInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks where the user with given name in the given application is involved in.Compared to the method
userIsInvolved(IUser), this method evaluates the correspondingIUseron query execution.This method is equivalent to
isInvolved("#" + userName, applicationName)- Specified by:
userIsInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
userName- e.g. "UserHans"applicationName-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
userOrHisRolesAreInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the user with the given name in the given application or any of his roles are involved in. See
TaskQuery.IFilterableColumns.userIsInvolved(IUser)for a description of when a user is involved in a task andTaskQuery.IFilterableColumns.roleIsInvolved(IRole)for when a role is involved in a task.- Specified by:
userOrHisRolesAreInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
userName- e.g. "Joe"applicationName-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
roleIsInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks where the role with given name in the given application is involved in.Compared to the method
roleIsInvolved(IRole), this method evaluates the correspondingIRoleon query execution.This method is equivalent to
TaskQuery.IFilterableColumns.isInvolved(String, String)- Specified by:
roleIsInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
roleName- e.g. "TopManagementRole"applicationName-- Returns:
- the query for further composition@see CaseQuery.IFilterQuery#isInvolved(ISecurityMember)
- See Also:
- API:
- This public API is available in Java.
-
roleIsInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the role is involved in. A role is involved in a task if
- the task is assigned to the role. Either before or after the expiry.
- the role becomes responsible for a task after expiry but the task has not yet expired.
- the task is assigned to the role but is
delayed - the task is assigned to a sub or parent role of the role
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IRole; IRole role = ivy.session.getSecurityContext().findRole("Admin"); TaskQuery query = TaskQuery.create().where().roleIsInvolved(role); List<ITask> userInvolvedTasks = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
roleIsInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
role-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
userIsInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the user is involved in. A user is involved in a task if
- the user could work on the task
- the user is working at the task right now
- the user has completed the task
- the user has worked on the task without completing it and now it is no longer accessible for him. Either because the task was completed by someone else, was reassigned, ...
- the user can work on the task but it is
delayed
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); TaskQuery query = TaskQuery.create().where().userIsInvolved(user); List<ITask> userInvolvedTasks = ivy.wf.getTaskQueryExecutor().getResults(query);
- Specified by:
userIsInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
user-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
userOrHisRolesAreInvolved
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the given user or any of his roles are involved in. See
TaskQuery.IFilterableColumns.userIsInvolved(IUser)for a description of when a user is involved in a task andTaskQuery.IFilterableColumns.roleIsInvolved(IRole)for when a role is involved in a task.- Specified by:
userOrHisRolesAreInvolvedin interfaceTaskQuery.IFilterableColumns- Parameters:
user-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
canWorkOn
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the given security member (user or role) can now work on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); TaskQuery query = TaskQuery.create().where().canWorkOn(user); List<ITask> tasksUserCanWorkOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Specified by:
canWorkOnin interfaceTaskQuery.IFilterableColumns- Parameters:
member-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
canWorkOn
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks where the security member with given member name (user or role) in the given application can now work on.
Compared to the methodcanWorkOn(ISecurityMember), this method evaluates the correspondingISecurityMemberon query execution.Example:
Get all tasks where the current user or the user 'UserHans' can work on:import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create() .where().canWorkOn("#UserHans", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().canWorkOn(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
canWorkOnin interfaceTaskQuery.IFilterableColumns- Parameters:
memberName- e.g. "#UserHans" or "TopManagementRole"applicationName- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
currentUserCanWorkOn
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the current session user can now work on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; TaskQuery query = TaskQuery.create().where().currentUserCanWorkOn(); List<ITask> tasksSessionCanWorkOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Specified by:
currentUserCanWorkOnin interfaceTaskQuery.IFilterableColumns- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
hasWorkedOn
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the given security member (user or role) has worked on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.security.IUser; IUser user = ivy.session.getSessionUser(); TaskQuery query = TaskQuery.create().where().hasWorkedOn(user); List<ITask> tasksUserHasWorkedOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Specified by:
hasWorkedOnin interfaceTaskQuery.IFilterableColumns- Parameters:
member-- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
hasWorkedOn
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks where the security member with given member name (user or role) in the given application has worked on.
Compared to the methodhasWorkedOn(ISecurityMember), this method evaluates the correspondingISecurityMemberon query execution.Example:
Get all tasks where the current user or the user 'UserHans' has worked on:import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create() .where().hasWorkedOn("#UserHans", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix .or().hasWorkedOn(ivy.session.getSessionUser().getMemberName(), "MyApp"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
hasWorkedOnin interfaceTaskQuery.IFilterableColumns- Parameters:
memberName- e.g. "#UserHans" or "TopManagementRole"applicationName- e.g. "MyApplication"- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
currentUserHasWorkedOn
Description copied from interface:TaskQuery.IFilterableColumnsFilters all tasks the current session user has worked on.
Example:
import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.ITask; TaskQuery query = TaskQuery.create().where().currentUserHasWorkedOn(); List<ITask> tasksSessionHasWorkedOn = ivy.wf.getTaskQueryExecutor().getResults(query);
- Specified by:
currentUserHasWorkedOnin interfaceTaskQuery.IFilterableColumns- Returns:
- the query for further composition
- See Also:
- API:
- This public API is available in Java.
-
customField
Description copied from interface:TaskQuery.IFilterableColumnsPrepares a where statement for a custom field.
Must be followed by a call to a field value type.Example:
import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.query.TaskQuery; TaskQuery query = TaskQuery.create().where().customField().stringField("myCustomField").isEqualTo("valueToFind")"; List<ITask> tasksWithMatchingField = ivy.wf.getTaskQueryExecutor().getResults(query);- Specified by:
customFieldin interfaceTaskQuery.IFilterableColumns- Returns:
- the query for further composition
- API:
- This public API is available in Java.
-
additionalProperty
Deprecated.Description copied from interface:TaskQuery.IFilterableColumnsPrepares a where statement for an additional property value.
Must be followed by a call to a condition method.- Specified by:
additionalPropertyin interfaceTaskQuery.IFilterableColumns- Parameters:
key- the additional property key- Returns:
- the query for further composition
- API:
- This public API is available in Java.
-
displayNameTemplate
@Deprecated(since="9.4", forRemoval=true) public TaskQuery.IStringColumnFilterQuery displayNameTemplate()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:TaskQuery.IFilterableColumnsDoes not add any filter because column
DisplayNameTemplatewas removed without any replacement.
Must be followed by a call to a condition method.- Specified by:
displayNameTemplatein interfaceTaskQuery.IFilterableColumns- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
displayDescriptionTemplate
@Deprecated(since="9.4", forRemoval=true) public TaskQuery.IClobColumnFilterQuery displayDescriptionTemplate()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:TaskQuery.IFilterableColumnsDoes not add any filter because column
DisplayDescriptionTemplatewas removed without any replacement.
Must be followed by a call to a condition method.- Specified by:
displayDescriptionTemplatein interfaceTaskQuery.IFilterableColumns- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
businessCaseId
Description copied from interface:TaskQuery.IFilterableColumnsPrepares a where statement for the column
BusinessCaseId.
Must be followed by a call to a condition method.- Specified by:
businessCaseIdin interfaceTaskQuery.IFilterableColumns- Returns:
- query for further composition
- API:
- This public API is available in Java.
-