8.12.35 @NamedQuery
- Organization of this subsection
(1) Description
This annotation specifies a named query of JPQL. This annotation can be applied to an entity class and mapped superclass.
The applicable target is class.
(2) Element
The following table lists the elements of @NamedQuery:
|
Element name |
Optional/Required |
Element description |
|---|---|---|
|
Required |
This element specifies the name of the named query. |
|
|
Required |
This element specifies the query string of JPQL. |
|
|
Optional |
This element specifies an array of @QueryHint. |
The details of attributes that are supported with Cosminexus JPA provider are as follows:
(a) name element
- Type
-
String
- Description
-
This element specifies the name of the named query.
The value that can be specified is a character string.
- Default value
-
None
(b) query element
- Type
-
String
- Description
-
This element specifies the query string of JPQL.
The value that can be specified depends on the specifications of JPQL.
- Default value
-
None
(c) hints element
- Type
-
QueryHint[]
- Description
-
This element specifies an array of @QueryHint.
You can specify the value within the specifiable range of the arrays of @QueryHint. For details, see 8.12.53 @QueryHint.
- Default value
-
Blank array