Interface FieldOrSubFilter<T>
-
- Type Parameters:
T
-
- All Known Subinterfaces:
Query<T>
public interface FieldOrSubFilter<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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextFieldOperation<T>
allFields()
Filter values contained anywhere (in all fields) in the business data value object tree.BooleanFieldOperation<T>
booleanField(String fieldName)
Filter the values of the Boolean field with the given name or name path.DateTimeFieldOperation<T>
dateTimeField(String fieldName)
Filter the values of the DateTime field with the given name or name path.Filter<T>
filter(Filter<T> subFilter)
Filter using the given subFilter.FieldOrSubFilter<T>
not()
Logical NOT operation.NumberFieldOperation<T>
numberField(String fieldName)
Filter the values of the Number field with the given name or name path.TextFieldOperation<T>
textField(String fieldName)
Filter the values of the text (String) field with the given name or name path.TextFieldsOperation<T>
textFields(String... fieldNames)
Filter the values of the text (String) fields with the given names or name paths.
-
-
-
Method Detail
-
textField
TextFieldOperation<T> textField(String fieldName)
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:
textFields(String...)
,numberField(String)
,booleanField(String)
,dateTimeField(String)
,allFields()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
dateTimeField
DateTimeFieldOperation<T> dateTimeField(String fieldName)
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:
textField(String)
,numberField(String)
,booleanField(String)
,textFields(String...)
,allFields()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
numberField
NumberFieldOperation<T> numberField(String fieldName)
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:
textField(String)
,booleanField(String)
,dateTimeField(String)
,textFields(String...)
,allFields()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
booleanField
BooleanFieldOperation<T> booleanField(String fieldName)
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:
- 8.0.16
- See Also:
textField(String)
,numberField(String)
,dateTimeField(String)
,textFields(String...)
,allFields()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
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:
textField(String)
,numberField(String)
,dateTimeField(String)
,textFields(String...)
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
textFields
TextFieldsOperation<T> textFields(String... fieldNames)
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:
textField(String)
,numberField(String)
,booleanField(String)
,dateTimeField(String)
,allFields()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
filter
Filter<T> filter(Filter<T> subFilter)
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:
not()
,Filter.and()
,Filter.or()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
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:
filter(Filter)
,Filter.and()
,Filter.or()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
-