|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sourceforge.jemm.AbstractStore
public abstract class AbstractStore
Internal base class for implementing stores.
N.b. extending classes must call setup() once their constructor initialisation is finished.
Field Summary | |
---|---|
protected ObjectDatabase |
db
|
protected LifecycleListenerImpl |
listener
|
Constructor Summary | |
---|---|
AbstractStore()
|
|
AbstractStore(boolean debug)
|
Method Summary | |
---|---|
protected abstract Database |
createUnderlyingDatabase()
|
java.lang.Object |
getRoot(java.lang.String rootName)
Return the model object set for the root named 'rootName' |
void |
initialise()
Called by the Session.setStore method to inform the Store that is should start. |
void |
setRoot(java.lang.String rootName,
java.lang.Object value)
Set the store root object with the given rootName to hold a reference to the specified model object. |
java.lang.Object |
setRootIfNull(java.lang.String rootName,
java.lang.Object value)
Set the root 'rootName' to the given value if it is not already set. |
protected void |
setup()
|
void |
shutdown()
Shutdown should be called before the JVM is exited. |
protected abstract void |
shutdownUnderlyingDatabase()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ObjectDatabase db
protected LifecycleListenerImpl listener
Constructor Detail |
---|
public AbstractStore()
public AbstractStore(boolean debug)
Method Detail |
---|
protected void setup()
protected abstract Database createUnderlyingDatabase()
protected abstract void shutdownUnderlyingDatabase()
public void initialise()
Store
initialise
in interface Store
public void shutdown()
Store
shutdown
in interface Store
public java.lang.Object getRoot(java.lang.String rootName)
Store
getRoot
in interface Store
rootName
- The name of the root to fetch.
public void setRoot(java.lang.String rootName, java.lang.Object value)
Store
setRoot
in interface Store
rootName
- The name of the root.value
- The model object to store.public java.lang.Object setRootIfNull(java.lang.String rootName, java.lang.Object value)
setRootIfNull
in interface Store
rootName
- The name of the root.value
- The value to store (must be an entity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |