Package ubic.gemma.persistence.util
Class Sort
java.lang.Object
ubic.gemma.persistence.util.Sort
- All Implemented Interfaces:
PropertyMapping
Represents a directed sort by a property.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDirection of the sort.static enum -
Method Summary
Modifier and TypeMethodDescriptionAdd a next sort.static Sortby(String alias, String propertyName, Sort.Direction direction, Sort.NullMode nullMode) Create a sort without an original property.static Sortby(String alias, String propertyName, Sort.Direction direction, Sort.NullMode nullMode, String originalProperty) Create aSortfor a given alias, property and direction.booleanIndicate if null values should appear last when sorting.Alias in the query/criteria space, if applicable.Indicate the original property from which this sort originates.Property name in the query/criteria space.inthashCode()Render this with its original property.toString()Render this with itsPropertyMapping.getObjectAlias()andPropertyMapping.getPropertyName().
-
Method Details
-
by
public static Sort by(@Nullable String alias, String propertyName, @Nullable Sort.Direction direction, Sort.NullMode nullMode, String originalProperty) Create aSortfor a given alias, property and direction.- Parameters:
alias- an alias in the query, or null to refer to the root entity (not recommended though, since this could result in an ambiguous query)propertyName- a property of objectAlias to order bydirection- a direction, or null for defaultoriginalProperty- an original property name for rendering viatoOriginalString()
-
by
public static Sort by(@Nullable String alias, String propertyName, @Nullable Sort.Direction direction, Sort.NullMode nullMode) Create a sort without an original property.- See Also:
-
andThen
Add a next sort. -
toString
Description copied from interface:PropertyMappingRender this with itsPropertyMapping.getObjectAlias()andPropertyMapping.getPropertyName().- Specified by:
toStringin interfacePropertyMapping- Overrides:
toStringin classObject
-
toOriginalString
Description copied from interface:PropertyMappingRender this with its original property.If no original property are attached to this mapping, this method should return the same as
PropertyMapping.toString().- Specified by:
toOriginalStringin interfacePropertyMapping
-
getObjectAlias
Description copied from interface:PropertyMappingAlias in the query/criteria space, if applicable.Null implies a reference to the root alias.
- Specified by:
getObjectAliasin interfacePropertyMapping
-
getPropertyName
Description copied from interface:PropertyMappingProperty name in the query/criteria space.- Specified by:
getPropertyNamein interfacePropertyMapping
-
getDirection
-
getNullMode
Indicate if null values should appear last when sorting. -
getOriginalProperty
Indicate the original property from which this sort originates.- Specified by:
getOriginalPropertyin interfacePropertyMapping
-
getAndThen
-
equals
-
hashCode
public int hashCode()
-