org.sakaiproject.entitybroker.entityprovider.search
Class Order

java.lang.Object
  extended by 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)

Field Summary
 boolean ascending
          if true then the return order is ascending, if false then return order is descending
 String property
          the name of the field (property) in the persisted object
 
Constructor Summary
Order(String property)
          a simple order for a property which is ascending
Order(String property, boolean ascending)
          define an order for a property
 
Method Summary
 boolean equals(Object obj)
           
 String getProperty()
          the name of the field (property) in the persisted object
 int hashCode()
           
 boolean isAscending()
          if true then the return order is ascending, if false then return order is descending
 void setAscending(boolean ascending)
           
 void setProperty(String property)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 object
ascending - 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)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 Sakai Project. All Rights Reserved.