org.apache.openjpa.meta
Class InMemoryRelatedFieldOrder

java.lang.Object
  extended by org.apache.openjpa.meta.InMemoryRelatedFieldOrder
All Implemented Interfaces:
Serializable, Comparator, Order

 class InMemoryRelatedFieldOrder
extends Object
implements Order, Comparator

Order by a field in the related type in memory.

Author:
Abe White

Field Summary
 
Fields inherited from interface org.apache.openjpa.meta.Order
ELEMENT
 
Constructor Summary
InMemoryRelatedFieldOrder(FieldMetaData rel, boolean asc, OpenJPAConfiguration conf)
           
 
Method Summary
 int compare(Object o1, Object o2)
           
 Comparator getComparator()
          Return a comparator for ordering by this element, or null if the ordering is done in the datastore.
 String getName()
          Return the name of the orderable.
 boolean isAscending()
          Order direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

InMemoryRelatedFieldOrder

public InMemoryRelatedFieldOrder(FieldMetaData rel,
                                 boolean asc,
                                 OpenJPAConfiguration conf)
Method Detail

getName

public String getName()
Description copied from interface: Order
Return the name of the orderable.

Specified by:
getName in interface Order

isAscending

public boolean isAscending()
Description copied from interface: Order
Order direction.

Specified by:
isAscending in interface Order

getComparator

public Comparator getComparator()
Description copied from interface: Order
Return a comparator for ordering by this element, or null if the ordering is done in the datastore.

Specified by:
getComparator in interface Order

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.