インタフェース AutoInsert<T>

  • 型パラメータ:
    T - 処理対象となるエンティティの型
    既知の実装クラスのリスト:
    AutoInsertImpl

    public interface AutoInsert<T>
    挿入を行うSQLを自動生成するクエリです。
    作成者:
    T.TSUCHIE
    • メソッドの詳細

      • includes

        AutoInsert<T> includes​(PropertyPath<?>... properties)
        指定のプロパティのみを挿入対象とします。

        アノテーション @Column(insertable = false) が設定されているプロパティは対象外となります。

        パラメータ:
        properties - 挿入対象のプロパティ情報。
        戻り値:
        自身のインスタンス。
        例外:
        IllegalOperateException - エンティティに存在しないプロパティ名を指定した場合にスローされます。
      • excludes

        AutoInsert<T> excludes​(PropertyPath<?>... properties)
        指定のプロパティを挿入対象から除外します。
        パラメータ:
        properties - 除外対象のプロパティ情報。
        戻り値:
        自身のインスタンス。
      • execute

        int execute()
        クエリを実行します。
        戻り値:
        挿入した行数。
        例外:
        org.springframework.dao.DuplicateKeyException - 主キーなどのが一意制約に違反したとき。