org.datanucleus.store
Class AbstractPersistenceHandler

java.lang.Object
  extended by org.datanucleus.store.AbstractPersistenceHandler
All Implemented Interfaces:
StorePersistenceHandler

public abstract class AbstractPersistenceHandler
extends java.lang.Object
implements StorePersistenceHandler

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


Constructor Summary
AbstractPersistenceHandler()
           
 
Method Summary
 void batchEnd(ObjectManager om)
          Signal that a batch of operations are ending for the specified ObjectManager.
 void batchStart(ObjectManager om)
          Signal that a batch of operations are starting for the specified ObjectManager.
 java.lang.Object[] findObjects(ObjectManager om, java.lang.Object[] ids)
          Simple implementation of find of multiple objects, relaying the find for each object to
 void locateObjects(StateManager[] 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.StorePersistenceHandler
close, deleteObject, fetchObject, findObject, insertObject, locateObject, updateObject
 

Constructor Detail

AbstractPersistenceHandler

public AbstractPersistenceHandler()
Method Detail

batchEnd

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

Specified by:
batchEnd in interface StorePersistenceHandler
Parameters:
om - The object manager

batchStart

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

Specified by:
batchStart in interface StorePersistenceHandler
Parameters:
om - The object manager

locateObjects

public void locateObjects(StateManager[] 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 StorePersistenceHandler
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(ObjectManager om,
                                      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 StorePersistenceHandler
Parameters:
om - the ObjectManager which will manage the object
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.