|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ojb.server.DatabaseImpl
Class declaration
Fields inherited from interface org.odmg.Database |
NOT_OPEN, OPEN_EXCLUSIVE, OPEN_READ_ONLY, OPEN_READ_WRITE |
Constructor Summary | |
DatabaseImpl()
Creates new DatabaseImpl |
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. |
void |
deletePersistent(java.lang.Object object)
Deletes an object from the database. |
PersistenceBroker |
getBroker()
Insert the method's description here. |
NamedRootsMap |
getNamedRootsMap()
Insert the method's description here. |
java.lang.Object |
lookup(java.lang.String name)
Lookup an object via its name. |
void |
makePersistent(java.lang.Object object)
Make a transient object durable in the database. |
void |
open(java.lang.String name,
int accessMode)
Open the named database with the specified access mode. |
void |
unbind(java.lang.String name)
Disassociate a name with an object |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public DatabaseImpl()
Method Detail |
public void open(java.lang.String name, int accessMode) throws ODMGException
DatabaseOpenException
.
A DatabaseNotFoundException
is thrown if the database does not exist.
Some implementations may throw additional exceptions that are also derived from
ODMGException
.open
in interface Database
org.odmg.Database
name
- The name of the database.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
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.public void bind(java.lang.Object object, java.lang.String name) throws ObjectNameNotUniqueException
bind
in interface Database
object
- The object to be named.name
- The name to be given to the object.ObjectNameNotUniqueException
- If an attempt is made to bind a name to an object and that name is already bound
to an object.public java.lang.Object lookup(java.lang.String name) throws ObjectNameNotFoundException
lookup
in interface Database
public void unbind(java.lang.String name) throws ObjectNameNotFoundException
unbind
in interface Database
name
- The name of an object.ObjectNameNotFoundException
- No object exists in the database with that name.public void makePersistent(java.lang.Object object)
makePersistent
in interface Database
object
- The object to make persistent.public void deletePersistent(java.lang.Object object)
deletePersistent
in interface Database
object
- The object to delete.public NamedRootsMap getNamedRootsMap()
public PersistenceBroker getBroker()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |