br.com.arsmachina.dao
Class SortCriterion

java.lang.Object
  extended by br.com.arsmachina.dao.SortCriterion

public class SortCriterion
extends Object

Used to represent a sorting criterion (constraint) to be applied to a method that returns objects.

Author:
Thiago H. de Paula Figueiredo

Constructor Summary
SortCriterion(String property, boolean ascending)
          Single constructor of this class.
 
Method Summary
 boolean equals(Object obj)
           
 String getProperty()
           
 int hashCode()
           
 boolean isAscending()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortCriterion

public SortCriterion(String property,
                     boolean ascending)
Single constructor of this class.

Parameters:
property - a String containing the property to be used to sort the returned objects. It can be a property path. It cannot be null.
ascending - a boolean telling if the sorting will be ascending or descending.
Method Detail

getProperty

public String getProperty()
Returns:
a String.

isAscending

public boolean isAscending()
Returns:
a boolean.

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)


Copyright © 2008-2009 Thiago H. de Paula Figueiredo. All Rights Reserved.