Package io.kadai.workbasket.api
Interface WorkbasketQuery
- All Superinterfaces:
io.kadai.common.api.BaseQuery<WorkbasketSummary,
WorkbasketQueryColumnName>
- All Known Implementing Classes:
WorkbasketQueryImpl
public interface WorkbasketQuery
extends io.kadai.common.api.BaseQuery<WorkbasketSummary,WorkbasketQueryColumnName>
WorkitemQuery for generating dynamic sql.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.kadai.common.api.BaseQuery
io.kadai.common.api.BaseQuery.SortDirection
-
Method Summary
Modifier and TypeMethodDescriptionaccessIdsHavePermissions
(List<WorkbasketPermission> permissions, String... accessIds) Setting up the permissions which should be granted on the result workbaskets and the users which should be checked.callerHasPermissions
(WorkbasketPermission... permissions) Add condition to query if the caller (one of the accessIds of the caller) has the given permissions on the workbasket.createdWithin
(io.kadai.common.api.TimeInterval... createdWithin) Add the time intervals within which the workbasket was created to your query.customAttributeIn
(WorkbasketCustomField customField, String... searchArguments) Add the values of custom attributes for exact matching to your query.customAttributeLike
(WorkbasketCustomField customField, String... searchArguments) Add the values of custom attributes for pattern matching to your query.descriptionLike
(String... descriptions) Add your description to your query.Add your domains to your query.domainLike
(String... domains) Add the domains for pattern matching to your query.Add your ids to your query.Add your keys to your query.Add keys to your query.keyOrNameLike
(String... searchStrings) Add search strings to your query that are searched case-insensitively in the key and name fields of workbaskets.markedForDeletion
(boolean markedForDeletion) Add to your query if the Workbasket shall be marked for deletion.modifiedWithin
(io.kadai.common.api.TimeInterval... modifiedWithin) Add the time intervals within which the workbasket was modified to your query.Add your names to your query.Add names to your query.orderByCustomAttribute
(WorkbasketCustomField customField, io.kadai.common.api.BaseQuery.SortDirection sortDirection) This method sorts the query result according to the value of a custom field.orderByDescription
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by description.orderByDomain
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by domain.orderByKey
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by key.orderByName
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by name.orderByOrgLevel1
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by organization level 1.orderByOrgLevel2
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by organization level 2.orderByOrgLevel3
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by organization level 3.orderByOrgLevel4
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by organization level 4.orderByOwner
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by owner.orderByType
(io.kadai.common.api.BaseQuery.SortDirection sortDirection) Sort the query result by type.orgLevel1In
(String... orgLevels1) Add the 1st organization level to your query.orgLevel1Like
(String... orgLevels1) Add the 1st organization level for pattern matching to your query.orgLevel2In
(String... orgLevels2) Add the 2nd organization level to your query.orgLevel2Like
(String... orgLevels2) Add the 2nd organization level for pattern matching to your query.orgLevel3In
(String... orgLevels3) Add the 3rd organization level to your query.orgLevel3Like
(String... orgLevels3) Add the 3rd organization level for pattern matching to your query.orgLevel4In
(String... orgLevels4) Add the 4th organization level to your query.orgLevel4Like
(String... orgLevels4) Add the 4th organization level for pattern matching to your query.Add the owners to your query.Add the owners for pattern matching to your query.typeIn
(WorkbasketType... types) Add your types to your query.Methods inherited from interface io.kadai.common.api.BaseQuery
count, list, list, listPage, listValues, single
-
Method Details
-
idIn
Add your ids to your query. The ids are compared to the ids of workbaskets with the IN operator.- Parameters:
ids
- the id as Strings- Returns:
- the query
-
keyIn
Add your keys to your query. The keys are compared case-insensitively to the keys of workbaskets with the IN operator.- Parameters:
keys
- the keys as Strings- Returns:
- the query
-
keyLike
Add keys to your query. The keys are compared case-insensitively to the keys of workbaskets with the SQL LIKE operator. You may add a wildcard like '%' to search generically. If you specify multiple keys they are connected with an OR operator, this is, the query searches workbaskets whose keys are like key1 or like key2, etc.- Parameters:
keys
- the keys as Strings- Returns:
- the query
-
nameIn
Add your names to your query. The names are compared case-insensitively to the names of workbaskets- Parameters:
names
- the names as Strings- Returns:
- the query
-
nameLike
Add names to your query. The names are compared case-insensitively to the names of workbaskets with the SQL LIKE operator. You may add a wildcard like '%' to search generically. If you specify multiple names, they are connected with an OR operator, this is, the query searches workbaskets whose names are like name1 or like name2, etc.- Parameters:
names
- the names as Strings- Returns:
- the query
-
keyOrNameLike
Add search strings to your query that are searched case-insensitively in the key and name fields of workbaskets. You may add a wildcard like '%' to search generically. If you specify multiple keys they are connected with an OR operator, this is, the query searches workbaskets whose keys are like string1 or whose names are like string1 or whose keys are like string2 or whose names are like string2, etc...- Parameters:
searchStrings
- the search strings- Returns:
- the query
-
domainIn
Add your domains to your query.- Parameters:
domains
- the domains as Strings- Returns:
- the query
-
typeIn
Add your types to your query.- Parameters:
types
- the types- Returns:
- the query
-
createdWithin
Add the time intervals within which the workbasket was created to your query. For each time interval, the database query will search for workbaskets whose created timestamp is after or at the interval's begin and before or at the interval's end. If more than one interval is specified, the query will connect them with the OR keyword. If either begin or end of an interval are null, these values will not be specified in the query.- Parameters:
createdWithin
- - the TimeIntervals within which the workbasket was created- Returns:
- the query
-
modifiedWithin
Add the time intervals within which the workbasket was modified to your query. For each time interval, the database query will search for workbaskets whose created timestamp is after or at the interval's begin and before or at the interval's end. If more than one interval is specified, the query will connect them with the OR keyword. If either begin or end of an interval are null, these values will not be specified in the query.- Parameters:
modifiedWithin
- - the TimeIntervals within which the workbasket was created- Returns:
- the query
-
descriptionLike
Add your description to your query. It will be compared case-insensitively to the descriptions of workbaskets using the LIKE operator. You may use a wildcard like '%' to search generically. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
descriptions
- your description- Returns:
- the query
-
ownerIn
Add the owners to your query.- Parameters:
owners
- the owners as String- Returns:
- the query
-
ownerLike
Add the owners for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
owners
- the owners as Strings- Returns:
- the query
-
accessIdsHavePermissions
WorkbasketQuery accessIdsHavePermissions(List<WorkbasketPermission> permissions, String... accessIds) throws io.kadai.common.api.exceptions.InvalidArgumentException, io.kadai.common.api.exceptions.NotAuthorizedException Setting up the permissions which should be granted on the result workbaskets and the users which should be checked. READ permission will always be checked by default.
The AccessIds and the given permission will throw an Exception if they would be NULL.- Parameters:
permissions
- which should be used for results.accessIds
- Users which should be checked for given permissions on workbaskets.- Returns:
- the current query object.
- Throws:
io.kadai.common.api.exceptions.InvalidArgumentException
- if permissions OR the accessIds are NULL or empty.io.kadai.common.api.exceptions.NotAuthorizedException
- if the current user is not member of KadaiRole.BUSINESS_ADMIN or KadaiRole.ADMIN
-
callerHasPermissions
Add condition to query if the caller (one of the accessIds of the caller) has the given permissions on the workbasket.- Parameters:
permissions
- the permissions for the query condition.- Returns:
- the updated query.
-
orderByName
Sort the query result by name.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByKey
Sort the query result by key.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByDescription
Sort the query result by description.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByOwner
Sort the query result by owner.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByType
Sort the query result by type.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByDomain
Sort the query result by domain.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
domainLike
Add the domains for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
domains
- the domains of workbaskets as Strings- Returns:
- the query
-
orderByCustomAttribute
WorkbasketQuery orderByCustomAttribute(WorkbasketCustomField customField, io.kadai.common.api.BaseQuery.SortDirection sortDirection) This method sorts the query result according to the value of a custom field.- Parameters:
customField
- identifies which custom attribute is affected.sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByOrgLevel1
Sort the query result by organization level 1.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByOrgLevel2
Sort the query result by organization level 2.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByOrgLevel3
Sort the query result by organization level 3.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
orderByOrgLevel4
Sort the query result by organization level 4.- Parameters:
sortDirection
- Determines whether the result is sorted in ascending or descending order. If sortDirection is null, the result is sorted in ascending order- Returns:
- the query
-
customAttributeIn
Add the values of custom attributes for exact matching to your query.- Parameters:
customField
- identifies which custom attribute is affected.searchArguments
- the customField values of the searched for tasks- Returns:
- the query
-
customAttributeLike
Add the values of custom attributes for pattern matching to your query. They will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
customField
- identifies which custom attribute is affected.searchArguments
- the customField values of the searched-for tasks- Returns:
- the query
-
orgLevel1In
Add the 1st organization level to your query.- Parameters:
orgLevels1
- the 1st organization level as String- Returns:
- the query
-
orgLevel1Like
Add the 1st organization level for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
orgLevels1
- the 1st organization level as Strings- Returns:
- the query
-
orgLevel2In
Add the 2nd organization level to your query.- Parameters:
orgLevels2
- the 2nd organization level as String- Returns:
- the query
-
orgLevel2Like
Add the 2nd organization level for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
orgLevels2
- the 2nd organization level as Strings- Returns:
- the query
-
orgLevel3In
Add the 3rd organization level to your query.- Parameters:
orgLevels3
- the 3rd organization level as String- Returns:
- the query
-
orgLevel3Like
Add the 3rd organization level for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
orgLevels3
- the 3rd organization level as Strings- Returns:
- the query
-
orgLevel4In
Add the 4th organization level to your query.- Parameters:
orgLevels4
- the 4th organization level as String- Returns:
- the query
-
orgLevel4Like
Add the 4th organization level for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR keyword.- Parameters:
orgLevels4
- the 4th organization level as Strings- Returns:
- the query
-
markedForDeletion
Add to your query if the Workbasket shall be marked for deletion.- Parameters:
markedForDeletion
- a simple flag showing if the workbasket is marked for deletion- Returns:
- the query
-