Hitachi

uCosminexus Application Server Compatibility Guide


13.3.10 Other elements

Organization of this subsection

(1) <description>

Adds the description.

(2) <entity-listener>

Specifies the entity listener.

The following table lists the specifiable attributes:

Table 13‒53: Attributes of <entity-listener>

Attribute name

Type

Optional/Required

Description

class

xsd:string

Required

Class 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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒54: Attributes of <pre-persist>, <post-persist>, <pre-remove>, <post-remove>, <pre-update>, <post-update>, and <post-load>

Attribute name

Type

Optional/Required

Description

method-name

xsd:string

Required

Target method name.

(4) <unique-constraint>

Adds a unique constraint to DDL.

For details on the functionality and attributes, see 8.12 javax.persistence package.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

(6) <query>

Specifies the query string.

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

For details on the functionality and attributes, see 8.12 javax.persistence package.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒55: Attributes of <hint>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Required

See the name attribute in 8.12.53 @QueryHint.

value

xsd:string

Required

See the value attribute in 8.12.53 @QueryHint.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒56: Attributes of <entity-result>

Attribute name

Type

Optional/Required

Description

entity-class

xsd:string

Required

See the entityClass attribute in 8.12.15 @EntityResult.

discriminator-column

xsd:string

Optional

See the discriminatorColumn attribute in 8.12.15 @EntityResult.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒57: Attributes of <field-result>

Type

Attribute name

Optional/Required

Description

xsd:string

name

Required

See the name attribute in 8.12.19 @FieldResult.

xsd:string

column

Required

See the column attribute in 8.12.19 @FieldResult.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒58: Attributes of <column-result>

Type

Attribute name

Optional/Required

Description

xsd:string

name

Required

See the name attribute in 8.12.7 @ColumnResult.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒59: Attributes of <column>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Optional

See the name attribute in 8.12.6 @Column.

unique

xsd:boolean

Optional

See the unique attribute in 8.12.6 @Column.

nullable

xsd:boolean

Optional

See the nullable attribute in 8.12.6 @Column.

insertable

xsd:boolean

Optional

See the insertable attribute in 8.12.6 @Column.

updatable

xsd:boolean

Optional

See the updatable attribute in 8.12.6 @Column.

column-definition

xsd:string

Optional

See the columnDefinition attribute in 8.12.6 @Column.

table

xsd:string

Optional

See the table attribute in 8.12.6 @Column.

length

xsd:int

Optional

See the length attribute in 8.12.6 @Column.

precision

xsd:int

Optional

See the precision attribute in 8.12.6 @Column.

scale

xsd:int

Optional

See the scale attribute in 8.12.6 @Column.

(13) <generated-value>

Specifies the strategy for generating the primary key value.

For details on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒60: Attributes of <generated-value>

Attribute name

Type

Optional/Required

Description

strategy

orm:generation-type

Optional

See the strategy attribute in 8.12.20 @GeneratedValue.

generator

xsd:string

Optional

See the generator attribute in 8.12.20 @GeneratedValue.

(14) <temporal>

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

For details on the functionality and attributes, see 8.12 javax.persistence package.

(15) <table-generator>

Adds the table generator.

For details on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒61: Attributes of <table-generator>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Required

See the name attribute in 8.12.60 @TableGenerator.

table

xsd:string

Optional

See the table attribute in 8.12.60 @TableGenerator.

catalog

xsd:string

Optional

See the catalog attribute in 8.12.60 @TableGenerator.

schema

xsd:string

Optional

See the schema attribute in 8.12.60 @TableGenerator.

pk-column-name

xsd:string

Optional

See the pkColumnName attribute in 8.12.60 @TableGenerator.

value-column-name

xsd:string

Optional

See the valueColumnName attribute in 8.12.60 @TableGenerator.

pk-column-value

xsd:string

Optional

See the pkColumnValue attribute in 8.12.60 @TableGenerator.

initial-value

xsd:int

Optional

See the initialValue attribute in 8.12.60 @TableGenerator.

allocation-size

xsd:int

Optional

See the allocationSize attribute in 8.12.60 @TableGenerator.

(16) <attribute-override>

Overwrites the mapping of properties and fields.

For details on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒62: Attributes of <attribute-override>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Required

See the name attribute in 8.12.3 @AttributeOverride.

(17) <lob>

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

For details on the functionality and attributes, see 8.12 javax.persistence package.

(18) <enumerated>

Specified when mapping to the enumeration type.

For details on the functionality and attributes, see 8.12 javax.persistence package.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒63: Attributes of <join-column>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Optional

See the name attribute in 8.12.24 @JoinColumn.

referenced-column-name

xsd:string

Optional

See the referencedColumnName attribute in 8.12.24 @JoinColumn.

unique

xsd:boolean

Optional

See the unique attribute in 8.12.24 @JoinColumn.

nullable

xsd:boolean

Optional

See the nullable attribute in 8.12.24 @JoinColumn.

insertable

xsd:boolean

Optional

See the insertable attribute in 8.12.24 @JoinColumn.

updatable

xsd:boolean

Optional

See the updatable attribute in 8.12.24 @JoinColumn.

column-definition

xsd:string

Optional

See the columnDefinition attribute in 8.12.24 @JoinColumn.

table

xsd:string

Optional

See the table attribute in 8.12.24 @JoinColumn.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒64: Attributes of <join-table>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Optional

See the name attribute in 8.12.26 @JoinTable.

catalog

xsd:string

Optional

See the catalog attribute in 8.12.26 @JoinTable.

schema

xsd:string

Optional

See the schema attribute in 8.12.26 @JoinTable.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒65: Attributes of <inverse-join-column>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Optional

See the name attribute in 8.12.24 @JoinColumn.

referenced-column-name

xsd:string

Optional

See the referencedColumnName attribute in 8.12.24 @JoinColumn.

unique

xsd:boolean

Optional

See the unique attribute in 8.12.24 @JoinColumn.

nullable

xsd:boolean

Optional

See the nullable attribute in 8.12.24 @JoinColumn.

insertable

xsd:boolean

Optional

See the insertable attribute in 8.12.24 @JoinColumn.

updatable

xsd:boolean

Optional

See the updatable attribute in 8.12.24 @JoinColumn.

column-definition

xsd:string

Optional

See the columnDefinition attribute in 8.12.24 @JoinColumn.

table

xsd:string

Optional

See the table attribute in 8.12.24 @JoinColumn.

(22) <cascade>

The cascade element specifies the operations that you can cascade.

For details on the functionality and attributes, see 8.12 javax.persistence package.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

(29) <map-key>

Specifies the map key as the Map type relation.

For details on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒66: Attributes of <map-key>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Optional

See the name attribute in 8.12.30 @MapKey.

(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 on the functionality and attributes, see 8.12 javax.persistence package.

The following table lists the specifiable attributes:

Table 13‒67: Attributes of <primary-key-join-column>

Attribute name

Type

Optional/Required

Description

name

xsd:string

Optional

See the name attribute in 8.12.51 @PrimaryKeyJoinColumn.

referenced-column-name

xsd:string

Optional

See the referencedColumnName attribute in 8.12.51 @PrimaryKeyJoinColumn.

column-definition

xsd:string

Optional

See the columnDefinition attribute in 8.12.51 @PrimaryKeyJoinColumn.