|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.odmg.DatabaseImpl
Implementation class of the Database interface.
| Field Summary |
| Fields inherited from interface org.odmg.Database |
NOT_OPEN, OPEN_EXCLUSIVE, OPEN_READ_ONLY, OPEN_READ_WRITE |
| Constructor Summary | |
DatabaseImpl(ImplementationImpl ojb)
|
|
| 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. |
PBKey |
getPBKey()
Return the PBKey associated with this Database. |
boolean |
isOpen()
|
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 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DatabaseImpl(ImplementationImpl ojb)
| Method Detail |
public PBKey getPBKey()
PBKey associated with this Database.
public boolean isOpen()
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 Databasename - 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 DatabaseODMGException - Unable to close the database.
public void bind(java.lang.Object object,
java.lang.String name)
throws ObjectNameNotUniqueException
bind in interface Databaseobject - 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 Databasename - The name of an object.
ObjectNameNotFoundException - There is no object with the specified name.
ObjectNameNotFoundExceptionObjectNameNotFoundException
public void unbind(java.lang.String name)
throws ObjectNameNotFoundException
unbind in interface Databasename - 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 Databaseobject - The object to make persistent.
TransactionNotInProgressException - if there is no current transaction.public void deletePersistent(java.lang.Object object)
deletePersistent in interface Databaseobject - The object to delete.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||