|
SolarMetric Kodo JDO 2.4.3 generated on March 27 2003 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.kodo.runtime.datacache.DataCacheStoreManager
StoreManager proxy that delegates to a data cache when possible.
| Constructor Summary | |
|---|---|
DataCacheStoreManager(StoreManager sm,
DataCache cache)
Constructor. |
|
| Method Summary | |
|---|---|
void |
begin()
Begin a data store transaction. |
void |
beginOptimistic()
Notification that an optimistic transaction has started. |
protected boolean |
canCache(StateManagerImpl sm)
Returns true if sm is eligible to be
enlisted in the cache; otherwise returns false. |
boolean |
checkVersion(StateManagerImpl sm)
Determine whether the given StateManager is the same version as the datastore version. |
void |
commit()
Commit the current data store transaction. |
Object |
copyDataStoreId(Object oid,
ClassMetaData meta)
Copy the given object id value. |
boolean |
exists(Object oid,
ClassMetaData meta)
Verify that the given instance exists in the data store. |
Collection |
flush(Collection states)
Flush the given state manager collection to the datastore, returning a collection of user exceptions encountered during flushing. |
DataCache |
getDataCache()
Return the cache in use. |
Class |
getDataStoreIdClass(ClassMetaData meta)
Return the class used by this StoreManager for datastore identity values. |
StoreManager |
getStoreManager()
Return the internal store manager. |
boolean |
initialize(StateManagerImpl sm,
com.solarmetric.kodo.runtime.JDOState state,
Object conn)
Initialize the given StateManager. |
void |
load(StateManagerImpl sm,
Object conn,
BitSet fields,
boolean setVersion)
Load the given StateManager. |
Object |
newDataStoreId(ClassMetaData meta)
Create a new unique datastore identity for the given type. |
Object |
newDataStoreId(String str,
ClassMetaData meta)
Create a new unique datastore identity for the given type from the given string. |
Extent |
newExtent(ClassMetaData meta,
boolean subclasses)
Return an extent of the given candidate class, optionally including subclasses. |
com.solarmetric.kodo.query.FilterExtensions |
newFilterExtensions()
Return a FilterExtensions implementation for use in queries. |
protected com.solarmetric.kodo.runtime.PCData |
newPCData(StateManagerImpl sm)
|
Query |
newQuery(String language,
Object template)
Return a query implementation suitable for this runtime. |
void |
rollback()
Rollback the current data store transaction. |
void |
setPersistenceManager(PersistenceManagerImpl pm)
Set a reference to the corresponding PersistenceManager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataCacheStoreManager(StoreManager sm,
DataCache cache)
sm - the store manager to delegate tocache - the cache to access for shared objects| Method Detail |
public StoreManager getStoreManager()
public DataCache getDataCache()
public void setPersistenceManager(PersistenceManagerImpl pm)
StoreManagersetPersistenceManager in interface StoreManagerpublic void beginOptimistic()
StoreManagerStoreManager.begin() method, which will still be called
when a true data store transaction should begin.beginOptimistic in interface StoreManagerpublic void begin()
StoreManagerbegin in interface StoreManagerpublic void commit()
StoreManagercommit in interface StoreManagerpublic void rollback()
StoreManagerrollback in interface StoreManager
public boolean exists(Object oid,
ClassMetaData meta)
StoreManagerexists in interface StoreManagerpublic boolean checkVersion(StateManagerImpl sm)
StoreManagercheckVersion in interface StoreManagercom.solarmetric.kodo.runtime.StoreManagersm - the instance to check
public boolean initialize(StateManagerImpl sm,
com.solarmetric.kodo.runtime.JDOState state,
Object conn)
StoreManageroid of the
StateManager will be set, and the meta field of the
StateManager will be set to the class of the instance to load, or
possibly one of its superclasses. Initialization involves first
calling the StateManagerImpl#setPersistenceCapable method with
a new instance of the correct type constructed with the
JDOImplHelper#newInstance(Class,StateManager,Object) method
(this will reset the meta field of the StateManager if
the actual type was a subclass), then possibly loading any fields if
desired. The version information for the StateManager should also be
set via the StateManagerImpl.setVersion(java.lang.Object) method. If this
method is called during a data store transaction, the instance should
be locked.initialize in interface StoreManagercom.solarmetric.kodo.runtime.StoreManagersm - the instance to initializestate - the JDO state to pass through to the state
manager's initialize methodconnection - the current connection information, or null if not
given to the calling method of the persistence
manager
public void load(StateManagerImpl sm,
Object conn,
BitSet fields,
boolean setVersion)
StoreManagerload in interface StoreManagercom.solarmetric.kodo.runtime.StoreManagersm - the instance to loadconnection - the current connection information, or null if not
given to the calling method of the persistence
managerfields - the fields to load; the field corrsponding to the
metadata field at each set bit position should
be loaded; additional fields can be loaded if
desired; attempting to load an additional field that
has been dirtied will cause the load to be ignored;
this bit set should not be modifiedsetVersion - if true, the version information should also be
loaded from the db and set in the instance via
the StateManagerImpl.setVersion(java.lang.Object) methodpublic Collection flush(Collection states)
StoreManagerStateManagerImpl.setNextVersion(java.lang.Object) method. The current version
will roll over to this next version upon successful commit.flush in interface StoreManagerpublic Class getDataStoreIdClass(ClassMetaData meta)
StoreManagergetDataStoreIdClass in interface StoreManager
public Object copyDataStoreId(Object oid,
ClassMetaData meta)
StoreManagercopyDataStoreId in interface StoreManagerpublic Object newDataStoreId(ClassMetaData meta)
StoreManagernewDataStoreId in interface StoreManager
public Object newDataStoreId(String str,
ClassMetaData meta)
StoreManagernewDataStoreId in interface StoreManager
public Extent newExtent(ClassMetaData meta,
boolean subclasses)
StoreManagernewExtent in interface StoreManager
public Query newQuery(String language,
Object template)
StoreManagernewQuery in interface StoreManagercom.solarmetric.kodo.runtime.StoreManagerthe - query language; implementations are only required to
support javax.jdo.query.JDOQLa - template query instance also from this StoreManager; this
instance may be null; if not null, the filter, variables,
parameters, imports, and candidate class should be copied from
the template to the returned Query instancepublic com.solarmetric.kodo.query.FilterExtensions newFilterExtensions()
StoreManagerreturn FilterExtensions.DefaultExtensions.newExtensions ()newFilterExtensions in interface StoreManagerprotected com.solarmetric.kodo.runtime.PCData newPCData(StateManagerImpl sm)
protected boolean canCache(StateManagerImpl sm)
true if sm is eligible to be
enlisted in the cache; otherwise returns false.
|
SolarMetric Kodo JDO 2.4.3 generated on March 27 2003 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||