Class Order
- java.lang.Object
-
- org.sakaiproject.entitybroker.entityprovider.search.Order
-
public class Order extends Object
A simple bean which defines the order to return the results of a search
Example usage:
Order ota = new Order("title"); // order by title ascending
Order otd = new Order("title", false); // order by title descending- Author:
- Aaron Zeckoski (azeckoski@gmail.com)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetProperty()the name of the field (property) in the persisted objectinthashCode()booleanisAscending()if true then the return order is ascending, if false then return order is descendingvoidsetAscending(boolean ascending)voidsetProperty(String property)StringtoString()
-
-
-
Field Detail
-
property
public String property
the name of the field (property) in the persisted object
-
ascending
public boolean ascending
if true then the return order is ascending, if false then return order is descending
-
-
Constructor Detail
-
Order
public Order(String property)
a simple order for a property which is ascending- Parameters:
property- the name of the field (property) in the persisted object
-
Order
public Order(String property, boolean ascending)
define an order for a property- Parameters:
property- the name of the field (property) in the persisted objectascending- if true then the return order is ascending, if false then return order is descending
-
-
Method Detail
-
getProperty
public String getProperty()
the name of the field (property) in the persisted object
-
setProperty
public void setProperty(String property)
-
isAscending
public boolean isAscending()
if true then the return order is ascending, if false then return order is descending
-
setAscending
public void setAscending(boolean ascending)
-
-