|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.util.persist.PersistentDB
public class PersistentDB
PersistentDB.java
Provide standard method calls for maintaining the SleepCat database
| Constructor Summary | |
|---|---|
PersistentDB(java.lang.String dbName,
com.sleepycat.je.Database db,
com.sleepycat.bind.EntryBinding valBinder)
Creates a new instance of PersistentDB |
|
| Method Summary | |
|---|---|
void |
close()
Close the database |
java.lang.Object |
get(PersistentKey pkey)
Get the first (or unique) data entry found for key |
java.lang.String |
getDatabaseName()
Return the database name |
java.lang.Object[] |
getDuplicates(PersistentKey pkey)
Use the database cursor to obtain all values corresponding to a key |
com.sleepycat.bind.EntryBinding |
getObjectBinding()
Return reference to the object binder |
java.util.Iterator |
iterator()
Return an iterator of the entry set |
void |
put(PersistentKey pkey,
java.lang.Object value)
Place a data object into db |
void |
remove(PersistentKey pkey)
Remove a single record identified by a common key from the database |
void |
removeAll()
Clear database content |
void |
removeDuplicates(PersistentKey pkey)
Remove all entries associated to a key from the database |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentDB(java.lang.String dbName,
com.sleepycat.je.Database db,
com.sleepycat.bind.EntryBinding valBinder)
db - the persistent db objectvalueCls - the base class of the value object| Method Detail |
|---|
public java.lang.String getDatabaseName()
public com.sleepycat.bind.EntryBinding getObjectBinding()
public void put(PersistentKey pkey,
java.lang.Object value)
put in interface PersistentHandlerpublic java.lang.Object get(PersistentKey pkey)
get in interface PersistentHandlerpublic java.lang.Object[] getDuplicates(PersistentKey pkey)
getDuplicates in interface DuplicatePersistentHandlerkey - the key object
public void removeDuplicates(PersistentKey pkey)
removeDuplicates in interface DuplicatePersistentHandlerpublic void remove(PersistentKey pkey)
remove in interface PersistentHandlerpublic java.util.Iterator iterator()
iterator in interface PersistentHandlerpublic void removeAll()
removeAll in interface PersistentHandlerpublic void close()
close in interface PersistentHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||