- java.lang.Object
-
- org.datanucleus.store.AbstractPersistenceHandler
-
- All Implemented Interfaces:
StorePersistenceHandler
public abstract class AbstractPersistenceHandler extends Object implements StorePersistenceHandler
Abstract representation of a persistence handler, to be extended by datastores own variant.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.datanucleus.store.StorePersistenceHandler
StorePersistenceHandler.PersistenceBatchType
-
-
Field Summary
Fields Modifier and Type Field Description protected StoreManager
storeMgr
-
Constructor Summary
Constructors Constructor Description AbstractPersistenceHandler(StoreManager storeMgr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertReadOnlyForUpdateOfObject(DNStateManager sm)
Convenience method to assert when this StoreManager is read-only and the specified object is attempting to be updated.Object
findObjectForUnique(ExecutionContext ec, AbstractClassMetaData cmd, String[] memberNames, Object[] values)
Method to find the object with the specified value(s) for the member(s) of the specified type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.datanucleus.store.StorePersistenceHandler
batchEnd, batchStart, close, deleteObject, deleteObjects, fetchObject, fetchObjects, findObject, findObjects, insertObject, insertObjects, locateObject, locateObjects, updateObject
-
-
-
-
Field Detail
-
storeMgr
protected StoreManager storeMgr
-
-
Constructor Detail
-
AbstractPersistenceHandler
public AbstractPersistenceHandler(StoreManager storeMgr)
-
-
Method Detail
-
findObjectForUnique
public Object findObjectForUnique(ExecutionContext ec, AbstractClassMetaData cmd, String[] memberNames, Object[] values)
Description copied from interface:StorePersistenceHandler
Method to find the object with the specified value(s) for the member(s) of the specified type.- Specified by:
findObjectForUnique
in interfaceStorePersistenceHandler
- Parameters:
ec
- ExecutionContextcmd
- Metadata for the class in questionmemberNames
- Member(s) that define the objectvalues
- Value(s) for the member(s)- Returns:
- The object with these member value(s)
-
assertReadOnlyForUpdateOfObject
public void assertReadOnlyForUpdateOfObject(DNStateManager sm)
Convenience method to assert when this StoreManager is read-only and the specified object is attempting to be updated.- Parameters:
sm
- StateManager for the object
-
-