io.ebeaninternal.server.deploy.PropertyForeignKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
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;
/**
* Construct for "No Constraint".
*/
public PropertyForeignKey() {
this.noConstraint = true;
this.noIndex = false;
this.onDelete = ConstraintMode.RESTRICT;
this.onUpdate = ConstraintMode.RESTRICT;
}
/**
* Construct for the mapping annotation.
*/
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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy