Package io.jmix.core

Class Sort

java.lang.Object
io.jmix.core.Sort
All Implemented Interfaces:
Serializable

public class Sort extends Object implements Serializable
Defines sorting of queries.

Based on the Sort class from Spring Data project.

See Also:
  • Field Details

    • UNSORTED

      public static final Sort UNSORTED
      Undefined sort order.
  • Constructor Details

  • Method Details

    • by

      public static Sort by(List<Sort.Order> orders)
      Creates new Sort for the given list of orders.
    • by

      public static Sort by(Sort.Order... orders)
      Creates new Sort for the given orders.
    • by

      public static Sort by(String... properties)
      Creates new Sort for the given properties with ASC direction.
    • by

      public static Sort by(Sort.Direction direction, String... properties)
      Creates new Sort for the given properties with the given direction.
    • getOrders

      public List<Sort.Order> getOrders()
      Returns unmodifiable list of orders.
    • toString

      public String toString()
      Overrides:
      toString in class Object