uCosminexus Application Server, API Reference Guide

[Contents][Index][Back][Next]

2.7.35 @NamedQuery

Organization of this subsection
(1) Description
(2) Element

(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
name Required This element specifies the name of the named query.
query Required This element specifies the query string of JPQL.
hints 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 2.7.53 @QueryHint.

Default value
Blank array