package jef.model.annotations; import jef.model.constraints.ForeignKeyConstraint; import jef.serializable.SerializableObject; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Documented @Target({ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface ForeignKey { String getterOrField(); Class entity() default SerializableObject.class; ForeignKeyConstraint.Action onUpdate() default ForeignKeyConstraint.Action.RESTRICT; ForeignKeyConstraint.Action onDelete() default ForeignKeyConstraint.Action.CASCADE; }