mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#323 - DDL Generation support for foreign key cascade options
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package io.ebeaninternal.server.deploy;
|
||||
|
||||
import io.ebean.annotation.ConstraintMode;
|
||||
import io.ebean.annotation.DbForeignKey;
|
||||
|
||||
public class PropertyForeignKey {
|
||||
|
||||
private final boolean noIndex;
|
||||
private final boolean noConstraint;
|
||||
private final ConstraintMode onDelete;
|
||||
private final ConstraintMode onUpdate;
|
||||
|
||||
public PropertyForeignKey(DbForeignKey dbForeignKey) {
|
||||
this.noIndex = dbForeignKey.noIndex();
|
||||
this.noConstraint = dbForeignKey.noConstraint();
|
||||
this.onDelete = dbForeignKey.onDelete();
|
||||
this.onUpdate = dbForeignKey.onUpdate();
|
||||
}
|
||||
|
||||
public boolean isNoIndex() {
|
||||
return noIndex;
|
||||
}
|
||||
|
||||
public boolean isNoConstraint() {
|
||||
return noConstraint;
|
||||
}
|
||||
|
||||
public ConstraintMode getOnDelete() {
|
||||
return onDelete;
|
||||
}
|
||||
|
||||
public ConstraintMode getOnUpdate() {
|
||||
return onUpdate;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user