org.apache.openjpa.jdbc.meta
Class JDBCRelatedFieldOrder

java.lang.Object
  extended by org.apache.openjpa.jdbc.meta.JDBCRelatedFieldOrder
All Implemented Interfaces:
Serializable, JDBCOrder, Order

 class JDBCRelatedFieldOrder
extends Object
implements JDBCOrder

Use the database to order by a field in the related type.

Author:
Abe White

Field Summary
 
Fields inherited from interface org.apache.openjpa.meta.Order
ELEMENT
 
Constructor Summary
JDBCRelatedFieldOrder(FieldMapping owner, FieldMapping rel, boolean asc)
           
 
Method Summary
 Comparator<?> getComparator()
          Return a comparator for ordering by this element, or null if the ordering is done in the datastore.
 DBIdentifier getIdentifier()
           
 String getName()
          Deprecated.  
 boolean isAscending()
          Order direction.
 boolean isInRelation()
          Whether the value is a member of the field's related type, rather than columns of the field itself.
 void order(Select sel, ClassMapping elem, Joins joins)
          Order by this value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCRelatedFieldOrder

public JDBCRelatedFieldOrder(FieldMapping owner,
                             FieldMapping rel,
                             boolean asc)
Method Detail

getName

public String getName()
Deprecated. 

Description copied from interface: Order
Return the name of the orderable.

Specified by:
getName in interface Order

getIdentifier

public DBIdentifier getIdentifier()
Specified by:
getIdentifier in interface JDBCOrder

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

isInRelation

public boolean isInRelation()
Description copied from interface: JDBCOrder
Whether the value is a member of the field's related type, rather than columns of the field itself.

Specified by:
isInRelation in interface JDBCOrder

order

public void order(Select sel,
                  ClassMapping elem,
                  Joins joins)
Description copied from interface: JDBCOrder
Order by this value.

Specified by:
order in interface JDBCOrder
elem - if this value has independent mappings, the mapping we're selecting


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