Subversion Repositories WebE

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 PointedEar 1
//$Id:$
2
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
3
package javax.persistence;
4
 
5
import java.lang.annotation.Target;
6
import java.lang.annotation.Retention;
7
import static java.lang.annotation.RetentionPolicy.RUNTIME;
8
import static java.lang.annotation.ElementType.TYPE;
9
import static java.lang.annotation.ElementType.METHOD;
10
import static java.lang.annotation.ElementType.FIELD;
11
 
12
/**
13
 * This annotation is used to override a many-to-one or one-to-one mapping of property or field for
14
 * an entity relationship.
15
 * The AssociationOverride annotation may be applied to an entity that extends a mapped superclass
16
 * to override a many-to-one or one-to-one mapping defined by the mapped superclass. If the
17
 * AssociationOverride annotation is not specified, the join column is mapped the same as in
18
 * the original mapping.
19
 *
20
 * @author Emmanuel Bernard
21
 */
22
@Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
23
public @interface AssociationOverride {
24
        /**
25
         * The name of the relationship property whose mapping is being overridden if property-based
26
         * access is being used, or the name of the relationship field if field-based access is used.
27
         */
28
        String name();
29
 
30
        /**
31
         * The join column that is being mapped to the persistent attribute.
32
         */
33
        JoinColumn[] joinColumns();
34
}