Class SortingImpl

  • All Implemented Interfaces:
    Sorting, Serializable, Iterable<Order>

    public class SortingImpl
    extends Object
    implements Sorting
    SortingImpl option for queries. You have to provide at least a list of properties to sort for that must not include null or empty strings. The direction defaults to Sorting.DEFAULT_DIRECTION. See Spring Data Commons, but more flat design and independent of Spring libraries.
    See Also:
    Serialized Form
    • Constructor Detail

      • SortingImpl

        public SortingImpl()
      • SortingImpl

        public SortingImpl​(Order... orders)
        Creates a new Sorting instance using the given Orders.
        Parameters:
        orders - must not be null.
      • SortingImpl

        public SortingImpl​(List<Order> orders)
        Creates a new Sorting instance.
        Parameters:
        orders - must not be null or contain null.
      • SortingImpl

        public SortingImpl​(String... properties)
        Creates a new Sorting instance. Order defaults to Direction#ASC.
        Parameters:
        properties - must not be null or contain null or empty strings
      • SortingImpl

        public SortingImpl​(Direction direction,
                           String... properties)
        Creates a new Sorting instance.
        Parameters:
        direction - defaults to Sorting.DEFAULT_DIRECTION (for null cases, too)
        properties - must not be null, empty or contain null or empty strings.
      • SortingImpl

        public SortingImpl​(Direction direction,
                           List<String> properties)
        Creates a new Sorting instance.
        Parameters:
        direction - defaults to Sorting.DEFAULT_DIRECTION (for null cases, too)
        properties - must not be null or contain null or empty strings.