Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: AttributeOverride.java 11282 2007-03-14 22:05:59Z epbernard $ |
2 | //EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc. |
||
3 | package javax.persistence; |
||
4 | |||
5 | import java.lang.annotation.Retention; |
||
6 | import java.lang.annotation.Target; |
||
7 | |||
8 | import static java.lang.annotation.RetentionPolicy.*; |
||
9 | import static java.lang.annotation.ElementType.*; |
||
10 | |||
11 | |||
12 | /** |
||
13 | * The AttributeOverride annotation is used to override the mapping of a Basic (whether explicit |
||
14 | * or default) property or field or Id property or field. |
||
15 | * |
||
16 | * The AttributeOverride annotation may be applied to an entity that extends a mapped superclass |
||
17 | * or to an embedded field or property to override a basic mapping defined by the mapped superclass |
||
18 | * or embeddable class. If the AttributeOverride annotation is not specified, the column is mapped |
||
19 | * the same as in the original mapping. |
||
20 | * |
||
21 | * @author Emmanuel Bernard |
||
22 | */ |
||
23 | @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) |
||
24 | public @interface AttributeOverride { |
||
25 | /** |
||
26 | * The name of the property whose mapping is being overridden if property-based access is being |
||
27 | * used, or the name of the field if field-based access is used. |
||
28 | */ |
||
29 | String name(); |
||
30 | /** |
||
31 | * The column that is being mapped to the persistent attribute |
||
32 | */ |
||
33 | Column column(); |
||
34 | } |