パッケージ jakarta.persistence
アノテーション型 Column
- @TargetSE({METHODSE,FIELDSE}) @RetentionSE(RUNTIMESE) public @interface Column 永続プロパティまたはフィールドのマップされた列を指定します。- Columnアノテーションが指定されていない場合、デフォルト値が適用されます。- Example 1: @Column(name="DESC", nullable=false, length=512) public String getDescription() { return description; } Example 2: @Column(name="DESC", columnDefinition="CLOB NOT NULL", table="EMP_DETAIL") @Lob public String getDescription() { return description; } Example 3: @Column(name="ORDER_COST", updatable=false, precision=12, scale=2) public BigDecimal getCost() { return cost; }- 導入:
- 1.0
 
- オプション要素の概要- オプション要素 - 修飾子と型 - オプションの要素 - 説明 - StringSE- columnDefinition(オプション)列の DDL を生成するときに使用される SQL フラグメント。- boolean- insertable(オプション)永続プロバイダーによって生成された SQL INSERT ステートメントに列が含まれるかどうか。- int- length(オプション)列の長さ。- StringSE- name(オプション)列の名前。- boolean- nullable(オプション)データベース列が null 可能かどうか。- int- precision(オプション)10 進数(正確な数値)列の精度。- int- scale(オプション)10 進数(正確な数値)列のスケール。- StringSE- table(オプション)列を含むテーブルの名前。- boolean- unique(オプション)列が一意キーであるかどうか。- boolean- updatable(オプション)永続プロバイダーによって生成された SQL UPDATE ステートメントに列が含まれるかどうか。