|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DatabaseIfc
This interface attempts to abstract the database layer so that is can support several types of persistent storss. including file, OODBMS and RDBMS. It concept of root objects is borrowed from the OODBMS to represent named objects,
A database works on PersistentObjects, which have unique object identifier. and can be inserted, updated or removed from the database. They can also be fetched if the 'id' of the particular object is known. In some instances an object can be bound to a name.Similarly, the same object can be unbound or looked by name. Unbinding an object does not remove the object from the database since it can still be located by object id.
DatabaseManagerIfc
,
PersistentCapableIfc
Method Summary | |
---|---|
void |
bind(java.lang.String name,
PersistentCapableIfc object)
Bind the specified name to an object. |
void |
close()
Close this database. |
void |
delete(PersistentCapableIfc object)
Delete the specified object form the database. |
java.util.Enumeration |
getRootNames()
Return an enumeration of all the database root names. |
void |
insert(PersistentCapableIfc object)
Insert the specified object into the database. |
boolean |
isBound(java.lang.String name)
Check if an object is already bound to the specified name |
boolean |
isOpen()
Test if the database is open |
PersistentCapableIfc |
lookup(java.lang.String name)
Lookup the object specified by name. |
void |
open()
Opens the specified database. |
void |
unbind(java.lang.String name)
Unbind the object associated with the specified name. |
void |
update(PersistentCapableIfc object)
Update the specified object form the database. |
Method Detail |
---|
void open() throws FailedToOpenDatabaseException
FailedToOpenDatabaseException
void close()
boolean isOpen()
java.util.Enumeration getRootNames()
void bind(java.lang.String name, PersistentCapableIfc object) throws ObjectNameExistsException, DatabaseIOException
name
- binding nameobject
- object to bind
ObjectNameExistsException
DatabaseIOException
void unbind(java.lang.String name) throws ObjectNameNotFoundException, DatabaseIOException
name
- binding name
ObjectNameNotFoundException
DatabaseIOException
PersistentCapableIfc lookup(java.lang.String name)
name
- lookup name
boolean isBound(java.lang.String name)
name
- lookup name
void insert(PersistentCapableIfc object) throws DatabaseIOException
object
- object to store
DatabaseIOException
void delete(PersistentCapableIfc object) throws DatabaseIOException
object
- object to delete
DatabaseIOException
void update(PersistentCapableIfc object) throws DatabaseIOException
object
- object to update
DatabaseIOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |