org.mycore.services.fieldquery
Class MCRSortBy

java.lang.Object
  extended by org.mycore.services.fieldquery.MCRSortBy

public class MCRSortBy
extends Object

Represents a single sort criteria for sorting query results. Each MCRSortBy defines one field to sort by, and the order (ascending or descending).

Author:
Frank Lützenkirchen

Field Summary
static boolean ASCENDING
          Sort this field in ascending order
static boolean DESCENDING
          Sort this field in descending order
 
Constructor Summary
MCRSortBy(MCRFieldDef field, boolean order)
          Creates a new sort criteria
 
Method Summary
 MCRFieldDef getField()
          Returns the field to sort by
 boolean getSortOrder()
          Returns the sort order for this field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final boolean ASCENDING
Sort this field in ascending order

See Also:
Constant Field Values

DESCENDING

public static final boolean DESCENDING
Sort this field in descending order

See Also:
Constant Field Values
Constructor Detail

MCRSortBy

public MCRSortBy(MCRFieldDef field,
                 boolean order)
Creates a new sort criteria

Parameters:
field - the field to sort by
order - the sort order (ascending or descending)
See Also:
ASCENDING, DESCENDING
Method Detail

getField

public MCRFieldDef getField()
Returns the field to sort by


getSortOrder

public boolean getSortOrder()
Returns the sort order for this field.

See Also:
ASCENDING, DESCENDING