org.apache.jdo.store
Class StoreManagerImpl

java.lang.Object
  extended by org.apache.jdo.store.StoreManagerImpl
All Implemented Interfaces:
StoreManager

public abstract class StoreManagerImpl
extends java.lang.Object
implements StoreManager

StoreManagerImpl provides a base for fully implementing the StoreManager interface.

Author:
Dave Bristor

Field Summary
protected  boolean optimistic
          Indicates whether current transaction is optimistic or not.
 
Constructor Summary
protected StoreManagerImpl()
          Default constructor.
 
Method Summary
 void flush(java.util.Iterator it, PersistenceManagerInternal pm)
          Flushes all StateManagerInternals in the given Iterator.
 QueryResult newQueryResult(QueryResultHelper qrh)
          Returns a QueryResult instance which is then returned as the result of Query.execute(...).
protected abstract  void preFlush()
          Perform any actions required before StateManager's are flushed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jdo.store.StoreManager
copyKeyFieldsFromObjectId, createObjectId, delete, fetch, getConnector, getConnector, getExtent, getExternalObjectId, getInternalObjectId, getPCClassForOid, hasActualPCClass, insert, newObjectIdInstance, update, verifyFields
 

Field Detail

optimistic

protected boolean optimistic
Indicates whether current transaction is optimistic or not. See flush(java.util.Iterator, org.apache.jdo.pm.PersistenceManagerInternal).

Constructor Detail

StoreManagerImpl

protected StoreManagerImpl()
Default constructor.

Method Detail

preFlush

protected abstract void preFlush()
Perform any actions required before StateManager's are flushed.


flush

public void flush(java.util.Iterator it,
                  PersistenceManagerInternal pm)
Flushes all StateManagerInternals in the given Iterator. This will in turn cause invocations of insert, delete, and update on this StoreManager. Update, in particular, must be done after this flush method is invoked, so that the value of optimistic is set correctly.

Specified by:
flush in interface StoreManager
Parameters:
it - Iterator of StateManagerInternal instances to be flushed.
pm - PersistenceManagerInternal on whose behalf instances are being flushed.
See Also:
StoreManager.flush(java.util.Iterator, org.apache.jdo.pm.PersistenceManagerInternal)

newQueryResult

public QueryResult newQueryResult(QueryResultHelper qrh)
Returns a QueryResult instance which is then returned as the result of Query.execute(...). This method allows support for datastore specific query execution strategies, since each StoreManager can have its own implementation of the QueryResult interface.

Specified by:
newQueryResult in interface StoreManager
Parameters:
qrh - the helper providing the query tree, the candidates and the actual parameters.
Returns:
a datastore specific query result instance


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.