org.datanucleus.store
Class AbstractPersistenceHandler2

java.lang.Object
  extended by org.datanucleus.store.AbstractPersistenceHandler2
All Implemented Interfaces:
StorePersistenceHandler2

public abstract class AbstractPersistenceHandler2
extends java.lang.Object
implements StorePersistenceHandler2

Abstract representation of a persistence handler, to be extended by datastores own variant.


Constructor Summary
AbstractPersistenceHandler2()
           
 
Method Summary
 void batchEnd(ExecutionContext ectx)
          Signal that a batch of operations are ending for the specified ExecutionContext.
 void batchStart(ExecutionContext ectx)
          Signal that a batch of operations are starting for the specified ExecutionContext.
 java.lang.Object[] findObjects(ExecutionContext ectx, java.lang.Object[] ids)
          Simple implementation of find of multiple objects, relaying the find for each object to
 void locateObjects(ObjectProvider[] sms)
          Simple implementation of location of multiple objects, relaying the locate check for each object to
 
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.StorePersistenceHandler2
close, deleteObject, fetchObject, findObject, insertObject, locateObject, updateObject
 

Constructor Detail

AbstractPersistenceHandler2

public AbstractPersistenceHandler2()
Method Detail

batchEnd

public void batchEnd(ExecutionContext ectx)
Description copied from interface: StorePersistenceHandler2
Signal that a batch of operations are ending for the specified ExecutionContext. This is usually a batch persist, or batch delete.

Specified by:
batchEnd in interface StorePersistenceHandler2
Parameters:
ectx - The ExecutionContext

batchStart

public void batchStart(ExecutionContext ectx)
Description copied from interface: StorePersistenceHandler2
Signal that a batch of operations are starting for the specified ExecutionContext. This is usually a batch persist, or batch delete.

Specified by:
batchStart in interface StorePersistenceHandler2
Parameters:
ectx - The ExecutionContext

locateObjects

public void locateObjects(ObjectProvider[] sms)
Simple implementation of location of multiple objects, relaying the locate check for each object to
locateObject
. Should be overridden by the datastore implementation if it is possible to do bulk locates.

Specified by:
locateObjects in interface StorePersistenceHandler2
Parameters:
sms - StateManagers for the objects to locate
Throws:
NucleusObjectNotFoundException - if an object doesn't exist
NucleusDataStoreException - when an error occurs in the datastore communication

findObjects

public java.lang.Object[] findObjects(ExecutionContext ectx,
                                      java.lang.Object[] ids)
Simple implementation of find of multiple objects, relaying the find for each object to
findObject
. Should be overridden by the datastore implementation if it is possible to do bulk retrieval.

Specified by:
findObjects in interface StorePersistenceHandler2
Parameters:
ectx - The ExecutionContext
ids - identities of the object(s) to retrieve
Returns:
The persistable objects with these identities (in the same order as
ids
)
Throws:
NucleusObjectNotFoundException - if an object doesn't exist
NucleusDataStoreException - when an error occurs in the datastore communication


Copyright © 2010. All Rights Reserved.