All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jeppeman.highlite.ForeignKey Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
package com.jeppeman.highlite;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * A field annotated with {@link ForeignKey} will have the property FOREIGN KEY written
 * to its corresponding database field.
 *
 * @author jesper
 */
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.ANNOTATION_TYPE)
public @interface ForeignKey {

    /**
     * The name of the field which this key references
     *
     * @return
     */
    String fieldReference();

    /**
     * @return
     */
    boolean cascadeOnDelete() default false;

    /**
     * @return
     */
    boolean cascadeOnUpdate() default false;

    boolean enabled() default true;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy