クラス SpringPersistenceUnitInfo

java.lang.ObjectSE
org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo
org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo

public class SpringPersistenceUnitInfo extends MutablePersistenceUnitInfo
Spring の LoadTimeWeaver 抽象化に基づいてインストルメンテーションフックを追加する MutablePersistenceUnitInfo のサブクラス。

7.0 以降、このクラスはカスタムブートストラップ用に公開されています。完全に構成された SpringPersistenceUnitInfo インスタンスは、asStandardPersistenceUnitInfo() を介して標準の JPA 記述子に変換できます(JPA 3.2/4.0 に適合したプロキシを返します)。

メモ: LocalContainerEntityManagerFactoryBean ブートストラップ内での後処理には、基本型 MutablePersistenceUnitInfo で十分です。

導入:
7.0
作成者:
Rod Johnson, Juergen Hoeller, Costin Leau
関連事項:
  • コンストラクターの詳細

    • SpringPersistenceUnitInfo

      public SpringPersistenceUnitInfo(LoadTimeWeaver loadTimeWeaver)
      カスタム目的で新しい SpringPersistenceUnitInfo を構築します。
      パラメーター:
      loadTimeWeaver - 使用する LoadTimeWeaver
    • SpringPersistenceUnitInfo

      public SpringPersistenceUnitInfo(ClassLoaderSE classLoader)
      カスタム目的で新しい SpringPersistenceUnitInfo を構築します。
      パラメーター:
      classLoader - 使用する ClassLoader
  • メソッドの詳細

    • getClassLoader

      public @Nullable ClassLoaderSE getClassLoader()
      この実装は、指定されている場合、LoadTimeWeaver の計測可能な ClassLoader を返します。
    • addTransformer

      public void addTransformer(jakarta.persistence.spi.ClassTransformer classTransformer)
      この実装は、指定されている場合、LoadTimeWeaver に委譲します。
    • getNewTempClassLoader

      public ClassLoaderSE getNewTempClassLoader()
      この実装は、指定されている場合、LoadTimeWeaver に委譲します。
    • setScopeAnnotationName

      public void setScopeAnnotationName(@Nullable StringSE scopeAnnotationName)
    • getScopeAnnotationName

      public @Nullable StringSE getScopeAnnotationName()
    • addQualifierAnnotationName

      public void addQualifierAnnotationName(StringSE qualifierAnnotationName)
    • getQualifierAnnotationNames

      public ListSE<StringSE> getQualifierAnnotationNames()
    • apply

      public void apply(PersistenceManagedTypes managedTypes)
      通常は Spring AOT から取得される、指定された PersistenceManagedTypes をこの永続性ユニットに適用します。
      パラメーター:
      managedTypes - 登録する管理された永続型
      導入:
      7.0
    • apply

      public void apply(jakarta.persistence.PersistenceConfiguration config, DataSourceLookup dataSourceLookup)
      指定された JPA 3.2 PersistenceConfiguration をこの永続ユニットに適用し、適用可能なすべての設定をコピーします。

      標準の PersistenceConfiguration 設定以外にも、HibernatePersistenceConfiguration の "rootUrl" と "jarFileUrls" も検出され適用されます。

      パラメーター:
      config - 適用する JPA 永続性設定
      dataSourceLookup - 永続性プロバイダに DataSources を提供する JDBC DataSourceLookup は、Spring 管理の DataSource インスタンスに対して PersistenceConfiguration のデータソース名を解決します。
      導入:
      7.0
    • asStandardPersistenceUnitInfo

      public jakarta.persistence.spi.PersistenceUnitInfo asStandardPersistenceUnitInfo()
      この SpringPersistenceUnitInfo インスタンス内の永続ユニット構成用の標準 jakarta.persistence.spi.PersistenceUnitInfo プロキシを公開します。

      返されるプロキシは、永続性プロバイダのブートストラップで使用するために jakarta.persistence.spi.PersistenceUnitInfo (およびその拡張版 SmartPersistenceUnitInfo)を実装しています。返されるプロキシは実質的に変更不可能であり、Mutable/SpringPersistenceUnitInfo にダウンキャストできないことに注意してください。