class ROPStoreManager extends DelegatingStoreManager
PCResultObjectProvider
s.FORCE_LOAD_ALL, FORCE_LOAD_DFG, FORCE_LOAD_NONE, FORCE_LOAD_REFRESH, VERSION_DIFFERENT, VERSION_EARLIER, VERSION_LATER, VERSION_SAME
Constructor and Description |
---|
ROPStoreManager(StoreManager delegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(OpenJPAStateManager sm,
Object context)
Verify that the given instance exists in the data store; return false
if it does not.
|
boolean |
initialize(OpenJPAStateManager sm,
PCState state,
FetchConfiguration fetch,
Object context)
Initialize the given state manager.
|
boolean |
load(OpenJPAStateManager sm,
BitSet fields,
FetchConfiguration fetch,
int lockLevel,
Object context)
Load the given state manager.
|
boolean |
syncVersion(OpenJPAStateManager sm,
Object context)
Update the version information in the given state manager to the
version stored in the data store.
|
assignField, assignObjectId, beforeStateChange, begin, beginOptimistic, cancelAll, close, commit, compareVersion, copyDataStoreId, equals, executeExtent, flush, getClientConnection, getDataStoreIdSequence, getDataStoreIdType, getDelegate, getInnermostDelegate, getManagedType, getValueSequence, hashCode, isCached, loadAll, newDataStoreId, newFetchConfiguration, newQuery, releaseConnection, retainConnection, rollback, rollbackOptimistic, setContext
public ROPStoreManager(StoreManager delegate)
public boolean exists(OpenJPAStateManager sm, Object context)
StoreManager
exists
in interface StoreManager
exists
in class DelegatingStoreManager
public boolean initialize(OpenJPAStateManager sm, PCState state, FetchConfiguration fetch, Object context)
StoreManager
OpenJPAStateManager.initialize(java.lang.Class, org.apache.openjpa.kernel.PCState)
method with
a new instance of the correct type constructed with the
PCRegistry.newInstance(Class,
org.apache.openjpa.enhance.StateManager, boolean)
method
(this will reset the state manager's metadata if the actual type was a
subclass). After instance initialization, load any the fields for the
given fetch configuration that can be efficiently retrieved. If any of
the configured fields are not loaded in this method, they will be
loaded with a subsequent call to StoreManager.load(org.apache.openjpa.kernel.OpenJPAStateManager, java.util.BitSet, org.apache.openjpa.kernel.FetchConfiguration, int, java.lang.Object)
. If this method is
called during a data store transaction, the instance's database record
should be locked. Version information can be loaded if desired through
the OpenJPAStateManager.setVersion(java.lang.Object)
method.initialize
in interface StoreManager
initialize
in class DelegatingStoreManager
sm
- the instance to initializestate
- the lifecycle state to initialize the state manager withfetch
- configuration for how to load the instancecontext
- the current execution data, or null if not
given to the calling method of the brokerpublic boolean syncVersion(OpenJPAStateManager sm, Object context)
StoreManager
syncVersion
in interface StoreManager
syncVersion
in class DelegatingStoreManager
sm
- the instance to checkcontext
- the current execution data, or null if not
given to the calling method of the contextpublic boolean load(OpenJPAStateManager sm, BitSet fields, FetchConfiguration fetch, int lockLevel, Object context)
StoreManager
OpenJPAStateManager.setVersion(java.lang.Object)
method.load
in interface StoreManager
load
in class DelegatingStoreManager
sm
- the instance to loadfields
- set of fields to load; all field indexes in this
set must be loaded; this set is mutablefetch
- the fetch configuration to use when loading
related objectslockLevel
- attempt to load simple fields at this lock level;
relations should be loaded at the read lock level
of the fetch configurationcontext
- the current execution data, or null if not
given to the calling method of the brokerCopyright © 2006–2013 Apache Software Foundation. All rights reserved.