Top Description Constructors
org.springframework.dao

public Class DuplicateKeyException

extends DataIntegrityViolationException
Class Inheritance
Annotations
@SuppressWarnings:serial

Exception thrown when an attempt to insert or update data results in violation of a primary key or unique constraint. Note that this is not necessarily a purely relational concept; unique primary keys are required by most database types.

Consider handling the general DataIntegrityViolationException instead, semantically including a wider range of constraint violations.

Author
Thomas Risberg

Constructor Summary

AccessConstructor and Description
public
DuplicateKeyException(String
the detail message
msg
)

Constructor for DuplicateKeyException.

public
DuplicateKeyException(String
the detail message
msg
,
Throwable
the root cause from the data access API in use
cause
)

Constructor for DuplicateKeyException.

Constructor Detail

DuplicateKeyExceptionback to summary
public DuplicateKeyException(String msg)

Constructor for DuplicateKeyException.

Parameters
msg:String

the detail message

DuplicateKeyExceptionback to summary
public DuplicateKeyException(String msg, Throwable cause)

Constructor for DuplicateKeyException.

Parameters
msg:String

the detail message

cause:Throwable

the root cause from the data access API in use