## qdbm
Interface ADBM

All Known Implementing Classes:
  Curia, Depot, Villa

public interface ADBM

Abstraction for database managers compatible with DBM.

Method Summary
`void` `close()` Close the database connection.
`void` `delete(byte[] key)` Delete a record.
`boolean` `error()` Check whether a fatal error occured or not.
`byte[]` `fetch(byte[] key)` Fetch a record.
`byte[]` `firstkey()` Get the first key.
`byte[]` `nextkey()` Get the next key.
`void` `store(byte[] key, byte[] val, boolean replace)` Store a record.

Method Detail

### close

    public void close()
               throws DBMException

  Close the database connection.

  Throws:
    `DBMException` - if an error occures.

### delete

    public void delete(byte[] key)
                throws DBMException

  Delete a record.

  Parameters:
    `key` - a byte array of a key.
  Throws:
    `DBMException` - if an error occures or no record corresponds.

### error

    public boolean error()
                  throws DBMException

  Check whether a fatal error occured or not.

  Returns:
    true if the database has a fatal error, false if not.
  Throws:
    `DBMException` - if an error occures.

### fetch

    public byte[] fetch(byte[] key)
                 throws DBMException

  Fetch a record.

  Parameters:
    `key` - a byte array of a key.
  Returns:
    a byte array of the value of the corresponding record.
  Throws:
    `DBMException` - if an error occures or no record corresponds.

### firstkey

    public byte[] firstkey()
                    throws DBMException

  Get the first key.

  Returns:
    a byte array of the key of the first record.
  Throws:
    `DBMException` - if an error occures or no record corresponds.

### nextkey

    public byte[] nextkey()
                   throws DBMException

  Get the next key.

  Returns:
    a byte array of the key of the next record.
  Throws:
    `DBMException` - if an error occures or no record corresponds.

### store

    public void store(byte[] key,
                      byte[] val,
                      boolean replace)
               throws DBMException

  Store a record.

  Parameters:
    `key` - a byte array of a key.
    `val` - a byte array of a value.
    `replace` - whether the existing value is to be overwritten or not.
  Throws:
    `DBMException` - if an error occures or replace is cancelled.