java.lang.Object
com.vaadin.featurepack.data.jpacontainer.SortBy
All Implemented Interfaces:
Serializable

public final class SortBy extends Object implements Serializable
Data structure class representing a field to sort by and the direction of the sort (ascending or descending). Once created, the instances of this class are immutable.
Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)
See Also:
  • Constructor Details

    • SortBy

      public SortBy(Object propertyId, boolean ascending)
      Creates a new SortBy instance.
      Parameters:
      propertyId - the property ID to sort by (must not be null).
      ascending - true to sort ascendingly, false to sort descendingly.
  • Method Details

    • getPropertyId

      public Object getPropertyId()
      Gets the property ID to sort by.
    • isAscending

      public boolean isAscending()
      Returns true to sort ascendingly, false to sort descendingly.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object