org.beanfabrics.model
Class SortKey

java.lang.Object
  extended by org.beanfabrics.model.SortKey

public class SortKey
extends java.lang.Object

The SortKey describes the sort order for a field accessible by a particular Path relative to the element model.

Author:
Michael Karneim

Constructor Summary
SortKey(boolean ascending, Path sortPath)
          Creates a new SortKey for the specified Path with the specified sort direction.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 Path getSortPath()
          Returns the sort path.
 int hashCode()
          
 boolean isAscending()
          Returns true if the sort direction is ascending, false otherwise.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortKey

public SortKey(boolean ascending,
               Path sortPath)
Creates a new SortKey for the specified Path with the specified sort direction.

Parameters:
ascending - the sort direction
sortPath - the Path to the field relative to the element's root
Method Detail

getSortPath

public Path getSortPath()
Returns the sort path.

Returns:
the sort path

isAscending

public boolean isAscending()
Returns true if the sort direction is ascending, false otherwise.

Returns:
true if the sort direction is ascending, false otherwise

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object


© 2010 by Michael Karneim, http://www.beanfabrics.org