枚举类 DissociateAction
- 所有已实现的接口:
Serializable,Comparable<DissociateAction>,Constable
Configuration for many-to-one (or one-to-one) associations directly based on foreign keys.
In the following two cases, the parent object will disassociate from the child objects:
- When the parent object is deleted (either physically or logically)
- When the user overrides the parent object using a save command, the collection of child objects in the saved data structure is specified, but does not contain some child objects that already exist in the database, the exists child objects will be deleted (either physically or logically). In this case, each child object will dissociate the grandchild objects.
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明If the deleted parent object has some child objects, throw an exception to prevent the operation.For physical deletion, if the deleted parent object has some child objects, physically delete child objects too.Do nothing.If the deleted parent object has some child objects, clear foreign key of child objects. -
方法概要
修饰符和类型方法说明static DissociateAction返回带有指定名称的该类的枚举常量。static DissociateAction[]values()返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
-
枚举常量详细资料
-
NONE
-
LAX
Do nothing.For physical deletion, if the foreign key constraint exists, `on delete cascade` is required
-
CHECK
If the deleted parent object has some child objects, throw an exception to prevent the operation. -
SET_NULL
If the deleted parent object has some child objects, clear foreign key of child objects. -
DELETE
For physical deletion, if the deleted parent object has some child objects, physically delete child objects too.
For logical deletion, if the deleted parent object has some child objects, logically delete child objects too.
Notes: If you hope the child objects should be deleted by database through "on delete cascade" option of foreign key of constraint, please don't let ORM to delete them and
LAXshould be used
-
-
方法详细资料
-
values
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同- 返回:
- 包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
-
valueOf
返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类没有带有指定名称的常量NullPointerException- 如果参数为空值
-