## qdbm
Interface ADBM

All Known Implementing Classes:
  Curia, Depot

public interface ADBM

Abstraction for database managers compatible with DBM.

Method Summary
`void` `clearerror()` Clear the error condition on the database.
`void` `close()` Close the database connection.
`void` `delete(byte[] key)` Delete a record.
`void` `deletenum(long key)` Delete a record.
`void` `deleteobj(java.lang.Object key)` Delete a record.
`boolean` `error()` Check whether an fatal error occured or not.
`byte[]` `fetch(byte[] key)` Fetch a record.
`java.lang.Object` `fetchnum(long key)` Fetch a record.
`java.lang.Object` `fetchobj(java.lang.Object key)` Fetch a record.
`byte[]` `firstkey()` Get the first key.
`long` `firstkeynum()` Get the first key.
`java.lang.Object` `firstkeyobj()` Get the first key.
`byte[]` `nextkey()` Get the next key.
`long` `nextkeynum()` Get the next key.
`java.lang.Object` `nextkeyobj()` Get the next key.
`void` `store(byte[] key, byte[] val, boolean replace)` Store a record.
`void` `storenum(long key, java.lang.Object val, boolean replace)` Store a record.
`void` `storeobj(java.lang.Object key, java.lang.Object val, boolean replace)` Store a record.

Method Detail

### clearerror

    public void clearerror()
                    throws DBMException

  Clear the error condition on the database.

  Throws:
    `DBMException` - if an error occures.

### 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.

### deletenum

    public void deletenum(long key)
                   throws DBMException

  Delete a record.

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

### deleteobj

    public void deleteobj(java.lang.Object key)
                   throws DBMException

  Delete a record.

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

### error

    public boolean error()
                  throws DBMException

  Check whether an 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.

### fetchnum

    public java.lang.Object fetchnum(long key)
                              throws DBMException

  Fetch a record.

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

### fetchobj

    public java.lang.Object fetchobj(java.lang.Object key)
                              throws DBMException

  Fetch a record.

  Parameters:
    `key` - a serializable object of a key.
  Returns:
    an object 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.

### firstkeynum

    public long firstkeynum()
                     throws DBMException

  Get the first key.

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

### firstkeyobj

    public java.lang.Object firstkeyobj()
                                 throws DBMException

  Get the first key.

  Returns:
    an object 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.

### nextkeynum

    public long nextkeynum()
                    throws DBMException

  Get the next key.

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

### nextkeyobj

    public java.lang.Object nextkeyobj()
                                throws DBMException

  Get the next key.

  Returns:
    an object 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.

### storenum

    public void storenum(long key,
                         java.lang.Object val,
                         boolean replace)
                  throws DBMException

  Store a record.

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

### storeobj

    public void storeobj(java.lang.Object key,
                         java.lang.Object val,
                         boolean replace)
                  throws DBMException

  Store a record.

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