|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ojb.odmg.DatabaseImpl
Class declaration
Field Summary |
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. |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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
name
- The name of an object.
ObjectNameNotFoundExceptionThere
- is no object with the specified name.
ObjectNameNotFoundException
ObjectNameNotFoundException
- There is no object with the specified name.ObjectNameNotFoundException
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.
TransactionNotInProgressException
- if there is no current transaction.public void deletePersistent(java.lang.Object object)
deletePersistent
in interface Database
object
- The object to delete.public NamedRootsMap getNamedRootsMap()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |