Interface FieldOrSubFilter<T>
- Type Parameters:
T
-
- All Known Subinterfaces:
Query<T>
Append another filter either using a text, number or date field or a sub filter or inverse a filter by using not.
Example:
import workflow.business.data.Dossier;
List<Dossier> result = ivy.repo.search(Dossier.class)
.textField("person.firstName").containsWordPattern("A*")
.and().not().textField("person.firstName").containsWordPattern("Ale*")
.execute()
.getAll();
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionFilter values contained anywhere (in all fields) in the business data value object tree.booleanField
(String fieldName) Filter the values of the Boolean field with the given name or name path.dateTimeField
(String fieldName) Filter the values of the DateTime field with the given name or name path.Filter using the given subFilter.not()
Logical NOT operation.numberField
(String fieldName) Filter the values of the Number field with the given name or name path.Filter the values of the text (String) field with the given name or name path.textFields
(String... fieldNames) Filter the values of the text (String) fields with the given names or name paths.
-
Method Details
-
textField
Filter the values of the text (String) field with the given name or name path.
The name of the field may contain
.
to provide a field name path (E.g.person.address.country
)Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .textField("person.address.country").containsAnyWords("Zug") .execute() .getAll();
- Parameters:
fieldName
- name or name path of the field- Returns:
- text field operations
- See Also:
- API:
- This public API is available in Java.
-
dateTimeField
Filter the values of the DateTime field with the given name or name path.
The name of the field may contain
.
to provide a field name path (E.g.person.address.country
)Example:
import workflow.business.data.Dossier; Date today = new Date(); List<Dossier> result = ivy.repo.search(Dossier.class) .dateTimeField("person.birthday").isEqualTo(today) .execute() .getAll();
- Parameters:
fieldName
- name or name path of the field- Returns:
- date field operations
- See Also:
- API:
- This public API is available in Java.
-
numberField
Filter the values of the Number field with the given name or name path.
The name of the field may contain
.
to provide a field name path (E.g.person.address.country
)Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .numberField("person.age").isGreaterOrEqualTo(18) .execute() .getAll();
- Parameters:
fieldName
- name or name path of the field- Returns:
- number field operations
- See Also:
- API:
- This public API is available in Java.
-
booleanField
Filter the values of the Boolean field with the given name or name path.
The name of the field may contain
.
to provide a field name path (E.g.person.address.country
)Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .booleanField("person.male").isTrue() .execute() .getAll();
- Parameters:
fieldName
- name or name path of the field- Returns:
- boolean field operations
- Since:
- 9.3
- See Also:
- API:
- This public API is available in Java.
-
allFields
TextFieldOperation<T> allFields()Filter values contained anywhere (in all fields) in the business data value object tree.
Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .allFields().containsAnyWords("Alan Euler Hungary") .execute() .getAll();
- Returns:
- text fields operations
- See Also:
- API:
- This public API is available in Java.
-
textFields
Filter the values of the text (String) fields with the given names or name paths. At least one of the fields must match the filter.
The name of a field may contain
.
to provide a field name path (E.g.person.address.country
)Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .textFields("person.firstName", "person.lastName").containsAnyWords("Alan Euler") .execute() .getAll();
- Parameters:
fieldNames
- name or name path of the field- Returns:
- text fields operations
- See Also:
- API:
- This public API is available in Java.
-
filter
Filter using the given subFilter. Use this method to build filter hierarchies and set paranthesis. E.g (a OR b) AND (c OR d)
Example (a OR b) AND (c OR d):
import ch.ivyteam.ivy.business.data.store.search.Filter; import workflow.business.data.Dossier; Filter
filter1 = ivy.repo.search(Dossier.class) .textField("person.firstName").containsAnyWords("Alan") .or() .textField("person.lastName").containsAnyWords("Euler"); Filter filter2 = ivy.repo.search(Dossier.class) .textField("person.address.city").containsAnyWords("Zug") .or() .textField("person.address.city").containsAnyWords("Luzern"); List result = ivy.repo.search(Dossier.class) .filter(filter1) .and() .filter(filter2) .execute() .getAll(); - Parameters:
subFilter
- a sub filter- Returns:
- filter, orderBy, limit, execute operations
- See Also:
- API:
- This public API is available in Java.
-
not
FieldOrSubFilter<T> not()Logical NOT operation. Inverses the result of the following filter expression
Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .not() .textField("person.firstName").containsWordPattern("A*") .execute() .getAll();
- Returns:
- field or sub filter operations
- See Also:
- API:
- This public API is available in Java.
-