|
ozone API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.CurrentDatabase
A method for maintaining an implicit reference to the current database
Method Summary | |
static OzoneInterface |
get()
Returns a reference to the current database. |
static void |
register(OzoneInterface newCurrentDatabase)
Registers a new current database. |
static void |
unregister()
Unregisters the current database. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void register(OzoneInterface newCurrentDatabase)
unregister()
.
Thus, the usage should be as following:
CurrentDatabase.register(database); try { ... do something useful ... } finally { CurrentDatabase.unregister(); }
unregister()
is called.
public static void unregister()
register(org.ozoneDB.OzoneInterface)
will be the new current database.
public static OzoneInterface get() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If no current database is set.
|
ozone API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |