uCosminexus Application Server, API Reference Guide

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

2.7.15 @EntityResult

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

(1) Description

This annotation specifies the entity class in which the query results of the SQL are to be mapped.

The applicable target is the entities element of @SqlResultSetMapping.

(2) Element

The following table lists the elements of @EntityResult:

Element name Optional/Required Element description
entityClass Required This element specifies the result class.
fields Optional This element specifies the arrays of @FieldResult.
discriminatorColumn Optional This element specifies the name or optional name of the column for identification within the SELECT clause that determines the type of the entity instance.

The details of attributes that are supported with Cosminexus JPA provider are as follows:

(a) entityClass element

Type
Class

Description
This element specifies the result class.
The value that can be specified is the class name.

Default value
None
(b) fields element

Type
FieldResult[]

Description
This element specifies an array of @FieldResult.
You can specify the value within the specifiable range of the arrays of @FieldResult. For details, see 2.7.19 @FieldResult.

Default value
Blank array
(c) discriminatorColumn element

Type
String

Description
This element specifies the name or optional name of the column for identification within the SELECT clause that determines the type of the entity instance.
The value that can be specified is the name or optional name of the column specified in the table.

Default value
Blank array