uCosminexus Application Server, Definition Reference Guide

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

6.3.1 Elements below entity-mappings

Organization of this subsection
(1) <entity-mappings>
(2) <package>
(3) <schema>
(4) <catalog>
(5) <access>
(6) <sequence-generator>

(1) <entity-mappings>

Indicates the root tag.

The following table lists the specifiable attributes:

Table 6-6 Attributes of <entity-mappings>

Attribute name Type Optional/Required Description
version orm:versionType Required Specifies the JPA version.

(2) <package>

The package element specifies the class package described in the elements and attributes within the same mapping file. In the package element, the class name with a package name is specified for a class, and if the name differs from the package name specified in the package element, the package name is overwritten.

(3) <schema>

The schema element only applies to the entities that are specified within the same mapping file.

The schema element is overwritten by the following elements and attributes:

(4) <catalog>

The catalog element only applies to the entities specified within the same mapping file.

The catalog element is overwritten by the following elements and attributes:

Precautions
Depending upon a database, the catalog element might not exist. The catalog element does not exist in Oracle and HiRDB databases supported by the Cosminexus JPA Provider. Therefore, you cannot specify the catalog element. If specified, an exception will be thrown when you execute the application.

(5) <access>

The access element applies to the classes that are specified and managed within the same mapping file.

The access element is overwritten by the following annotations and attributes:

# Specify PROPERTY or FIELD as the specified value. For details on specifying how to access the entity class fields, see 6.12.3 Specifying how to access the entity class fields in the manual uCosminexus Application Server Common Container Functionality Guide.

(6) <sequence-generator>

Adds the sequence generator.

For details about the functionality and attributes, see section 2.7 javax.persistence package in the manual uCosminexus Application Server API Reference Guide.

The following table lists the specifiable attributes:

Table 6-7 Attributes of <sequence-generator>

Attribute name Type Optional/Required Description
name xsd:string Required See the name attribute in 2.7.56 @SequenceGenerator in the manual uCosminexus Application Server API Reference Guide.
sequence-name xsd:string Optional See the sequenceName attribute in 2.7.56 @SequenceGenerator in the manual uCosminexus Application Server API Reference Guide.
initial-value xsd:int Optional See the initialValue attribute in 2.7.56 @SequenceGenerator in the manual uCosminexus Application Server API Reference Guide.
allocation-size xsd:int Optional See the allocationSize attribute in 2.7.56 @SequenceGenerator in the manual uCosminexus Application Server API Reference Guide.