@Retention(value=RUNTIME)
@Target(value=ANNOTATION_TYPE)
public @interface InsertCascade
Cascade
annotation to define a cascade insert operation.Modifier and Type | Optional Element and Description |
---|---|
java.lang.Class<? extends InsertOperation> |
operation
Specifies operation to perform as a insert 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 InsertOperation> operation
InsertOperation
. Use subclass of InsertOperation
to
customize the insert 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.
This value is particularly useful when parent key is created based upon an identity column
Column.identity()
is true. Child row's parent foreign key will be set when parent is
inserted.
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.