Class SortingData
- java.lang.Object
-
- com.bellotapps.webapps_commons.persistence.repository_utils.SortingData
-
public class SortingData extends java.lang.ObjectRepresents an object that encapsulates information about sorting when performing queries to repositories.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSortingData.BuilderBuilder class for aSortingData.static classSortingData.NullHandlingEnum containing the different types of null handling strategies (i.e nulls first or nulls last).static classSortingData.PropertySortObject that encapsulates information about how to sort a given property.static classSortingData.SortDirectionEnum containing the sort directions (i.e ascending and descending).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SortingData.Builderbuilder()Creates aSortingData.Builderwhich can be used to create a newSortingDatainstance.booleanequals(java.lang.Object that)java.util.List<SortingData.PropertySort>getSortBy()inthashCode()booleanisSorted()Indicates whether there is sorting information.booleanisUnsorted()Indicates whether there is no sorting information.java.lang.StringtoString()static SortingDataunsorted()
-
-
-
Method Detail
-
unsorted
public static SortingData unsorted()
- Returns:
- An unsorted
SortingData(i.e no sorting information).
-
builder
public static SortingData.Builder builder()
Creates aSortingData.Builderwhich can be used to create a newSortingDatainstance.- Returns:
- A new
SortingData.Builder.
-
getSortBy
public java.util.List<SortingData.PropertySort> getSortBy()
- Returns:
- The list of
SortingData.PropertySorts that contain information about how the sorting should be done to each property.
-
isSorted
public boolean isSorted()
Indicates whether there is sorting information.- Returns:
trueif there is sorting information, orfalseotherwise.
-
isUnsorted
public boolean isUnsorted()
Indicates whether there is no sorting information.- Returns:
trueif there is no sorting information, orfalseotherwise.
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-