com.coyotegulch.jisp
Class DuplicateKey

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended bycom.coyotegulch.jisp.DatabaseException
                  extended bycom.coyotegulch.jisp.DuplicateKey
All Implemented Interfaces:
java.io.Serializable

public class DuplicateKey
extends DatabaseException

A ObjectIndex throws a DuplicateKey when a key being added to the index is identical to a key already stored there. Each concrete index class determines the circumstances under which this exception is thrown. For example, a BTreeIndex will throw DuplicateKey when a call to the insertKey method finds an existing key that matches the insertion key; however, the BTreeIndex.writeKey method does not throw an exception for a duplicate key, instead replacing the record position associated with the extant key.

See Also:
ObjectIndex, BTreeIndex, Serialized Form

Constructor Summary
DuplicateKey()
          Constructs a new DuplicateKey with null as its error message string.
DuplicateKey(java.lang.String message)
          Constructs a new DuplicateKey with message as its error message string.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DuplicateKey

public DuplicateKey()
Constructs a new DuplicateKey with null as its error message string.


DuplicateKey

public DuplicateKey(java.lang.String message)
Constructs a new DuplicateKey with message as its error message string.

Parameters:
message - Error message string.