|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.odmg.OzoneODMGDatabase
Implementation of the ODMG Database
interface.
Field Summary |
Fields inherited from interface org.odmg.Database |
NOT_OPEN, OPEN_EXCLUSIVE, OPEN_READ_ONLY, OPEN_READ_WRITE |
Constructor Summary | |
OzoneODMGDatabase(OzoneODMG _factory)
|
Method Summary | |
void |
bind(java.lang.Object object,
java.lang.String name)
Associate a name with an object and make it persistent. |
void |
close()
Close the database. |
boolean |
containsObject(java.lang.Object obj)
|
java.lang.Object |
createPersistent(java.lang.Class cl)
Create a new persistent instance of the given class. |
void |
deletePersistent(java.lang.Object object)
Deletes an object from the database. |
protected void |
finalize()
|
java.lang.Object |
lookup(java.lang.String name)
Lookup an object via its name. |
void |
makePersistent(java.lang.Object object)
The ozone ODMG interface does not implement this method, use createObject() instead. |
protected int |
mode()
|
void |
open(java.lang.String _url,
int _accessMode)
Open this ODMG database. |
void |
unbind(java.lang.String name)
Disassociate a name with an object |
org.ozoneDB.ExternalDatabase |
underlying()
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OzoneODMGDatabase(OzoneODMG _factory)
Method Detail |
public org.ozoneDB.ExternalDatabase underlying()
protected int mode()
public void open(java.lang.String _url, int _accessMode) throws ODMGException
open
in interface Database
_url
- URL of the database (ozonedb:remote://host:port or ozonedb:local://datadir)_accessMode
- The access mode, which should be one of the static fields:
OPEN_READ_ONLY
, OPEN_READ_WRITE
,
or OPEN_EXCLUSIVE
.
ODMGException
- The database could not be opened.public void close() throws ODMGException
Database
DatabaseClosedException
to be thrown.
Some implementations may throw additional exceptions that are also derived
from ODMGException
.
close
in interface Database
ODMGException
- Unable to close the database.protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public void makePersistent(java.lang.Object object)
ozone uses proxies to control objects inside the database. Unfortunately ODMG is perfectly not aware of this kind of architecture.
makePersistent
in interface Database
object
- The object to make persistent.public java.lang.Object createPersistent(java.lang.Class cl)
THIS METHOD IS NOT IN THE ODMG 3.0 STANDARD!
It must be executed in the context of an open transaction. If the transaction in which this method is executed commits, then the object is made durable. ClassNotPersistenceCapableException is thrown if the implementation cannot make the object persistent because of the type of the object.
createPersistent
in interface EnhDatabase
public void deletePersistent(java.lang.Object object)
Database
deletePersistent
in interface Database
object
- The object to delete.public void bind(java.lang.Object object, java.lang.String name)
Database
bind
in interface Database
object
- The object to be named.name
- The name to be given to the object.public void unbind(java.lang.String name) throws ObjectNameNotFoundException
Database
unbind
in interface Database
name
- The name of an object.
ObjectNameNotFoundException
- No object exists in the database with that name.public java.lang.Object lookup(java.lang.String name) throws ObjectNameNotFoundException
Database
lookup
in interface Database
name
- The name of an object.
ObjectNameNotFoundException
- There is no object with the specified name.ObjectNameNotFoundException
public boolean containsObject(java.lang.Object obj)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |