@Retention(value=RUNTIME)
@Target(value={FIELD,ANNOTATION_TYPE})
public @interface DeleteCascade
Cascade
annotation to define a cascade delete operation.Modifier and Type | Optional Element and Description |
---|---|
java.lang.Class<? extends DeleteOperation> |
operation
Specifies operation to perform as a delete cascade.
|
boolean |
post
Specifies when the cascade is to occur.
|
boolean |
setForeignKeyReference
Indicates that foreign key reference should be set on target (child) rows during cascade.
|
boolean |
setForeignKeyValues
Indicates that foreign key values should be set on target (child) rows during cascade.
|
public abstract java.lang.Class<? extends DeleteOperation> operation
DeleteOperation
. Use subclass of DeleteOperation
to
customize the delete cascade.public abstract boolean post
public abstract boolean setForeignKeyValues
Cascade.foreignKeyValueFields()
,
OneToManyCascade.foreignKeyValueFields()
, or OneToOneCascade.foreignKeyValueFields()
.
Foreign key values are set prior to cascade for insert, update, delete, and save cascades. They are set after select cascades.
Default is false for delete cascade since typically foreign keys are not needed when deleting.
public abstract boolean setForeignKeyReference
Cascade.foreignKeyReferenceField()
,
OneToManyCascade.foreignKeyReferenceField()
, or OneToOneCascade.foreignKeyReferenceField()
.
Foreign key reference is set prior to cascade for insert, update, delete, and save cascades. It is set after select cascades.
Default is false for delete cascade since typically foreign keys are not needed when deleting.