Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: NamedQuery.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 | import static java.lang.annotation.RetentionPolicy.*; |
||
8 | import static java.lang.annotation.ElementType.*; |
||
9 | |||
10 | /** |
||
11 | * Is used to specify a named query in the Java Persistence query language, which is a static |
||
12 | * query expressed in metadata. Query names are scoped to the persistence unit. |
||
13 | * |
||
14 | * @author Emmanuel Bernard |
||
15 | */ |
||
16 | //TODO remove the mackage target |
||
17 | @Target({TYPE}) @Retention(RUNTIME) |
||
18 | public @interface NamedQuery { |
||
19 | /** |
||
20 | * Refers to the query when using the EntityManager methods that create query objects. |
||
21 | */ |
||
22 | String name(); |
||
23 | /** |
||
24 | * The query string in the Java Persistence query language |
||
25 | */ |
||
26 | String query(); |
||
27 | /** |
||
28 | * Vendor-specific query hints |
||
29 | */ |
||
30 | QueryHint[] hints() default {}; |
||
31 | } |