6.3.10 Other elements

Organization of this subsection
(1) <description>
(2) <entity-listener>
(3) <pre-persist>, <post-persist>, <pre-remove>, <post-remove>, <pre-update>, <post-update>, <post-load>
(4) <unique-constraint>
(5) <column-name>
(6) <query>
(7) <hint>
(8) <entity-result>
(9) <field-result>
(10) <column-result>
(11) <attributes>
(12) <column>
(13) <generated-value>
(14) <temporal>
(15) <table-generator>
(16) <attribute-override>
(17) <lob>
(18) <enumerated>
(19) <join-column>
(20) <join-table>
(21) <inverse-join-column>
(22) <cascade>
(23) <cascade-all>
(24) <cascade-persist>
(25) <cascade-merge>
(26) <cascade-remove>
(27) <cascade-refresh>
(28) <order-by>
(29) <map-key>
(30) <primary-key-join-column>

(1) <description>

Adds the description.

(2) <entity-listener>

Specifies the entity listener.

The following table lists the specifiable attributes:

Table 6-53 Attributes of <entity-listener>

Attribute nameTypeOptional/RequiredDescription
classxsd:stringRequiredClass name of the entity listener.

(3) <pre-persist>, <post-persist>, <pre-remove>, <post-remove>, <pre-update>, <post-update>, <post-load>

Specifies the lifecycle callback method.

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-54 Attributes of <pre-persist>, <post-persist>, <pre-remove>, <post-remove>, <pre-update>, <post-update>, and <post-load>

Attribute nameTypeOptional/RequiredDescription
method-namexsd:stringRequiredTarget method name.

(4) <unique-constraint>

Adds a unique constraint to DDL.

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

(5) <column-name>

Specifies the name of the column in which the unique constraint will be added.

The column-name element corresponds to the columnNames attribute of @UniqueConstraint.

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

(6) <query>

Specifies the query string.

The query element corresponds to the query attribute of @NamedQuery and the query attribute of @NamedNativeQuery.

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

(7) <hint>

Adds a hint to the query.

The hint element corresponds to the hints attribute of @NamedQuery and the hints attribute of @NamedNativeQuery.

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-55 Attributes of <hint>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringRequiredSee the name attribute in 2.7.53 @QueryHint in the manual uCosminexus Application Server API Reference Guide.
valuexsd:stringRequiredSee the value attribute in 2.7.53 @QueryHint in the manual uCosminexus Application Server API Reference Guide.

(8) <entity-result>

Specifies the entity class used for mapping the native SQL query result.

The entity-result element corresponds to the entities attribute of @SqlResultSetMapping.

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-56 Attributes of <entity-result>

Attribute nameTypeOptional/RequiredDescription
entity-classxsd:stringRequiredSee the entityClass attribute in 2.7.15 @EntityResult in the manual uCosminexus Application Server API Reference Guide.
discriminator-columnxsd:stringOptionalSee the discriminatorColumn attribute in 2.7.15 @EntityResult in the manual uCosminexus Application Server API Reference Guide.

(9) <field-result>

Specifies the field used for mapping the native SQL query result.

The field-result element corresponds to the fields attribute of @EntityResult.

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-57 Attributes of <field-result>

TypeAttribute nameOptional/RequiredDescription
xsd:stringnameRequiredSee the name attribute in 2.7.19 @FieldResult in the manual uCosminexus Application Server API Reference Guide.
xsd:stringcolumnRequiredSee the column attribute in 2.7.19 @FieldResult in the manual uCosminexus Application Server API Reference Guide.

(10) <column-result>

Specifies the column used for mapping the native SQL query result.

The column-result element corresponds to the columns attribute of @SqlResultSetMapping.

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-58 Attributes of <column-result>

TypeAttribute nameOptional/RequiredDescription
xsd:stringnameRequiredSee the name attribute in 2.7.7 @ColumnResult in the manual uCosminexus Application Server API Reference Guide.

(11) <attributes>

The functionality of the attributes element does not exist.

(12) <column>

The column element specifies the column mapping for the Persistent field or property.

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-59 Attributes of <column>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringOptionalSee the name attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
uniquexsd:booleanOptionalSee the unique attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
nullablexsd:booleanOptionalSee the nullable attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
insertablexsd:booleanOptionalSee the insertable attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
updatablexsd:booleanOptionalSee the updatable attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
column-definitionxsd:stringOptionalSee the columnDefinition attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
tablexsd:stringOptionalSee the table attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
lengthxsd:intOptionalSee the length attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
precisionxsd:intOptionalSee the precision attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.
scalexsd:intOptionalSee the scale attribute in 2.7.6 @Column in the manual uCosminexus Application Server API Reference Guide.

(13) <generated-value>

Specifies the strategy for generating the primary key value.

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-60 Attributes of <generated-value>

Attribute nameTypeOptional/RequiredDescription
strategyorm:generation-typeOptionalSee the strategy attribute in 2.7.20 @GeneratedValue in the manual uCosminexus Application Server API Reference Guide.
generatorxsd:stringOptionalSee the generator attribute in 2.7.20 @GeneratedValue in the manual uCosminexus Application Server API Reference Guide.

(14) <temporal>

Specified when mapping to the DATE, TIME, and TIMESTAMP type.

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

(15) <table-generator>

Adds the table 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-61 Attributes of <table-generator>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringRequiredSee the name attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
tablexsd:stringOptionalSee the table attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
catalogxsd:stringOptionalSee the catalog attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
schemaxsd:stringOptionalSee the schema attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
pk-column-namexsd:stringOptionalSee the pkColumnName attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
value-column-namexsd:stringOptionalSee the valueColumnName attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
pk-column-valuexsd:stringOptionalSee the pkColumnName attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
initial-valuexsd:intOptionalSee the initialValue attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.
allocation-sizexsd:intOptionalSee the allocationSize attribute in 2.7.60 @TableGenerator in the manual uCosminexus Application Server API Reference Guide.

(16) <attribute-override>

Overwrites the mapping of properties and fields.

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-62 Attributes of <attribute-override>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringRequiredSee the name attribute in 2.7.3 @AttributeOverride in the manual uCosminexus Application Server API Reference Guide.

(17) <lob>

The lob element is specified when mapping to the Lob type.

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

(18) <enumerated>

Specified when mapping to the enumeration type.

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

(19) <join-column>

In order to join tables, the join-column element specifies the external key column of the join table corresponding to the owner-side entity.

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-63 Attributes of <join-column>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringOptionalSee the name attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
referenced-column-namexsd:stringOptionalSee the referencedColumnName attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
uniquexsd:booleanOptionalSee the unique attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
nullablexsd:booleanOptionalSee the nullable attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
insertablexsd:booleanOptionalSee the insertable attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
updatablexsd:booleanOptionalSee the updatable attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
column-definitionxsd:stringOptionalSee the columnDefinition attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
tablexsd:stringOptionalSee the table attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.

(20) <join-table>

The join-table element specifies the join table to be used in many-to-many and the unilateral one-to-many relationships.

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-64 Attributes of <join-table>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringOptionalSee the name attribute in 2.7.26 @JoinTable in the manual uCosminexus Application Server API Reference Guide.
catalogxsd:stringOptionalSee the catalog attribute in 2.7.26 @JoinTable in the manual uCosminexus Application Server API Reference Guide.
schemaxsd:stringOptionalSee the schema attribute in 2.7.26 @JoinTable in the manual uCosminexus Application Server API Reference Guide.

(21) <inverse-join-column>

In order to join tables, the inverse-join-column element specifies the external key column of the join table corresponding to the owned-side entity.

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-65 Attributes of <inverse-join-column>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringOptionalSee the name attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
referenced-column-namexsd:stringOptionalSee the referencedColumnName attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
uniquexsd:booleanOptionalSee the unique attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
nullablexsd:booleanOptionalSee the nullable attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
insertablexsd:booleanOptionalSee the insertable attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
updatablexsd:booleanOptionalSee the updatable attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
column-definitionxsd:stringOptionalSee the columnDefinition attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.
tablexsd:stringOptionalSee the table attribute in 2.7.24 @JoinColumn in the manual uCosminexus Application Server API Reference Guide.

(22) <cascade>

The cascade element specifies the operations that you can cascade.

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

(23) <cascade-all>

Cascades all the operations.

(24) <cascade-persist>

Cascades the persist operation.

(25) <cascade-merge>

Cascades the merge operation.

(26) <cascade-remove>

Cascades the remove operation.

(27) <cascade-refresh>

Cascades the refresh operation.

(28) <order-by>

Specifies the order to be applied when maintaining a relation in the collection.

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

(29) <map-key>

Specifies the map key as the Map type relation.

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-66 Attributes of <map-key>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringOptionalSee the name attribute in 2.7.30 @MapKey in the manual uCosminexus Application Server API Reference Guide.

(30) <primary-key-join-column>

The primary-key-join-column element specifies the primary key column used as the external key that JOINS with other tables.

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-67 Attributes of <primary-key-join-column>

Attribute nameTypeOptional/RequiredDescription
namexsd:stringOptionalSee the name attribute in 2.7.51 @PrimaryKeyJoinColumn in the manual uCosminexus Application Server API Reference Guide.
referenced-column-namexsd:stringOptionalSee the referencedColumnName attribute in 2.7.51 @PrimaryKeyJoinColumn in the manual uCosminexus Application Server API Reference Guide.
column-definitionxsd:stringOptionalSee the columnDefinition attribute in 2.7.51 @PrimaryKeyJoinColumn in the manual uCosminexus Application Server API Reference Guide.