javax.persistence
Annotation Type NamedQuery


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface NamedQuery

The NamedQuery annotation is used to specify a named query in the Java Persistence query language.

Since:
EJB 3.0 version.
Author:
Florent Benoit
See Also:
EJB 3.0 specification

Required Element Summary
 java.lang.String name
          Name refers to the query when using the EntityManager methods that create query objects.
 java.lang.String query
          Query to use.
 
Optional Element Summary
 QueryHint[] hints
          Some hints for the query.
 

Element Detail

name

public abstract java.lang.String name
Name refers to the query when using the EntityManager methods that create query objects.


query

public abstract java.lang.String query
Query to use.

hints

public abstract QueryHint[] hints
Some hints for the query.

Default:
{}