|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.commons.logging.Logger
org.nakedobjects.runtime.persistence.objectstore.NakedObjectStoreLogger
public class NakedObjectStoreLogger
| Constructor Summary | |
|---|---|
NakedObjectStoreLogger(ObjectStore decorated)
|
|
NakedObjectStoreLogger(ObjectStore decorated,
java.lang.String logFileName)
|
|
| 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()). |
protected java.lang.Class<?> |
getDecoratedClass()
|
NakedObject[] |
getInstances(PersistenceQuery criteria)
|
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 org.nakedobjects.metamodel.commons.logging.Logger |
|---|
isLogToFile, isLogToLog4j, log, log, setFileName, setLogAlso, setShowTime, setTimeFormat |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NakedObjectStoreLogger(ObjectStore decorated,
java.lang.String logFileName)
public NakedObjectStoreLogger(ObjectStore decorated)
| Method Detail |
|---|
public 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 ObjectStorePersistence
public void registerService(java.lang.String name,
Oid oid)
registerService in interface ObjectStorePersistencepublic DestroyObjectCommand createDestroyObjectCommand(NakedObject object)
ObjectStorePersistence
createDestroyObjectCommand in interface ObjectStorePersistencepublic SaveObjectCommand createSaveObjectCommand(NakedObject object)
ObjectStorePersistence
createSaveObjectCommand in interface ObjectStorePersistencepublic void debugData(DebugString debug)
debugData in interface DebugInfopublic java.lang.String debugTitle()
debugTitle in interface DebugInfoprotected java.lang.Class<?> getDecoratedClass()
getDecoratedClass in class Logger
public NakedObject[] getInstances(PersistenceQuery criteria)
throws ObjectPersistenceException,
UnsupportedFindException
getInstances in interface ObjectStorePersistenceObjectPersistenceException
UnsupportedFindException
public NakedObject getObject(Oid oid,
NakedObjectSpecification hint)
throws ObjectNotFoundException,
ObjectPersistenceException
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.
ObjectNotFoundException - when no object corresponding to the oid can be found
ObjectPersistenceExceptionpublic Oid getOidForService(java.lang.String name)
ObjectStorePersistence
getOidForService in interface ObjectStorePersistence
public boolean hasInstances(NakedObjectSpecification specification)
throws ObjectPersistenceException
hasInstances in interface ObjectStorePersistenceObjectPersistenceExceptionpublic 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 ObjectStorePersistence
public void open()
throws ConfigurationException,
InstanceCreationException,
ObjectPersistenceException
open in interface SessionScopedComponentConfigurationException
InstanceCreationException
ObjectPersistenceExceptionpublic java.lang.String name()
name in interface NamedComponentpublic void reset()
ObjectStorePersistencePersistenceSessionFactory ??
reset in interface ObjectStorePersistence
public void resolveField(NakedObject object,
NakedObjectAssociation field)
throws ObjectPersistenceException
ObjectStorePersistence
resolveField in interface ObjectStorePersistenceObjectPersistenceExceptionPersistenceSessionContainer.resolveField(NakedObject, NakedObjectAssociation)
public void resolveImmediately(NakedObject object)
throws ObjectPersistenceException
ObjectStorePersistence
resolveImmediately in interface ObjectStorePersistenceObjectPersistenceExceptionPersistenceSessionContainer.resolveImmediately(NakedObject)
public void execute(java.util.List<PersistenceCommand> commands)
throws ObjectPersistenceException
ObjectStoreTransactionManagementObjectStoreTransaction to flush changes to
the ObjectStore (either via a NakedObjectTransactionManager.flushTransaction()
or a NakedObjectTransactionManager.endTransaction()).
execute in interface ObjectStorePersistenceexecute in interface ObjectStoreTransactionManagementObjectPersistenceException
public void close()
throws ObjectPersistenceException
close in interface SessionScopedComponentclose in class LoggerObjectPersistenceExceptionpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||