Package ca.uhn.fhir.rest.api
Class SortSpec
- java.lang.Object
-
- ca.uhn.fhir.rest.api.SortSpec
-
- All Implemented Interfaces:
Serializable
public class SortSpec extends Object implements Serializable
Represents values for sorting resources returned by a server.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SortSpec()ConstructorSortSpec(String theParamName)ConstructorSortSpec(String theParamName, SortOrderEnum theOrder)ConstructorSortSpec(String theParamName, SortOrderEnum theOrder, SortSpec theChain)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortSpecgetChain()Gets the chained sort specification, ornullif none.SortOrderEnumgetOrder()Returns the sort order specified by this parameter, ornullif none is explicitly provided (which meansSortOrderEnum.ASCaccording to the FHIR specification)StringgetParamName()Returns the actual name of the search param to sort bySortSpecsetChain(SortSpec theChain)Sets the chained sort specification, ornullif none.SortSpecsetOrder(SortOrderEnum theOrder)Sets the sort order specified by this parameter, ornullif none should be explicitly defined (which meansSortOrderEnum.ASCaccording to the FHIR specification)SortSpecsetParamName(String theFieldName)Sets the actual name of the search param to sort by
-
-
-
Constructor Detail
-
SortSpec
public SortSpec()
Constructor
-
SortSpec
public SortSpec(String theParamName)
Constructor- Parameters:
theParamName- The search name to sort on. SeesetParamName(String)for more information.
-
SortSpec
public SortSpec(String theParamName, SortOrderEnum theOrder)
Constructor- Parameters:
theParamName- The search name to sort on. SeesetParamName(String)for more information.theOrder- The order, ornull. SeesetOrder(SortOrderEnum)for more information.
-
SortSpec
public SortSpec(String theParamName, SortOrderEnum theOrder, SortSpec theChain)
Constructor- Parameters:
theParamName- The search name to sort on. SeesetParamName(String)for more information.theOrder- The order, ornull. SeesetOrder(SortOrderEnum)for more information.theChain- The next sorting spec, to be applied only when this spec makes two entries equal. SeesetChain(SortSpec)for more information.
-
-
Method Detail
-
getChain
public SortSpec getChain()
Gets the chained sort specification, ornullif none. If multiple sort parameters are chained (indicating a sub-sort), the second level sort is chained via this property.
-
getParamName
public String getParamName()
Returns the actual name of the search param to sort by
-
getOrder
public SortOrderEnum getOrder()
Returns the sort order specified by this parameter, ornullif none is explicitly provided (which meansSortOrderEnum.ASCaccording to the FHIR specification)
-
setChain
public SortSpec setChain(SortSpec theChain)
Sets the chained sort specification, ornullif none. If multiple sort parameters are chained (indicating a sub-sort), the second level sort is chained via this property.
-
setParamName
public SortSpec setParamName(String theFieldName)
Sets the actual name of the search param to sort by
-
setOrder
public SortSpec setOrder(SortOrderEnum theOrder)
Sets the sort order specified by this parameter, ornullif none should be explicitly defined (which meansSortOrderEnum.ASCaccording to the FHIR specification)
-
-