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.
  • Method Details

    • idIn

      WorkbasketQuery idIn(String... ids)
      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

      WorkbasketQuery keyIn(String... keys)
      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

      WorkbasketQuery keyLike(String... keys)
      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

      WorkbasketQuery nameIn(String... names)
      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

      WorkbasketQuery nameLike(String... names)
      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

      WorkbasketQuery keyOrNameLike(String... searchStrings)
      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

      WorkbasketQuery domainIn(String... domains)
      Add your domains to your query.
      Parameters:
      domains - the domains as Strings
      Returns:
      the query
    • typeIn

      WorkbasketQuery typeIn(WorkbasketType... types)
      Add your types to your query.
      Parameters:
      types - the types
      Returns:
      the query
    • createdWithin

      WorkbasketQuery createdWithin(io.kadai.common.api.TimeInterval... 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

      WorkbasketQuery modifiedWithin(io.kadai.common.api.TimeInterval... 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

      WorkbasketQuery descriptionLike(String... descriptions)
      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

      WorkbasketQuery ownerIn(String... owners)
      Add the owners to your query.
      Parameters:
      owners - the owners as String
      Returns:
      the query
    • ownerLike

      WorkbasketQuery ownerLike(String... owners)
      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

      WorkbasketQuery callerHasPermissions(WorkbasketPermission... permissions)
      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

      WorkbasketQuery orderByName(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByKey(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByDescription(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByOwner(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByType(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByDomain(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery domainLike(String... domains)
      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

      WorkbasketQuery orderByOrgLevel1(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByOrgLevel2(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByOrgLevel3(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery orderByOrgLevel4(io.kadai.common.api.BaseQuery.SortDirection sortDirection)
      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

      WorkbasketQuery customAttributeIn(WorkbasketCustomField customField, String... searchArguments)
      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

      WorkbasketQuery customAttributeLike(WorkbasketCustomField customField, String... searchArguments)
      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

      WorkbasketQuery orgLevel1In(String... orgLevels1)
      Add the 1st organization level to your query.
      Parameters:
      orgLevels1 - the 1st organization level as String
      Returns:
      the query
    • orgLevel1Like

      WorkbasketQuery orgLevel1Like(String... orgLevels1)
      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

      WorkbasketQuery orgLevel2In(String... orgLevels2)
      Add the 2nd organization level to your query.
      Parameters:
      orgLevels2 - the 2nd organization level as String
      Returns:
      the query
    • orgLevel2Like

      WorkbasketQuery orgLevel2Like(String... orgLevels2)
      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

      WorkbasketQuery orgLevel3In(String... orgLevels3)
      Add the 3rd organization level to your query.
      Parameters:
      orgLevels3 - the 3rd organization level as String
      Returns:
      the query
    • orgLevel3Like

      WorkbasketQuery orgLevel3Like(String... orgLevels3)
      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

      WorkbasketQuery orgLevel4In(String... orgLevels4)
      Add the 4th organization level to your query.
      Parameters:
      orgLevels4 - the 4th organization level as String
      Returns:
      the query
    • orgLevel4Like

      WorkbasketQuery orgLevel4Like(String... orgLevels4)
      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

      WorkbasketQuery markedForDeletion(boolean 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