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.METHOD ; 29 import static java.lang.annotation.ElementType.FIELD ; 30 import static java.lang.annotation.RetentionPolicy.RUNTIME ; 31 import static javax.persistence.FetchType.LAZY; 32 33 72 @Target ({METHOD, FIELD}) 73 @Retention (RUNTIME) 74 75 public @interface OneToMany { 76 77 86 Class targetEntity() default void.class; 87 88 93 CascadeType[] cascade() default {}; 94 95 103 FetchType fetch() default LAZY; 104 105 109 String mappedBy() default ""; 110 } 111 | Popular Tags |