public class MutablePersistenceUnitInfo extends Object implements SmartPersistenceUnitInfo
PersistenceUnitInfo
interface,
used to bootstrap an EntityManagerFactory
in a container.
This implementation is largely a JavaBean, offering mutators
for all standard PersistenceUnitInfo
properties.
Constructor and Description |
---|
MutablePersistenceUnitInfo() |
public void setPersistenceUnitName(String persistenceUnitName)
public String getPersistenceUnitName()
getPersistenceUnitName
in interface PersistenceUnitInfo
public void setPersistenceProviderClassName(String persistenceProviderClassName)
public String getPersistenceProviderClassName()
getPersistenceProviderClassName
in interface PersistenceUnitInfo
public void setTransactionType(PersistenceUnitTransactionType transactionType)
public PersistenceUnitTransactionType getTransactionType()
getTransactionType
in interface PersistenceUnitInfo
public void setJtaDataSource(DataSource jtaDataSource)
public DataSource getJtaDataSource()
getJtaDataSource
in interface PersistenceUnitInfo
public void setNonJtaDataSource(DataSource nonJtaDataSource)
public DataSource getNonJtaDataSource()
getNonJtaDataSource
in interface PersistenceUnitInfo
public void addMappingFileName(String mappingFileName)
public List<String> getMappingFileNames()
getMappingFileNames
in interface PersistenceUnitInfo
public void addJarFileUrl(URL jarFileUrl)
public List<URL> getJarFileUrls()
getJarFileUrls
in interface PersistenceUnitInfo
public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl)
public URL getPersistenceUnitRootUrl()
getPersistenceUnitRootUrl
in interface PersistenceUnitInfo
public void addManagedClassName(String managedClassName)
public List<String> getManagedClassNames()
getManagedClassNames
in interface PersistenceUnitInfo
public void addManagedPackage(String packageName)
Note: This refers to annotated package-info.java
files. It does
not trigger entity scanning in the specified package; this is
rather the job of DefaultPersistenceUnitManager.setPackagesToScan(java.lang.String...)
.
SmartPersistenceUnitInfo.getManagedPackages()
,
addManagedClassName(java.lang.String)
public List<String> getManagedPackages()
SmartPersistenceUnitInfo
PersistenceUnitInfo.getManagedClassNames()
.getManagedPackages
in interface SmartPersistenceUnitInfo
public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
public boolean excludeUnlistedClasses()
excludeUnlistedClasses
in interface PersistenceUnitInfo
public void setSharedCacheMode(SharedCacheMode sharedCacheMode)
public SharedCacheMode getSharedCacheMode()
getSharedCacheMode
in interface PersistenceUnitInfo
public void setValidationMode(ValidationMode validationMode)
public ValidationMode getValidationMode()
getValidationMode
in interface PersistenceUnitInfo
public void setProperties(Properties properties)
public Properties getProperties()
getProperties
in interface PersistenceUnitInfo
public void setPersistenceXMLSchemaVersion(String persistenceXMLSchemaVersion)
public String getPersistenceXMLSchemaVersion()
getPersistenceXMLSchemaVersion
in interface PersistenceUnitInfo
public void setPersistenceProviderPackageName(String persistenceProviderPackageName)
SmartPersistenceUnitInfo
public String getPersistenceProviderPackageName()
public ClassLoader getClassLoader()
getClassLoader
in interface PersistenceUnitInfo
ClassUtils.getDefaultClassLoader()
public void addTransformer(ClassTransformer classTransformer)
addTransformer
in interface PersistenceUnitInfo
public ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface PersistenceUnitInfo