Top Description Fields Constructors Methods
org.hibernate.annotations

public final Enum OnDeleteAction

extends Enum<OnDeleteAction>
Class Inheritance
Static Imports
java.util.Locale.ROOT

Enumerates the possible actions for the on delete clause of a foreign key constraint. Specifies what action the database should take when deletion of a row would result in a violation of the constraint.
Author
Emmanuel Bernard
See Also
OnDelete

Field Summary

Modifier and TypeField and Description
public static final OnDeleteAction
CASCADE

Cascade deletion of the parent to the child.

public static final OnDeleteAction
NO_ACTION

No action.

public static final OnDeleteAction
RESTRICT

Prevents deletion of the parent by raising an error immediately.

public static final OnDeleteAction
SET_DEFAULT

Set the referencing foreign key to its default value.

public static final OnDeleteAction
SET_NULL

Set the referencing foreign key to null.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static OnDeleteAction
public String
public String
public static OnDeleteAction
public static OnDeleteAction[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CASCADEback to summary
public static final OnDeleteAction CASCADE

Cascade deletion of the parent to the child.

NO_ACTIONback to summary
public static final OnDeleteAction NO_ACTION

No action. The default. An error is raised if rows still reference the parent when the constraint is checked, possibly later in the transaction.

RESTRICTback to summary
public static final OnDeleteAction RESTRICT

Prevents deletion of the parent by raising an error immediately.

Since
6.2
SET_DEFAULTback to summary
public static final OnDeleteAction SET_DEFAULT

Set the referencing foreign key to its default value.

Since
6.2
SET_NULLback to summary
public static final OnDeleteAction SET_NULL

Set the referencing foreign key to null.

Since
6.2

Constructor Detail

OnDeleteActionback to summary
private OnDeleteAction()

Method Detail

fromExternalFormback to summary
public static OnDeleteAction fromExternalForm(Object value)
getAlternativeNameback to summary
public String getAlternativeName()
toSqlStringback to summary
public String toSqlString()
valueOfback to summary
public static OnDeleteAction valueOf(String name)
valuesback to summary
public static OnDeleteAction[] values()