Interface OrderByField<T>
- Type Parameters:
T-
- All Known Subinterfaces:
OrderByFieldOrLimit<T>
public interface OrderByField<T>
Order by field
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionOrders the result by the values stored in the field with the given name or name path.score()Orders the result by score.Orders the result by the values stored in the text field with the given name or name path.
-
Method Details
-
field
Orders the result by the values stored in the field with the given name or name path.
Use
textField(String)for text fields.Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .orderBy().field("person.age").descending() .execute() .getAll();- Parameters:
fieldName- name or name path of the field- Returns:
- order by ascending or descending operations or limit/execute operations
- See Also:
- API:
- This public API is available in Java.
-
textField
Orders the result by the values stored in the text field with the given name or name path.
Only works for string/text fields.
Special non ASCII characters are converted to its equivalent ASCII characters. E.g äöü = aou, àèë = aee
Examples:
- aa > äb > ac > Äd > ae > aee
Example:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .orderBy().textField("person.lastName").descending() .execute() .getAll();- Parameters:
fieldName- name or name path of the field- Returns:
- order by ascending or descending operations or limit/execute operations
- API:
- This public API is available in Java.
-
score
OrderByOperation<T> score()Orders the result by score. Highest score first. This is the default ordering ifQuery.score()is used.- Returns:
- order by ascending or descending operations or limit/execute operations
- Since:
- 6.5
- API:
- This public API is available in Java.
-