org.apache.openjpa.jdbc.meta
Class JDBCValueOrder

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

 class JDBCValueOrder
extends Object
implements JDBCOrder

Order by value columns, which are the primary key columns in the case of a relation field.

Author:
Abe White

Field Summary
 
Fields inherited from interface org.apache.openjpa.meta.Order
ELEMENT
 
Constructor Summary
JDBCValueOrder(FieldMapping fm, 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()
          Return the name of the orderable.
 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

JDBCValueOrder

public JDBCValueOrder(FieldMapping fm,
                      boolean asc)
Method Detail

getName

public String getName()
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-2010 Apache Software Foundation. All Rights Reserved.