Top Description Fields Constructors Methods
org.springframework.orm.jpa.persistenceunit

pack-priv Class SpringPersistenceUnitInfo

extends MutablePersistenceUnitInfo
Class Inheritance
Imports
jakarta.persistence.spi.ClassTransformer, org.apache.commons.logging.LogFactory, org.springframework.core.DecoratingClassLoader, org.springframework.instrument.classloading.LoadTimeWeaver, .SimpleThrowawayClassLoader, org.springframework.lang.Nullable, org.springframework.util.Assert

Subclass of MutablePersistenceUnitInfo that adds instrumentation hooks based on Spring's org.springframework.instrument.classloading.LoadTimeWeaver abstraction.

This class is restricted to package visibility, in contrast to its superclass.

Authors
Rod Johnson, Juergen Hoeller, Costin Leau
Since
2.0
See Also
PersistenceUnitManager

Field Summary

Modifier and TypeField and Description
private ClassLoader
private LoadTimeWeaver

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addTransformer(ClassTransformer
provider-supplied transformer that the container invokes at class-(re)definition time
classTransformer
)

Overrides org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo.addTransformer.

Implements jakarta.persistence.spi.PersistenceUnitInfo.addTransformer.

This implementation delegates to the LoadTimeWeaver, if specified.

public ClassLoader
getClassLoader()

Overrides org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo.getClassLoader.

Implements jakarta.persistence.spi.PersistenceUnitInfo.getClassLoader.

This implementation returns the LoadTimeWeaver's instrumentable ClassLoader, if specified.

public ClassLoader
public void
init(LoadTimeWeaver loadTimeWeaver)

Initialize this PersistenceUnitInfo with the LoadTimeWeaver SPI interface used by Spring to add instrumentation to the current class loader.

public void
init(ClassLoader classLoader)

Initialize this PersistenceUnitInfo with the current class loader (instead of with a LoadTimeWeaver).

Inherited from org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo:
addJarFileUrladdManagedClassNameaddManagedPackageaddMappingFileNameaddPropertyexcludeUnlistedClassesgetJarFileUrlsgetJtaDataSourcegetManagedClassNamesgetManagedPackagesgetMappingFileNamesgetNonJtaDataSourcegetPersistenceProviderClassNamegetPersistenceProviderPackageNamegetPersistenceUnitNamegetPersistenceUnitRootUrlgetPersistenceXMLSchemaVersiongetPropertiesgetSharedCacheModegetTransactionTypegetValidationModesetExcludeUnlistedClassessetJtaDataSourcesetNonJtaDataSourcesetPersistenceProviderClassNamesetPersistenceProviderPackageNamesetPersistenceUnitNamesetPersistenceUnitRootUrlsetPersistenceXMLSchemaVersionsetPropertiessetSharedCacheModesetTransactionTypesetValidationModetoString

Field Detail

classLoaderback to summary
private ClassLoader classLoader
Annotations
@Nullable
loadTimeWeaverback to summary
private LoadTimeWeaver loadTimeWeaver
Annotations
@Nullable

Constructor Detail

SpringPersistenceUnitInfoback to summary
pack-priv SpringPersistenceUnitInfo()

Method Detail

addTransformerback to summary
public void addTransformer(ClassTransformer classTransformer)

Overrides org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo.addTransformer.

Implements jakarta.persistence.spi.PersistenceUnitInfo.addTransformer.

This implementation delegates to the LoadTimeWeaver, if specified.

Parameters
classTransformer:ClassTransformer

Doc from jakarta.persistence.spi.PersistenceUnitInfo.addTransformer.

provider-supplied transformer that the container invokes at class-(re)definition time

Annotations
@Override
getClassLoaderback to summary
public ClassLoader getClassLoader()

Overrides org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo.getClassLoader.

Implements jakarta.persistence.spi.PersistenceUnitInfo.getClassLoader.

This implementation returns the LoadTimeWeaver's instrumentable ClassLoader, if specified.

Returns:ClassLoader

Doc from jakarta.persistence.spi.PersistenceUnitInfo.getClassLoader.

ClassLoader that the provider may use to load any classes, resources, or open URLs

Annotations
@Override
@Nullable
getNewTempClassLoaderback to summary
public ClassLoader getNewTempClassLoader()

Overrides org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo.getNewTempClassLoader.

Implements jakarta.persistence.spi.PersistenceUnitInfo.getNewTempClassLoader.

This implementation delegates to the LoadTimeWeaver, if specified.

Returns:ClassLoader

Doc from jakarta.persistence.spi.PersistenceUnitInfo.getNewTempClassLoader.

temporary ClassLoader with same visibility as current loader

Annotations
@Override
initback to summary
public void init(LoadTimeWeaver loadTimeWeaver)

Initialize this PersistenceUnitInfo with the LoadTimeWeaver SPI interface used by Spring to add instrumentation to the current class loader.

initback to summary
public void init(ClassLoader classLoader)

Initialize this PersistenceUnitInfo with the current class loader (instead of with a LoadTimeWeaver).