Interface CaseQuery.IFilterableColumns

  • All Known Subinterfaces:
    CaseQuery.IFilterQuery
    All Known Implementing Classes:
    CaseQuery.FilterQuery
    Enclosing class:
    CaseQuery

    public static interface CaseQuery.IFilterableColumns
    Provides filter functionality for ICase

    Example:

    CaseQuery.businessCases().where().customVarCharField1().isEqual("Hello World").and().customDecimalField2().isGreaterThan(15.3);
    Corresponds to SQL:
    SELECT * FROM IWA_IWA_Case WHERE CustomVarCharField1 = 'Hello World' AND CustomDecimalField1 > 15.3

    API:
    This is a public API.
    • Method Detail

      • isBusinessCase

        CaseQuery.FilterLink isBusinessCase()
        Selects only cases that are business cases.

        For performance reasons you should prefer CaseQuery.businessCases() to restrict your query to business cases.

        Example:
        Get all business cases
         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.workflow.query.CaseQuery;
        
         CaseQuery query = CaseQuery.create().where().isBusinessCase();
         List<ICase> businessCases = ivy.wf.getCaseQueryExecutor().getResults(query);
         
        Returns:
        the query for further composition
        See Also:
        CaseQuery.businessCases()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • isNotBusinessCase

        CaseQuery.FilterLink isNotBusinessCase()
        Selects only cases that are not business cases (e.g. sub cases).

        For performance reasons you should prefer CaseQuery.subCases() to restrict your query to sub cases (technical cases).

        Example:
        Get all sub cases
         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.workflow.query.CaseQuery;
        
         CaseQuery query = CaseQuery.create().where().isNotBusinessCase();
         List<ICase> subCases = ivy.wf.getCaseQueryExecutor().getResults(query);
         
        Returns:
        the query for further composition
        See Also:
        CaseQuery.subCases()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • tasks

        CaseQuery.FilterLink tasks​(TaskQuery taskQuery)

        Adds an expression to the where clause that selects those cases that have at least one matching task for the given taskQuery.

        This method considers only the where clause of the given taskQuery. All other parts are ignored.

        Example:
        Get all cases that have tasks in state PARKED

         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.workflow.TaskState;
         import ch.ivyteam.ivy.workflow.query.TaskQuery;
         import ch.ivyteam.ivy.workflow.query.CaseQuery;
        
         CaseQuery query = CaseQuery.businessCases().where().tasks(TaskQuery.create().where().state().isEqual(TaskState.PARKED));
         List<ICase> casesWithParkedTasks = ivy.wf.getCaseQueryExecutor().getResults(query);
         
        Parameters:
        taskQuery - task query with where clause to filter the tasks
        Returns:
        the where query builder, for further building
        Throws:
        IllegalArgumentException - If the given taskQuery is null
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • triggeredByTasks

        CaseQuery.FilterLink triggeredByTasks​(TaskQuery taskQuery)

        Adds an expression to the where clause that selects those cases that have been created with a Trigger process element by tasks which matches the given taskQuery.

        Cases can be triggered by tasks by using the Trigger process element.

        This method considers only the where clause of the given taskQuery. All other parts are ignored.

        Example:
        Get all cases that were created by tasks with kind code "Order"

         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.workflow.TaskState;
         import ch.ivyteam.ivy.workflow.query.TaskQuery;
         import ch.ivyteam.ivy.workflow.query.CaseQuery;
        
         CaseQuery query = CaseQuery.businessCases().where().triggeredByTasks(TaskQuery.create().where().kindCode().isEqual("Order"));
         List<ICase> casesCreatedByTasksOfProcessOrder = ivy.wf.getCaseQueryExecutor().getResults(query);
         
        Parameters:
        taskQuery - task query with where clause to filter the tasks
        Returns:
        the where query builder, for further building
        Throws:
        IllegalArgumentException - If the given taskQuery is null
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • userCanWorkOn

        CaseQuery.FilterLink userCanWorkOn​(IUser user)
        Filters all cases where the user can work on at least one task.
        Parameters:
        user -
        Returns:
        the query for further composition
        Throws:
        IllegalArgumentException - If the given member is null
        Since:
        6.7
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • roleCanWorkOn

        CaseQuery.FilterLink roleCanWorkOn​(IRole role)
        Filters all cases where the role can work on at least one task.
        Parameters:
        role -
        Returns:
        the query for further composition
        Throws:
        IllegalArgumentException - If the given member is null
        Since:
        6.7
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • hasStarted

        CaseQuery.FilterLink hasStarted​(ISecurityMember member)

        Filters all cases the given security member has started. A role is considered to have started a case if the given role is allowed to start a new case at the same process start the case was started on.

        Example:

         import ch.ivyteam.ivy.workflow.query.CaseQuery;
         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.security.IUser;
         
         IUser user = ivy.wf.getSecurityContext().findUser("Somebody");
         CaseQuery query = CaseQuery.businessCases().where().hasStarted(user);
         List<ICase> casesStartedByUser = ivy.wf.getCaseQueryExecutor().getResults(query);
        Parameters:
        member -
        Returns:
        the query for further composition
        Throws:
        IllegalArgumentException - If the given member is null
        See Also:
        currentUserHasStarted(), hasStarted(String, String)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • hasStarted

        CaseQuery.FilterLink hasStarted​(String memberName,
                                        String applicationName)
        Filters all cases where the security member with given member name (user or role) in the given application has started.

        Compared to the method hasStarted(ISecurityMember), this method evaluates the corresponding ISecurityMember on query execution.

        Get all tasks where the current user or the user 'Joe' has started:

         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.workflow.query.CaseQuery;
         
         CaseQuery query = CaseQuery.businessCases()
           .where().hasStarted("#Joe", "MyApp") // note: to convert a user name to a member name a '#' is added as prefix
              .or().hasStarted(ivy.session.getSessionUser().getMemberName(), "MyApp");
         
         List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query);
         
        Parameters:
        memberName - e.g. a role "TopManagementRole", e.g. a user must be prefixed with # "#Joe"
        applicationName - e.g. "MyApplication"
        Returns:
        the query for further composition
        See Also:
        currentUserHasStarted(), hasStarted(ch.ivyteam.ivy.security.ISecurityMember)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • currentUserHasStarted

        CaseQuery.FilterLink currentUserHasStarted()

        Filters all cases the user of the current session has started.

        Example:

         import ch.ivyteam.ivy.workflow.query.CaseQuery;
         import ch.ivyteam.ivy.workflow.ICase;
         
         CaseQuery query = CaseQuery.businessCases().where().currentUserHasStarted();
         List<ICase> casesStartedByUser = ivy.wf.getCaseQueryExecutor().getResults(query);
        Returns:
        the query for further composition
        Throws:
        IllegalStateException - If there is no current session available
        See Also:
        hasStarted(ch.ivyteam.ivy.security.ISecurityMember), hasStarted(String, String)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • isOwner

        CaseQuery.FilterLink isOwner​(String memberName,
                                     String applicationName)

        Filters all cases the member of the application is owner of.

        Example:

         import ch.ivyteam.ivy.workflow.query.CaseQuery;
         import ch.ivyteam.ivy.workflow.ICase;
         
         CaseQuery query = CaseQuery.businessCases().where().isOwner("#Joe", "myApplication"); // note: to convert a user name to a member name a '#' is added as prefix
         List<ICase> casesCurrentUserIsOwnerOf = ivy.wf.getCaseQueryExecutor().getResults(query);
        Parameters:
        memberName - e.g. a role "TopManagementRole", e.g. a user must be prefixed with # "#Joe"
        applicationName - e.g. "MyApplication"
        Returns:
        the query for further composition
        See Also:
        ICase.setOwner(ch.ivyteam.ivy.security.ISecurityMember), ICase.getOwner(), isOwner(ch.ivyteam.ivy.security.ISecurityMember), currentUserIsOwner()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • customField

        CaseQuery.ICustomFieldFilterQuery customField()
        Prepares a where statement for a custom field.
        Must be followed by a call to a field value type.

        Example:

         import ch.ivyteam.ivy.workflow.ICase;
         import ch.ivyteam.ivy.workflow.query.CaseQuery;
        
         CaseQuery query = CaseQuery.businessCases().where().customField().stringField("myCustomField").isEqualTo("valueToFind")";
         List<ICase> casesWithMatchingField = ivy.wf.getCaseQueryExecutor().getResults(query);
        Returns:
        the query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • additionalProperty

        @Deprecated
        CaseQuery.IStringColumnFilterQuery additionalProperty​(String key)
        Deprecated.
        Prepares a where statement for an additional property value.
        Must be followed by a call to a condition method.
        Parameters:
        key - the additional property key
        Returns:
        the query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • not

        CaseQuery.FilterQuery not​(CaseQuery otherQuery)

        Adds a condition, which negates a set of where conditions given by the otherQuery with a NOT expression.
        Only the where clause of the given otherQuery is considered. All other parts are ignored.

        SQL part: NOT([otherSqlExpression])

        Example:

        CaseQuery subQuery = CaseQuery.businessCases().where()
              .customVarCharField1().equals("a").or()
              .customVarCharField2().equals("b")
        CaseQuery query = CaseQuery.businessCases().where()
              .not(subQuery)
        Corresponds to SQL:
        SELECT * FROM IWA_IWA_Case
          WHERE NOT(
            customVarCharField1 = 'a'
            OR customVarCharField2 = 'b')

        Parameters:
        otherQuery - Query from which the negated where part will be added to the current query.
        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • caseId

        CaseQuery.IIntegerColumnFilterQuery caseId()

        Prepares a where statement for the column CaseId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • businessCaseId

        CaseQuery.IIntegerColumnFilterQuery businessCaseId()

        Prepares a where statement for the column BusinessCaseId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • applicationId

        CaseQuery.IIntegerColumnFilterQuery applicationId()

        Prepares a where statement for the column ApplicationId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • processModelId

        CaseQuery.IIntegerColumnFilterQuery processModelId()

        Prepares a where statement for the column ProcessModelId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • taskStartId

        CaseQuery.IIntegerColumnFilterQuery taskStartId()

        Prepares a where statement for the column TaskStartId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • creatorUserId

        CaseQuery.IIntegerColumnFilterQuery creatorUserId()

        Prepares a where statement for the column CreatorUserId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • creatorUserName

        CaseQuery.IStringColumnFilterQuery creatorUserName()

        Prepares a where statement for the column CreatorUserName.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • creatorUserDisplayName

        CaseQuery.IStringColumnFilterQuery creatorUserDisplayName()

        Prepares a where statement for the column CreatorUserDisplayName.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • creatorTaskId

        CaseQuery.IIntegerColumnFilterQuery creatorTaskId()

        Prepares a where statement for the column CreatorTaskId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • environmentId

        CaseQuery.IIntegerColumnFilterQuery environmentId()

        Prepares a where statement for the column EnvironmentId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • displayNameTemplate

        CaseQuery.IStringColumnFilterQuery displayNameTemplate()

        Prepares a where statement for the column DisplayNameTemplate.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • name

        CaseQuery.IStringColumnFilterQuery name()

        Prepares a where statement for the column Name.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • displayDescriptionTemplate

        CaseQuery.IClobColumnFilterQuery displayDescriptionTemplate()

        Prepares a where statement for the column DisplayDescriptionTemplate.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • description

        CaseQuery.IClobColumnFilterQuery description()

        Prepares a where statement for the column Description.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • startTimestamp

        CaseQuery.IDateColumnFilterQuery startTimestamp()

        Prepares a where statement for the column StartTimestamp.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • endTimestamp

        CaseQuery.IDateColumnFilterQuery endTimestamp()

        Prepares a where statement for the column EndTimestamp.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • businessCalendar

        CaseQuery.IStringColumnFilterQuery businessCalendar()

        Prepares a where statement for the column BusinessCalendar.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • workingTime

        CaseQuery.INumberColumnFilterQuery workingTime()

        Prepares a where statement for the column WorkingTime.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • businessRuntime

        CaseQuery.INumberColumnFilterQuery businessRuntime()

        Prepares a where statement for the column BusinessRuntime.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • state

        CaseQuery.ICaseStateFilterQuery state()

        Prepares a where statement for the column State.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • priority

        CaseQuery.IWorkflowPriorityFilterQuery priority()

        Prepares a where statement for the column Priority.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • stage

        CaseQuery.IStringColumnFilterQuery stage()

        Prepares a where statement for the column Stage.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • ownerRoleId

        CaseQuery.IIntegerColumnFilterQuery ownerRoleId()

        Prepares a where statement for the column OwnerRoleId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • ownerUserId

        CaseQuery.IIntegerColumnFilterQuery ownerUserId()

        Prepares a where statement for the column OwnerUserId.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • ownerName

        CaseQuery.IStringColumnFilterQuery ownerName()

        Prepares a where statement for the column OwnerName.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • category

        CaseQuery.IStringColumnFilterQuery category()

        Prepares a where statement for the column Category.
        Must be followed by a call to a condition method.

        Returns:
        query for further composition
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.