Top Description Methods
javax.persistence

public @Interface NamedNativeQuery

extends Annotation
Annotations
@Repeatable:NamedNativeQueries
@Target:TYPE
@Retention:RUNTIME
Imports
java.lang.annotation.Repeatable, .Target, .Retention

Specifies a named native SQL query. Query names are scoped to the persistence unit. The NamedNativeQuery annotation can be applied to an entity or mapped superclass.
Since
Java Persistence 1.0

Method Summary

Modifier and TypeMethod and Description
public QueryHint[]
hints()

Query properties and hints.

public String
name()

The name used to refer to the query with the EntityManager methods that create query objects.

public String
query()

The SQL query string.

public Class<T>
resultClass()

The class of the result.

public String
resultSetMapping()

The name of a SqlResultSetMapping, as defined in metadata.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

hintsback to summary
public QueryHint[] hints()

Query properties and hints. (May include vendor-specific query hints.)

nameback to summary
public String name()

The name used to refer to the query with the EntityManager methods that create query objects.

queryback to summary
public String query()

The SQL query string.

resultClassback to summary
public Class<T> resultClass()

The class of the result.

resultSetMappingback to summary
public String resultSetMapping()

The name of a SqlResultSetMapping, as defined in metadata.