Subversion Repositories WebE

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 PointedEar 1
//$Id: CollectionOfElements.java 11282 2007-03-14 22:05:59Z epbernard $
2
package org.hibernate.annotations;
3
 
4
import static java.lang.annotation.ElementType.FIELD;
5
import static java.lang.annotation.ElementType.METHOD;
6
import java.lang.annotation.Retention;
7
import static java.lang.annotation.RetentionPolicy.RUNTIME;
8
import java.lang.annotation.Target;
9
import javax.persistence.FetchType;
10
import static javax.persistence.FetchType.LAZY;
11
 
12
/**
13
 * Annotation used to mark a collection as a collection of elements or
14
 * a collection of embedded objects
15
 *
16
 * @author Emmanuel Bernard
17
 */
18
@Target({METHOD, FIELD})
19
@Retention(RUNTIME)
20
public @interface CollectionOfElements {
21
        /**
22
         * Represent the element class in the collection
23
         * Only useful if the collection does not use generics
24
         */
25
        Class targetElement() default void.class;
26
 
27
        FetchType fetch() default LAZY;
28
}