public class UniqueConstraintException extends SecondaryConstraintException
When using the base API (com.sleepycat.je), this can occur when a
SecondaryDatabase is not configured to allow duplicate keys (which
is the default, see DatabaseConfig.setSortedDuplicates(boolean)). This
implies the use of a one-to-one or one-to-many relationship.
When using the DPL (com.sleepycat.persist), this can occur when a
SecondaryKey is defined with a Relationship.ONE_TO_ONE or Relationship.ONE_TO_MANY relationship.
The Transaction handle is invalidated as a result of this
exception.
| Constructor and Description |
|---|
UniqueConstraintException(com.sleepycat.je.txn.Locker locker,
String message,
String secDbName,
DatabaseEntry secKey,
DatabaseEntry priKey)
For internal use only.
|
| Modifier and Type | Method and Description |
|---|---|
OperationFailureException |
wrapSelf(String msg)
For internal use only.
|
getPrimaryKey, getSecondaryDatabaseName, getSecondaryKeyaddErrorMessage, addRethrownStackTrace, getMessage, getVersionHeaderaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic UniqueConstraintException(com.sleepycat.je.txn.Locker locker,
String message,
String secDbName,
DatabaseEntry secKey,
DatabaseEntry priKey)
public OperationFailureException wrapSelf(String msg)
wrapSelf in class OperationFailureExceptionCopyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.