Interface Order

  • All Known Implementing Classes:
    OrderImpl

    public interface Order
    • Method Detail

      • getDirection

        Direction getDirection()
        Returns the order the property shall be sorted for.
        Returns:
        the order the property shall be sorted for
      • getNullHandling

        NullHandling getNullHandling()
        Returns the used NullHandling hint, which can but may not be respected by the used datastore.
        Returns:
        the used NullHandling hint, which can but may not be respected by the used datastore.
      • getProperty

        String getProperty()
        Returns the property to order for.
        Returns:
        the property to order for
      • ignoreCase

        Order ignoreCase()
        Returns a new Order with case insensitive sorting enabled.
        Returns:
        a new Order with case insensitive sorting enabled
      • isAscending

        boolean isAscending()
        Returns whether sorting for this property shall be ascending.
        Returns:
        whether sorting for this property shall be ascending
      • isDescending

        boolean isDescending()
        Returns whether sorting for this property shall be descending.
        Returns:
        whether sorting for this property shall be descending
      • isIgnoreCase

        boolean isIgnoreCase()
        Returns whether or not the sort will be case sensitive.
        Returns:
        whether or not the sort will be case sensitive
      • nullsFirst

        Order nullsFirst()
        Returns a Order with NullHandling.NULLS_FIRST as null handling hint.
        Returns:
        an Order with NullHandling#NULLS_FIRST as null handling hint
      • nullsLast

        Order nullsLast()
        Returns a Order with NullHandling.NULLS_LAST as null handling hint.
        Returns:
        an Order with NullHandling#NULLS_LAST as null handling hint.
      • nullsNative

        Order nullsNative()
        Returns a Order with NullHandling.NATIVE as null handling hint.
        Returns:
        an Order with NullHandling#NATIVE as null handling hint.
      • with

        Order with​(Direction direction)
        Returns a new Order with the given Direction.
        Parameters:
        direction - given direction
        Returns:
        a new Order with the given Direction
      • with

        Order with​(NullHandling nullHandling)
        Returns a Order with the given NullHandling.
        Parameters:
        nullHandling - can be null.
        Returns:
        an Order with the given NullHandling
      • withProperties

        Sorting withProperties​(String... properties)
        Returns a new Sorting instance for the given properties.
        Parameters:
        properties - given properties
        Returns:
        a new SortingImpl for the given properties
      • withProperty

        Order withProperty​(String property)
        Returns a new Order
        Parameters:
        property - must not be null or empty.
        Returns:
        a new Order