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.EAGER; 32 33 79 @Target ({METHOD, FIELD}) 80 @Retention (RUNTIME) 81 82 public @interface OneToOne { 83 84 91 Class targetEntity() default void.class; 92 93 99 CascadeType[] cascade() default {}; 100 101 108 FetchType fetch() default EAGER; 109 110 114 boolean optional() default true; 115 116 120 String mappedBy() default ""; 121 } 122 | Popular Tags |