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 String
SORT_ASCENDING_NAME
static String
SORT_COLUMN_NAME
protected boolean
sortAscending
protected String
sortColumn
-
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 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_NAME
andSORT_ASCENDING_NAME
.boolean
equals(Object obj)
boolean
getSortAscending()
String
getSortColumn()
void
setSortAscending(boolean sortAscending)
void
setSortColumn(String sortColumn)
String
toString()
-
-
-
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
-
-
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_NAME
andSORT_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_NAME
andSORT_ASCENDING_NAME
.- Since:
- 5.4.0
-
-