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 Detail

      • field

        OrderByOperation<T> field​(String fieldName)

        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:
        for text fields
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.
      • textField

        OrderByOperation<T> textField​(String fieldName)

        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 IvyScript and Java. It has the visibility ADVANCED.
      • score

        OrderByOperation<T> score()
        Orders the result by score. Highest score first. This is the default ordering if Query.score() is used.
        Returns:
        order by ascending or descending operations or limit/execute operations
        Since:
        6.5
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.