org.springframework.orm.jpa.persistenceunit
Class SpringPersistenceUnitInfo

java.lang.Object
  extended by org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo
      extended by org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo
All Implemented Interfaces:
SmartPersistenceUnitInfo

 class SpringPersistenceUnitInfo
extends MutablePersistenceUnitInfo

Subclass of MutablePersistenceUnitInfo that adds instrumentation hooks based on Spring's LoadTimeWeaver abstraction.

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

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

Field Summary
private  java.lang.ClassLoader classLoader
           
private static java.lang.String DEFAULT_SHARED_CACHE_MODE_NAME
           
private static java.lang.String DEFAULT_VALIDATION_MODE_NAME
           
private  LoadTimeWeaver loadTimeWeaver
           
private  java.lang.String sharedCacheModeName
           
private  java.lang.String validationModeName
           
 
Constructor Summary
SpringPersistenceUnitInfo()
           
 
Method Summary
 void addTransformer(ClassTransformer classTransformer)
          This implementation delegates to the LoadTimeWeaver, if specified.
 java.lang.ClassLoader getClassLoader()
          This implementation returns the LoadTimeWeaver's instrumentable ClassLoader, if specified.
 java.lang.ClassLoader getNewTempClassLoader()
          This implementation delegates to the LoadTimeWeaver, if specified.
 java.lang.String getSharedCacheModeName()
           
 java.lang.String getValidationModeName()
           
 void init(java.lang.ClassLoader classLoader)
          Initialize this PersistenceUnitInfo with the current class loader (instead of with a LoadTimeWeaver).
 void init(LoadTimeWeaver loadTimeWeaver)
          Initialize this PersistenceUnitInfo with the LoadTimeWeaver SPI interface used by Spring to add instrumentation to the current class loader.
 void setSharedCacheModeName(java.lang.String sharedCacheModeName)
           
 void setValidationModeName(java.lang.String validationModeName)
           
 
Methods inherited from class org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo
addJarFileUrl, addManagedClassName, addMappingFileName, addProperty, excludeUnlistedClasses, getJarFileUrls, getJtaDataSource, getManagedClassNames, getMappingFileNames, getNonJtaDataSource, getPersistenceProviderClassName, getPersistenceProviderPackageName, getPersistenceUnitName, getPersistenceUnitRootUrl, getPersistenceXMLSchemaVersion, getProperties, getTransactionType, setExcludeUnlistedClasses, setJtaDataSource, setNonJtaDataSource, setPersistenceProviderClassName, setPersistenceProviderPackageName, setPersistenceUnitName, setPersistenceUnitRootUrl, setPersistenceXMLSchemaVersion, setProperties, setTransactionType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SHARED_CACHE_MODE_NAME

private static final java.lang.String DEFAULT_SHARED_CACHE_MODE_NAME
See Also:
Constant Field Values

DEFAULT_VALIDATION_MODE_NAME

private static final java.lang.String DEFAULT_VALIDATION_MODE_NAME
See Also:
Constant Field Values

sharedCacheModeName

private java.lang.String sharedCacheModeName

validationModeName

private java.lang.String validationModeName

loadTimeWeaver

private LoadTimeWeaver loadTimeWeaver

classLoader

private java.lang.ClassLoader classLoader
Constructor Detail

SpringPersistenceUnitInfo

SpringPersistenceUnitInfo()
Method Detail

setSharedCacheModeName

public void setSharedCacheModeName(java.lang.String sharedCacheModeName)

getSharedCacheModeName

public java.lang.String getSharedCacheModeName()

setValidationModeName

public void setValidationModeName(java.lang.String validationModeName)

getValidationModeName

public java.lang.String getValidationModeName()

init

public void init(LoadTimeWeaver loadTimeWeaver)
Initialize this PersistenceUnitInfo with the LoadTimeWeaver SPI interface used by Spring to add instrumentation to the current class loader.


init

public void init(java.lang.ClassLoader classLoader)
Initialize this PersistenceUnitInfo with the current class loader (instead of with a LoadTimeWeaver).


getClassLoader

public java.lang.ClassLoader getClassLoader()
This implementation returns the LoadTimeWeaver's instrumentable ClassLoader, if specified.

Overrides:
getClassLoader in class MutablePersistenceUnitInfo
See Also:
ClassUtils.getDefaultClassLoader()

addTransformer

public void addTransformer(ClassTransformer classTransformer)
This implementation delegates to the LoadTimeWeaver, if specified.

Overrides:
addTransformer in class MutablePersistenceUnitInfo

getNewTempClassLoader

public java.lang.ClassLoader getNewTempClassLoader()
This implementation delegates to the LoadTimeWeaver, if specified.

Overrides:
getNewTempClassLoader in class MutablePersistenceUnitInfo