Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 33 | PointedEar | 1 | //$Id: IdClass.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.ElementType.TYPE; |
||
| 9 | import static java.lang.annotation.RetentionPolicy.RUNTIME; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Specifies a composite primary key class that is mapped to multiple fields or properties |
||
| 13 | * of the entity. |
||
| 14 | * |
||
| 15 | * The names of the fields or properties in the primary key class and the primary key fields |
||
| 16 | * or properties of the entity must correspond and their types must be the same. |
||
| 17 | * |
||
| 18 | * @author Emmanuel Bernard |
||
| 19 | */ |
||
| 20 | @Target({TYPE}) @Retention(RUNTIME) |
||
| 21 | public @interface IdClass { |
||
| 22 | /** |
||
| 23 | * Primary key class |
||
| 24 | */ |
||
| 25 | Class value(); |
||
| 26 | } |