Package jakarta.nosql

Interface Sort


  • public interface Sort
    This element represents a required order to be used in a query, it has two attributes: -- The name - the field's name to be sorted -- The type - the way to be sorted
    See Also:
    of(String, SortType), SortType
    • Method Detail

      • getName

        String getName()
        Returns the field name
        Returns:
        the field name
      • of

        static Sort of​(String name,
                       SortType type)
        Creates a wew Sort instance to be used in a NoSQL query.
        Parameters:
        name - - the field name be used in a sort process
        type - - the way to be sorted
        Returns:
        a sort instance
        Throws:
        NullPointerException - when there are null parameters
      • asc

        static Sort asc​(String name)
        Creates a new Sort of the type SortType.ASC
        Parameters:
        name - the field name be used in a sort process
        Returns:
        a sort instance
        Throws:
        NullPointerException - when name is null
      • desc

        static Sort desc​(String name)
        Creates a new Sort of the type SortType.DESC
        Parameters:
        name - the field name be used in a sort process
        Returns:
        a sort instance
        Throws:
        NullPointerException - when name is null