Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api
Class SortInfo

java.lang.Object
  extended by 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
static String SORT_ASCENDING_NAME
           
static String SORT_COLUMN_NAME
           
 
Constructor Summary
SortInfo(String sortColumn, boolean sortAscending)
           
 
Method Summary
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 keys SORT_COLUMN_NAME and SORT_ASCENDING_NAME.
 boolean equals(Object obj)
           
 boolean getSortAscending()
           
 String getSortColumn()
           
 void setSortAscending(boolean sortAscending)
           
 void setSortColumn(String sortColumn)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

SortInfo

public SortInfo(String sortColumn,
                boolean sortAscending)
Parameters:
sortColumn - the column to sort by, in schema:field format
sortAscending - 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

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

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 and SORT_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 keys SORT_COLUMN_NAME and SORT_ASCENDING_NAME.

Since:
5.4.0

toString

public String toString()
Overrides:
toString in class Object

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.