|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.runtime.persistence.objectstore.NakedObjectStoreDelegating
public abstract class NakedObjectStoreDelegating
Implementation that simply delegates to underlying ObjectStore.
Useful for quickly writing decorating implementations.
| Constructor Summary | |
|---|---|
NakedObjectStoreDelegating(ObjectStore underlying,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
abortTransaction()
Used by the ObjectStoreTransactionManager to tell the underlying
ObjectStore to abort a transaction. |
void |
close()
|
CreateObjectCommand |
createCreateObjectCommand(NakedObject object)
Makes a naked object persistent. |
DestroyObjectCommand |
createDestroyObjectCommand(NakedObject object)
Removes the specified object from the object store. |
SaveObjectCommand |
createSaveObjectCommand(NakedObject object)
Persists the specified object's state. |
void |
debugData(DebugString debug)
|
java.lang.String |
debugTitle()
|
void |
endTransaction()
Used by the ObjectStoreTransactionManager to tell the underlying
ObjectStore to commit a transaction. |
void |
execute(java.util.List<PersistenceCommand> commands)
Used by the current ObjectStoreTransaction to flush changes to
the ObjectStore (either via a NakedObjectTransactionManager.flushTransaction()
or a NakedObjectTransactionManager.endTransaction()). |
NakedObject[] |
getInstances(PersistenceQuery persistenceQuery)
|
NakedObject |
getObject(Oid oid,
NakedObjectSpecification hint)
Retrieves the object identified by the specified OID from the object store. |
Oid |
getOidForService(java.lang.String name)
Returns the OID for the adapted service. |
boolean |
hasInstances(NakedObjectSpecification specification)
|
boolean |
isFixturesInstalled()
Determine if the object store has been initialized with its set of start up objects. |
java.lang.String |
name()
|
void |
open()
|
void |
registerService(java.lang.String name,
Oid oid)
|
void |
reset()
TODO: move to PersistenceSessionFactory ?? |
void |
resolveField(NakedObject object,
NakedObjectAssociation field)
Called by the resolveEagerly method in NakedObjectManager. |
void |
resolveImmediately(NakedObject object)
Called by the resolveImmediately method in NakedObjectManager. |
void |
startTransaction()
Used by the ObjectStoreTransactionManager to tell the underlying
ObjectStore to start a transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NakedObjectStoreDelegating(ObjectStore underlying,
java.lang.String name)
| Method Detail |
|---|
public java.lang.String name()
name in interface NamedComponentpublic void open()
open in interface SessionScopedComponentpublic void close()
close in interface SessionScopedComponentpublic void reset()
ObjectStorePersistencePersistenceSessionFactory ??
reset in interface ObjectStorePersistencepublic boolean isFixturesInstalled()
ObjectStorePersistence
This method is called only once after the #init() has been called. If it returns false
then the framework will run the fixtures to initialise the object store.
isFixturesInstalled in interface ObjectStorePersistencepublic CreateObjectCommand createCreateObjectCommand(NakedObject object)
ObjectStorePersistencesetOid method). The object, should also be added to the cache as the object is
implicitly 'in use'.
If the object has any associations then each of these, where they aren't already persistent, should also be made persistent by recursively calling this method.
If the object to be persisted is a collection, then each element of that collection, that is not already persistent, should be made persistent by recursively calling this method.
createCreateObjectCommand in interface ObjectStorePersistencepublic DestroyObjectCommand createDestroyObjectCommand(NakedObject object)
ObjectStorePersistence
createDestroyObjectCommand in interface ObjectStorePersistencepublic SaveObjectCommand createSaveObjectCommand(NakedObject object)
ObjectStorePersistence
createSaveObjectCommand in interface ObjectStorePersistencepublic void execute(java.util.List<PersistenceCommand> commands)
ObjectStoreTransactionManagementObjectStoreTransaction to flush changes to
the ObjectStore (either via a NakedObjectTransactionManager.flushTransaction()
or a NakedObjectTransactionManager.endTransaction()).
execute in interface ObjectStorePersistenceexecute in interface ObjectStoreTransactionManagementpublic void startTransaction()
ObjectStoreTransactionManagementObjectStoreTransactionManager to tell the underlying
ObjectStore to start a transaction.
startTransaction in interface ObjectStoreTransactionManagementpublic void endTransaction()
ObjectStoreTransactionManagementObjectStoreTransactionManager to tell the underlying
ObjectStore to commit a transaction.
endTransaction in interface ObjectStoreTransactionManagementpublic void abortTransaction()
ObjectStoreTransactionManagementObjectStoreTransactionManager to tell the underlying
ObjectStore to abort a transaction.
abortTransaction in interface ObjectStoreTransactionManagement
public NakedObject getObject(Oid oid,
NakedObjectSpecification hint)
ObjectStorePersistence
Assuming that the object is not cached then the data for the object should be retreived from the
persistence mechanism and the object recreated (as describe previously). The specified OID should then
be assigned to the recreated object by calling its
If the persistence mechanism does not known of an object with the specified Oid then a
ObjectNotFoundException should be thrown.
Returns the stored NakedObject object .
getObject in interface ObjectStorePersistenceNakedObject that has the specified Oid.
public void resolveField(NakedObject object,
NakedObjectAssociation field)
ObjectStorePersistence
resolveField in interface ObjectStorePersistencePersistenceSessionContainer.resolveField(NakedObject, NakedObjectAssociation)public void resolveImmediately(NakedObject object)
ObjectStorePersistence
resolveImmediately in interface ObjectStorePersistencePersistenceSessionContainer.resolveImmediately(NakedObject)public NakedObject[] getInstances(PersistenceQuery persistenceQuery)
getInstances in interface ObjectStorePersistencepublic boolean hasInstances(NakedObjectSpecification specification)
hasInstances in interface ObjectStorePersistencepublic Oid getOidForService(java.lang.String name)
ObjectStorePersistence
getOidForService in interface ObjectStorePersistence
public void registerService(java.lang.String name,
Oid oid)
registerService in interface ObjectStorePersistencepublic void debugData(DebugString debug)
debugData in interface DebugInfopublic java.lang.String debugTitle()
debugTitle in interface DebugInfo
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||