2.7.64
アノテーションとO/Rマッピングとの対応
アノテーションとO/Rマッピングファイルとの対応を次の表に示します。
表2-30
アノテーションとO/Rマッピングファイルの対応
アノテーション
O/Rマッピングの要素
@AssociationOverride
<association-override>
@AssociationOverrides
-
@AttributeOverride
<attribute-override>
@AttributeOverrides
-
@Basic
<basic>
@Column
<column>
@ColumnResult
<column-result>
@DiscriminatorColumn
<discriminator-column>
@DiscriminatorValue
<discriminator-value>
@Embeddable
<embeddable>
@Embedded
<embedded>
@EmbeddedId
<embedded-id>
@Entity
<entity>
@EntityListeners
<entity-listeners>
@EntityResult
<entity-result>
@Enumerated
<enumerated>
@ExcludeDefaultListeners
<exclude-default-listeners>
@ExcludeSuperclassListeners
<exclude-superclass-listeners>
@FieldResult
<field-result>
@GeneratedValue
<generated-value>
@Id
<id>
@IdClass
<id-class>
@Inheritance
<inheritance>
@JoinColumn
<join-column>
@JoinColumns
-
@JoinTable
<join-table>
@Lob
<lob>
@ManyToMany
<many-to-many>
@ManyToOne
<many-to-one>
@MapKey
<map-key>
@MappedSuperclass
<mapped-superclass>
@NamedNativeQueries
-
@NamedNativeQuery
<named-native-query>
@NamedQueries
-
@NamedQuery
<named-query>
@OneToMany
<one-to-many>
@OneToOne
<one-to-one>
@OrderBy
<order-by>
@PersistenceContext
-
※
@PersistenceContexts
-
※
@PersistenceProperty
-
※
@PostLoad
<post-load>
@PostPersist
<post-persist>
@PostRemove
<post-remove>
@PostUpdate
<post-update>
@PrePersist
<pre-persist>
@PreRemove
<pre-remove>
@PreUpdate
<pre-update>
@PrimaryKeyJoinColumn
<primary-key-join-column>
@PrimaryKeyJoinColumns
-
@QueryHint
<hint>
@SecondaryTable
<secondary-table>
@SecondaryTables
-
@SequenceGenerator
<sequence-generator>
@SqlResultSetMapping
<sql-result-set-mapping>
@SqlResultSetMappings
-
@Table
<table>
@TableGenerator
<table-generator>
@Temporal
<temporal>
@Transient
<transient>
@UniqueConstraint
<unique-constraint>
@Version
<version>
(凡例)
-:該当しません。
注※
O/Rマッピングのためのアノテーションではありません。