public class DatabaseConstraintViolationException extends RuntimeException
Modifier and Type | Field and Description |
---|---|
static int |
CHECK_VIOLATION
A Check constraint violation error code.
|
static int |
DROP_COLUMN_VIOLATION
Column can't be dropped before of an reference to it.
|
static int |
DROP_TABLE_VIOLATION
Tried to drop a table that is referenced by another source.
|
static int |
FOREIGN_KEY_VIOLATION
A Foreign Key constraint violation error code.
|
static int |
JAVA_TYPE_VIOLATION
Java type constraint violation error code (tried to insert a Java object
that wasn't derived from the java object type defined for the column).
|
static int |
NULLABLE_VIOLATION
A Nullable constraint violation error code (data added to not null
columns that was null).
|
static int |
PRIMARY_KEY_VIOLATION
A Primary Key constraint violation error code.
|
static int |
UNIQUE_VIOLATION
A Unique constraint violation error code.
|
Constructor and Description |
---|
DatabaseConstraintViolationException(int err_code,
String msg)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Returns the violation error code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int PRIMARY_KEY_VIOLATION
public static final int UNIQUE_VIOLATION
public static final int CHECK_VIOLATION
public static final int FOREIGN_KEY_VIOLATION
public static final int NULLABLE_VIOLATION
public static final int JAVA_TYPE_VIOLATION
public static final int DROP_TABLE_VIOLATION
public static final int DROP_COLUMN_VIOLATION
public DatabaseConstraintViolationException(int err_code, String msg)
Copyright © 2015. All rights reserved.