All Packages Class Hierarchy This Package Previous Next Index
Interface semper.archive.Database
- public interface Database
A Database defines the interface to a general database. It has methods
to fetch, store, delete, update and traverse a database.
- Version:
- $Revision 1.5 $ $Date:
- Author:
- Peter Bosch, CWI
-
Delete(String)
- Delete an entry from the database
-
Modify(String, Date, String, byte[])
- Update an entry with new data
-
ReadAttr(String)
- Search the database for key and return the attr associated with the key
-
ReadData(String)
- Search the database for key and return the data associated with the key
-
ReadDate(String)
- Search the database for key and return the data associated with the key
-
Store(String, Date, String, byte[])
- Stores a new entry in the database
-
Traverse(String, Date, Date)
- Traverse the database, returns the next key
Store
public abstract void Store(String key,
Date date,
String attr,
byte data[]) throws DatabaseException
- Stores a new entry in the database
- Parameters:
- key - Key to store
- date - Date at which the field is stored
- attr - Security attributes
- data - User defined data
- Throws: DatabaseException
- Error while updating the database
Delete
public abstract void Delete(String key) throws DatabaseException
- Delete an entry from the database
- Parameters:
- key - Key reprenting entry to delete.
- Throws: DatabaseException
- Error while updating the database
ReadDate
public abstract Date ReadDate(String key) throws DatabaseException
- Search the database for key and return the data associated with the key
- Parameters:
- key - Key reprenting entry to delete.
- Returns:
- The date stored in the entry.
- Throws: DatabaseException
- Error while updating the database
ReadAttr
public abstract String ReadAttr(String key) throws DatabaseException
- Search the database for key and return the attr associated with the key
- Parameters:
- key - Key reprenting entry to delete.
- Returns:
- The attributes stored in the entry.
- Throws: DatabaseException
- Error while updating the database
ReadData
public abstract byte[] ReadData(String key) throws DatabaseException
- Search the database for key and return the data associated with the key
- Parameters:
- key - Key reprenting entry to delete.
- Returns:
- The data stored in the entry.
- Throws: DatabaseException
- Error while updating the database
Modify
public abstract void Modify(String key,
Date date,
String attr,
byte data[]) throws DatabaseException
- Update an entry with new data
- Parameters:
- key - Key to store
- date - Date at which the field is stored
- attr - Security attributes
- data - User defined data
- Throws: DatabaseException
- Error while updating the database
Traverse
public abstract String[] Traverse(String partialKey,
Date startDate,
Date endDate) throws DatabaseException
- Traverse the database, returns the next key
- Parameters:
- partialKey - Substring of keys to match.
- Entries - before startData are not selected
- Entries - after endDate are not selected
- Returns:
- List of keys that match partialKey and are startDate <= d <= endDate
- Throws: DatabaseException
- Error while updating the database
All Packages Class Hierarchy This Package Previous Next Index