Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: EntityResult.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.Target; |
||
6 | import java.lang.annotation.Retention; |
||
7 | import java.lang.annotation.RetentionPolicy; |
||
8 | |||
9 | /** |
||
10 | * References an entity in the SELECT clause of a SQL query. If this annotation is used, |
||
11 | * the SQL statement should select all of the columns that are mapped to the entity object. |
||
12 | * This should include foreign key columns to related entities. The results obtained when |
||
13 | * insufficient data is available are undefined. |
||
14 | * |
||
15 | * @author Emmanuel Bernard |
||
16 | */ |
||
17 | @Target({}) @Retention(RetentionPolicy.RUNTIME) |
||
18 | public @interface EntityResult { |
||
19 | /** |
||
20 | * The class of the result |
||
21 | */ |
||
22 | Class entityClass(); |
||
23 | /** |
||
24 | * Maps the columns specified in the SELECT list of the query to the properties or |
||
25 | * fields of the entity class. |
||
26 | */ |
||
27 | FieldResult[] fields() default {}; |
||
28 | /** |
||
29 | * Specifies the column name (or alias) of the column in the SELECT list that is used to |
||
30 | * determine the type of the entity instance. |
||
31 | */ |
||
32 | String discriminatorColumn() default ""; |
||
33 | } |