Package org.nuxeo.ecm.core.api
Class SortInfo
- java.lang.Object
-
- org.nuxeo.ecm.core.api.SortInfo
-
- All Implemented Interfaces:
Serializable
public class SortInfo extends Object implements Serializable
This class holds the details for sorting.- Author:
- George Lefter
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringSORT_ASCENDING_NAMEstatic StringSORT_COLUMN_NAMEprotected booleansortAscendingprotected StringsortColumn
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,Serializable>asMap(SortInfo sortInfo)Returns a map for given sort info, or null if sort info is null.static SortInfoasSortInfo(Map<String,Serializable> map)Returns a sort info for given map, or null if map is null or does not contain both keysSORT_COLUMN_NAMEandSORT_ASCENDING_NAME.booleanequals(Object obj)booleangetSortAscending()StringgetSortColumn()voidsetSortAscending(boolean sortAscending)voidsetSortColumn(String sortColumn)StringtoString()
-
-
-
Field Detail
-
SORT_COLUMN_NAME
public static final String SORT_COLUMN_NAME
- See Also:
- Constant Field Values
-
SORT_ASCENDING_NAME
public static final String SORT_ASCENDING_NAME
- See Also:
- Constant Field Values
-
sortColumn
protected String sortColumn
-
sortAscending
protected boolean sortAscending
-
-
Constructor Detail
-
SortInfo
public SortInfo(String sortColumn, boolean sortAscending)
- Parameters:
sortColumn- the column to sort by, in schema:field formatsortAscending- whether to sort ascending or descending
-
-
Method Detail
-
getSortAscending
public boolean getSortAscending()
-
getSortColumn
public String getSortColumn()
- Returns:
- the column to sort by, in schema:field format
-
setSortColumn
public void setSortColumn(String sortColumn)
- Since:
- 5.4.0
-
setSortAscending
public void setSortAscending(boolean sortAscending)
- Since:
- 5.4.0
-
asMap
public static Map<String,Serializable> asMap(SortInfo sortInfo)
Returns a map for given sort info, or null if sort info is null.The map keys are
SORT_COLUMN_NAMEandSORT_ASCENDING_NAME.- Since:
- 5.4.0
-
asSortInfo
public static SortInfo asSortInfo(Map<String,Serializable> map)
Returns a sort info for given map, or null if map is null or does not contain both keysSORT_COLUMN_NAMEandSORT_ASCENDING_NAME.- Since:
- 5.4.0
-
-