Hitachi

uCosminexus Application Server Compatibility Guide


8.12.8 @DiscriminatorColumn

Organization of this subsection

(1) Description

This annotation specifies the column for identification used in the SINGLE_TABLE strategy or JOINED strategy. This annotation is added to an entity class that becomes a superclass by inheriting an entity class.

The applicable target is class.

(2) Element

The following table lists the elements of @DiscriminatorColumn:

Element name

Optional/Required

Element description

name

Optional

This element specifies the name of the column for identification.

discriminatorType

Optional

This element specifies the type of the column for identification.

columnDefinition

Optional

This element is used to describe the constraints added to the column for identification in the DDL, when the CREATE statement is output.

Note that Cosminexus JPA provider does not support this attribute.

length

Optional

This element specifies the length when the column for identification is a character string.

Note that Cosminexus JPA provider does not support this attribute.

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 column for identification.

The column name that can be specified depends on the database specifications.

Specify the same value (matching the upper case and lower case characters) for the name element as that for the name element of @Column.

Default value

"DTYPE"

(b) discriminatorType element

Type

DiscriminatorType

Description

This element specifies the type of the column for identification.

You can specify the following values:

  • DiscriminatorType.STRING

  • DiscriminatorType.CHAR

  • DiscriminatorType.INTEGER

Default value

DiscriminatorType.STRING