org.apache.openjpa.kernel
Class OrderingMergedResultObjectProvider

java.lang.Object
  extended by org.apache.openjpa.lib.rop.MergedResultObjectProvider
      extended by org.apache.openjpa.kernel.OrderingMergedResultObjectProvider
All Implemented Interfaces:
ResultObjectProvider, Closeable

public class OrderingMergedResultObjectProvider
extends MergedResultObjectProvider

Merged result object provider specialization that extracts ordering values from results for comparison.

Author:
Abe White

Constructor Summary
OrderingMergedResultObjectProvider(ResultObjectProvider[] rops, boolean[] asc, StoreQuery.Executor[] execs, StoreQuery q, Object[] params)
           
OrderingMergedResultObjectProvider(ResultObjectProvider[] rops, boolean[] asc, StoreQuery.Executor exec, StoreQuery q, Object[] params)
           
 
Method Summary
protected  Object getOrderingValue(Object val, int idx, ResultObjectProvider rop)
          Return the value to use for ordering on the given result value.
 
Methods inherited from class org.apache.openjpa.lib.rop.MergedResultObjectProvider
absolute, close, getResultObject, handleCheckedException, next, open, reset, size, supportsRandomAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderingMergedResultObjectProvider

public OrderingMergedResultObjectProvider(ResultObjectProvider[] rops,
                                          boolean[] asc,
                                          StoreQuery.Executor exec,
                                          StoreQuery q,
                                          Object[] params)

OrderingMergedResultObjectProvider

public OrderingMergedResultObjectProvider(ResultObjectProvider[] rops,
                                          boolean[] asc,
                                          StoreQuery.Executor[] execs,
                                          StoreQuery q,
                                          Object[] params)
Method Detail

getOrderingValue

protected Object getOrderingValue(Object val,
                                  int idx,
                                  ResultObjectProvider rop)
Description copied from class: MergedResultObjectProvider
Return the value to use for ordering on the given result value. Returns the result value by default.

Overrides:
getOrderingValue in class MergedResultObjectProvider
Parameters:
val - the result value
idx - the index of the result object provider in the array given on construction that produced the result value
rop - the result object provider that produced the result value


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