|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.kernel.AbstractPCResultObjectProvider
public abstract class AbstractPCResultObjectProvider
Abstract implementation of PCResultObjectProvider
that implements ResultObjectProvider.getResultObject()
by assembling the necessary information about the object to be loaded.
Field Summary | |
---|---|
protected StoreContext |
ctx
The StoreContext that this result object
provider will load objects into. |
Constructor Summary | |
---|---|
AbstractPCResultObjectProvider(StoreContext ctx)
Create a new provider for loading PC objects from the input into ctx . |
Method Summary | |
---|---|
boolean |
absolute(int pos)
Override if desired. |
void |
close()
Override if desired. |
StoreContext |
getContext()
Return the context this provider was constructed with. |
protected abstract java.lang.Object |
getObjectId(ClassMetaData meta)
Implement this method to extract the object id value from the current record of the input. |
protected abstract java.lang.Class |
getPCType()
Implement this method to extract the type of the pc stored in the current record of the input. |
java.lang.Object |
getResultObject()
Instantiate the current result object. |
void |
handleCheckedException(java.lang.Exception e)
Throws a StoreException by default. |
void |
initialize(OpenJPAStateManager sm,
PCState state,
FetchConfiguration fetch)
Initializes the state manager. |
protected abstract void |
load(OpenJPAStateManager sm,
FetchConfiguration fetch)
Load data from the current input record into the given state manager. |
abstract boolean |
next()
Implement this method to advance the input. |
void |
open()
Override if desired. |
void |
reset()
Override if desired. |
int |
size()
Override if desired. |
boolean |
supportsRandomAccess()
Override if desired. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final StoreContext ctx
StoreContext
that this result object
provider will load objects into.
Constructor Detail |
---|
public AbstractPCResultObjectProvider(StoreContext ctx)
ctx
.
Method Detail |
---|
public StoreContext getContext()
public void initialize(OpenJPAStateManager sm, PCState state, FetchConfiguration fetch) throws java.lang.Exception
PCResultObjectProvider
initialize
in interface PCResultObjectProvider
java.lang.Exception
StoreManager.initialize(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.kernel.PCState, org.apache.openjpa.kernel.FetchConfiguration, java.lang.Object)
public java.lang.Object getResultObject() throws java.lang.Exception
ResultObjectProvider
ResultObjectProvider.next()
or ResultObjectProvider.absolute(int)
.
getResultObject
in interface ResultObjectProvider
java.lang.Exception
protected abstract java.lang.Object getObjectId(ClassMetaData meta) throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.Class getPCType() throws java.lang.Exception
java.lang.Exception
protected abstract void load(OpenJPAStateManager sm, FetchConfiguration fetch) throws java.lang.Exception
OpenJPAStateManager.setVersion(java.lang.Object)
to set
the optimistic versioning information, if it has any.
java.lang.Exception
public void open() throws java.lang.Exception
open
in interface ResultObjectProvider
java.lang.Exception
public boolean supportsRandomAccess()
supportsRandomAccess
in interface ResultObjectProvider
ResultObjectProvider.supportsRandomAccess()
public abstract boolean next() throws java.lang.Exception
next
in interface ResultObjectProvider
java.lang.Exception
ResultObjectProvider.next()
public boolean absolute(int pos) throws java.lang.Exception
absolute
in interface ResultObjectProvider
java.lang.Exception
ResultObjectProvider.absolute(int)
public int size() throws java.lang.Exception
Integer.MAX_VALUE
by default.
size
in interface ResultObjectProvider
java.lang.Exception
ResultObjectProvider.size()
public void reset() throws java.lang.Exception
reset
in interface ResultObjectProvider
java.lang.Exception
ResultObjectProvider.reset()
public void close() throws java.lang.Exception
close
in interface ResultObjectProvider
close
in interface Closeable
java.lang.Exception
ResultObjectProvider.close()
public void handleCheckedException(java.lang.Exception e)
StoreException
by default.
handleCheckedException
in interface ResultObjectProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |