Subversion Repositories WebE

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 PointedEar 1
//$Id: $
2
package org.hibernate.annotations;
3
 
4
import java.lang.annotation.Target;
5
import java.lang.annotation.Retention;
6
import static java.lang.annotation.RetentionPolicy.RUNTIME;
7
import static java.lang.annotation.ElementType.METHOD;
8
import static java.lang.annotation.ElementType.FIELD;
9
import javax.persistence.Column;
10
 
11
/**
12
 * Describe an identifier column for a bag (ie an idbag)
13
 * EXPERIMENTAL: the structure of this annotation might slightly change (generator() mix strategy and generator
14
 *
15
 * @author Emmanuel Bernard
16
 */
17
@Target({METHOD, FIELD})
18
@Retention(RUNTIME)
19
public @interface CollectionId {
20
        /** Collection id column(s) */
21
        Column[] columns();
22
        /** id type, type.type() must be set  */
23
        Type type();
24
        /** generator name: 'identity' or a defined generator name */
25
        String generator();
26
}