1 23 package javax.persistence; 24 25 import java.lang.annotation.Target ; 26 import java.lang.annotation.Retention ; 27 import javax.persistence.CascadeType; 28 import static java.lang.annotation.ElementType.FIELD ; 29 import static java.lang.annotation.ElementType.METHOD ; 30 import static java.lang.annotation.RetentionPolicy.RUNTIME ; 31 import static javax.persistence.FetchType.EAGER; 32 33 50 @Target ({METHOD, FIELD}) 51 @Retention (RUNTIME) 52 53 public @interface ManyToOne { 54 55 62 Class targetEntity() default void.class; 63 64 70 CascadeType[] cascade() default {}; 71 72 79 FetchType fetch() default EAGER; 80 81 85 boolean optional() default true; 86 } 87 | Popular Tags |