| java.lang.Object org.apache.ojb.odmg.DatabaseImpl
bind | public void bind(Object object, String name) throws ObjectNameNotUniqueException(Code) | | Associate a name with an object and make it persistent.
An object instance may be bound to more than one name.
Binding a previously transient object to a name makes that object persistent.
Parameters: object - The object to be named. Parameters: name - The name to be given to the object. exception: org.odmg.ObjectNameNotUniqueException - If an attempt is made to bind a name to an object and that name is already boundto an object. |
close | public void close() throws ODMGException(Code) | | Close the database.
After you have closed a database, further attempts to access objects in the
database will cause the exception DatabaseClosedException to be thrown.
Some implementations may throw additional exceptions that are also derived
from ODMGException .
exception: ODMGException - Unable to close the database. |
deletePersistent | public void deletePersistent(Object object)(Code) | | Deletes an object from the database.
It must be executed in the context of an open transaction.
If the object is not persistent, then ObjectNotPersistent is thrown.
If the transaction in which this method is executed commits,
then the object is removed from the database.
If the transaction aborts,
then the deletePersistent operation is considered not to have been executed,
and the target object is again in the database.
Parameters: object - The object to delete. |
isOpen | public boolean isOpen()(Code) | | |
makePersistent | public void makePersistent(Object object)(Code) | | Make a transient object durable in the database.
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.
If the transaction aborts,
then the makePersistent operation is considered not to have been executed,
and the target object is again transient.
ClassNotPersistenceCapableException is thrown if the implementation cannot make
the object persistent because of the type of the object.
Parameters: object - The object to make persistent. throws: TransactionNotInProgressException - if there is no current transaction. |
open | public synchronized void open(String name, int accessMode) throws ODMGException(Code) | | Open the named database with the specified access mode.
Attempts to open a database when it has already been opened will result in
the throwing of the exception DatabaseOpenException .
A DatabaseNotFoundException is thrown if the database does not exist.
Some implementations may throw additional exceptions that are also derived from
ODMGException .
Parameters: name - The name of the database. Parameters: accessMode - The access mode, which should be one of the static fields:OPEN_READ_ONLY , OPEN_READ_WRITE ,or OPEN_EXCLUSIVE . exception: ODMGException - The database could not be opened. |
|
|