|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.lib.rop.MergedResultObjectProvider
public class MergedResultObjectProvider
A result object provider that merges multiple result object provider delegates. Support exists for maintaining ordering of the internally held results, provided that each of the individual results is itself ordered.
| Constructor Summary | |
|---|---|
MergedResultObjectProvider(ResultObjectProvider[] rops)
Constructor. |
|
MergedResultObjectProvider(ResultObjectProvider[] rops,
java.util.Comparator comp)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
absolute(int pos)
Move to the given 0-based position. |
void |
close()
Free the resources associated with this provider. |
protected java.lang.Object |
getOrderingValue(java.lang.Object val,
int idx,
ResultObjectProvider rop)
Return the value to use for ordering on the given result value. |
java.lang.Object |
getResultObject()
Instantiate the current result object. |
void |
handleCheckedException(java.lang.Exception e)
Any checked exceptions that are thrown will be passed to this method. |
boolean |
next()
Advance the input to the next position. |
void |
open()
Open the result. |
void |
reset()
Reset this provider. |
int |
size()
Return the number of items in the input, or Integer.MAX_VALUE
if the size in unknown. |
boolean |
supportsRandomAccess()
Return true if this provider supports random access. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MergedResultObjectProvider(ResultObjectProvider[] rops)
public MergedResultObjectProvider(ResultObjectProvider[] rops,
java.util.Comparator comp)
| Method Detail |
|---|
public boolean supportsRandomAccess()
ResultObjectProvider
supportsRandomAccess in interface ResultObjectProvider
public void open()
throws java.lang.Exception
ResultObjectProviderResultObjectProvider.next(), ResultObjectProvider.absolute(int), or ResultObjectProvider.size().
open in interface ResultObjectProviderjava.lang.Exception
public boolean absolute(int pos)
throws java.lang.Exception
ResultObjectProvidertrue if there is data at this position;
otherwise false. This may be invoked in place of
ResultObjectProvider.next().
absolute in interface ResultObjectProviderjava.lang.Exception
public int size()
throws java.lang.Exception
ResultObjectProviderInteger.MAX_VALUE
if the size in unknown.
size in interface ResultObjectProviderjava.lang.Exception
public void reset()
throws java.lang.Exception
ResultObjectProvider
reset in interface ResultObjectProviderjava.lang.Exception
public void close()
throws java.lang.Exception
ResultObjectProvider
close in interface ResultObjectProviderclose in interface Closeablejava.lang.Exceptionpublic void handleCheckedException(java.lang.Exception e)
ResultObjectProvider
handleCheckedException in interface ResultObjectProvider
public boolean next()
throws java.lang.Exception
ResultObjectProvidertrue if
there is more data; otherwise false.
next in interface ResultObjectProviderjava.lang.Exception
public java.lang.Object getResultObject()
throws java.lang.Exception
ResultObjectProviderResultObjectProvider.next() or ResultObjectProvider.absolute(int).
getResultObject in interface ResultObjectProviderjava.lang.Exception
protected java.lang.Object getOrderingValue(java.lang.Object val,
int idx,
ResultObjectProvider rop)
val - the result valueidx - the index of the result object provider in the array
given on construction that produced the result valuerop - the result object provider that produced the result value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||