Interface Filter<T>

Type Parameters:
T -
All Superinterfaces:
Executor<T>, Limit<T>, OrderBy<T>

public interface Filter<T> extends Limit<T>, OrderBy<T>
Boolean AND and OR operation and orderBy, limit, execute operations
API:
This is a public API.
  • Method Summary

    Modifier and Type
    Method
    Description
    and()
    Combines filters with a logical AND operation.
    or()
    Combines filters with a logical OR operation.

    Methods inherited from interface ch.ivyteam.ivy.business.data.store.search.Executor

    execute

    Methods inherited from interface ch.ivyteam.ivy.business.data.store.search.Limit

    limit, limit

    Methods inherited from interface ch.ivyteam.ivy.business.data.store.search.OrderBy

    orderBy
  • Method Details

    • and

      Combines filters with a logical AND operation.

      Note, that the AND operation has a higher priority than the OR operation. Example: a OR b AND c OR d will be execute as a OR (b AND c) OR d. Use sub filters with the FieldOrSubFilter.filter(Filter) method to set parenthesis.

      Example:

       import workflow.business.data.Dossier;
      
       List<Dossier> result = ivy.repo.search(Dossier.class)
            .textField("person.firstName").containsWordPattern("A*")
            .and()
            .textField("person.firstName").containsWordPattern("Ale*")
            .execute()
            .getAll();
       

      Returns:
      fields or sub filter operations
      See Also:
      API:
      This public API is available in IvyScript and Java. It has the visibility ADVANCED.
    • or

      Combines filters with a logical OR operation.

      Note, that the OR operation has a lower priority than the AND operation. Example: a OR b AND c OR d will be execute as a OR (b AND c) OR d. Use sub filters with the FieldOrSubFilter.filter(Filter) method to set parenthesis.

      Example:

       import workflow.business.data.Dossier;
      
       List<Dossier> result = ivy.repo.search(Dossier.class)
            .textField("person.firstName").containsWordPattern("A*")
            .or()
            .textField("person.firstName").containsWordPattern("Jo*")
            .execute()
            .getAll();
       

      Returns:
      fields or sub filter operations
      See Also:
      API:
      This public API is available in IvyScript and Java. It has the visibility ADVANCED.