EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference

javax.persistence
Annotation Type NamedNativeQuery


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

Is used to specify a native SQL named query. Query names are scoped to the persistence unit.

Since:
Java Persistence 1.0

Required Element Summary
 java.lang.String name
          Is used to refer to the query when using the EntityManager methods that create query objects.
 java.lang.String query
          The SQL query string
 
Optional Element Summary
 QueryHint[] hints
          Vendor-specific query hints
 java.lang.Class resultClass
          The class of the result
 java.lang.String resultSetMapping
          The name of a SqlResultSetMapping, as defined in metadata
 

Element Detail

name

public abstract java.lang.String name
Is used to refer to the query when using the EntityManager methods that create query objects.


query

public abstract java.lang.String query
The SQL query string

hints

public abstract QueryHint[] hints
Vendor-specific query hints

Default:
{}

resultClass

public abstract java.lang.Class resultClass
The class of the result

Default:
void.class

resultSetMapping

public abstract java.lang.String resultSetMapping
The name of a SqlResultSetMapping, as defined in metadata

Default:
""

EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference