Interface SmartPersistenceUnitInfo

All Superinterfaces:
jakarta.persistence.spi.PersistenceUnitInfo

public interface SmartPersistenceUnitInfo extends jakarta.persistence.spi.PersistenceUnitInfo
Extension of the standard JPA PersistenceUnitInfo interface, for advanced collaboration between Spring's LocalContainerEntityManagerFactoryBean and PersistenceUnitManager implementations.
Since:
3.0.1
Author:
Juergen Hoeller
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Return a list of managed Java packages, to be introspected by the persistence provider.
    boolean
    Determine whether this persistence unit is configured for JTA transactions.
    void
    setPersistenceProviderPackageName(String persistenceProviderPackageName)
    Set the persistence provider's own package name, for exclusion from class transformation.

    Methods inherited from interface jakarta.persistence.spi.PersistenceUnitInfo

    addTransformer, excludeUnlistedClasses, getClassLoader, getJarFileUrls, getJtaDataSource, getManagedClassNames, getMappingFileNames, getNewTempClassLoader, getNonJtaDataSource, getPersistenceProviderClassName, getPersistenceUnitName, getPersistenceUnitRootUrl, getPersistenceXMLSchemaVersion, getProperties, getQualifierAnnotationNames, getScopeAnnotationName, getSharedCacheMode, getTransactionType, getValidationMode
  • Method Details

    • getManagedPackages

      List<String> getManagedPackages()
      Return a list of managed Java packages, to be introspected by the persistence provider. Typically found through scanning but not exposable through PersistenceUnitInfo.getManagedClassNames().
      Returns:
      a list of names of managed Java packages (potentially empty)
      Since:
      4.1
    • setPersistenceProviderPackageName

      void setPersistenceProviderPackageName(String persistenceProviderPackageName)
      Set the persistence provider's own package name, for exclusion from class transformation.
      See Also:
      • PersistenceUnitInfo.addTransformer(jakarta.persistence.spi.ClassTransformer)
      • PersistenceUnitInfo.getNewTempClassLoader()
    • isConfiguredForJta

      boolean isConfiguredForJta()
      Determine whether this persistence unit is configured for JTA transactions.

      This allows for a quick check without referring to the JPA transaction type enum (primarily for achieving compatibility between JPA 3.2 and 4.0).

      Since:
      7.0
      See Also:
      • PersistenceUnitTransactionType.JTA