public class PersistenceUnitManager extends java.lang.Object implements PersistenceUnitInfo
Modifier and Type | Class and Description |
---|---|
class |
PersistenceUnitManager.PropertiesConfig |
static class |
PersistenceUnitManager.PropertyConfig |
static class |
PersistenceUnitManager.TransformerAdapter |
Modifier and Type | Method and Description |
---|---|
void |
addClass(java.lang.String className) |
void |
addJarFile(java.lang.String jarFile) |
void |
addMappingFile(java.lang.String fileName) |
void |
addTransformer(ClassTransformer transformer)
Adds a class transformer.
|
PersistenceUnitManager.PropertiesConfig |
createProperties() |
boolean |
excludeUnlistedClasses()
Returns true if only listed classes are allowed.
|
java.lang.ClassLoader |
getClassLoader()
Returns the classloader the provider should use to load classes,
resources or URLs.
|
EntityManagerFactory |
getEntityManagerFactoryDelegate()
Create or return the provider's EntityManagerFactory
|
java.util.List<java.net.URL> |
getJarFileUrls()
Returns the list of jars for the managed classes.
|
javax.sql.DataSource |
getJtaDataSource()
Returns the jta-enabled data source.
|
java.util.List<java.lang.String> |
getManagedClassNames()
Returns the list of managed classes.
|
java.util.List<java.lang.String> |
getMappingFileNames()
Returns the mapping file names.
|
java.lang.String |
getName() |
java.lang.ClassLoader |
getNewTempClassLoader()
Returns a temporary class loader.
|
javax.sql.DataSource |
getNonJtaDataSource()
Returns the non-jta-enabled data source.
|
java.lang.String |
getPersistenceProviderClassName()
Returns the full class name of the persistence provider.
|
java.lang.String |
getPersistenceUnitName()
Returns the name.
|
java.net.URL |
getPersistenceUnitRootUrl()
Returns the root persistence unit.
|
java.lang.String |
getPersistenceXMLSchemaVersion() |
java.util.Properties |
getProperties()
Returns a properties object.
|
java.lang.Class<?> |
getProvider() |
java.net.URL |
getRoot()
The root URL of the persistence .jar or classes directory.
|
SharedCacheMode |
getSharedCacheMode() |
PersistenceUnitTransactionType |
getTransactionType()
Returns the transaction handling.
|
ValidationMode |
getValidationMode() |
void |
setConfigLocation(java.lang.String location) |
void |
setDescription(java.lang.String description) |
void |
setExcludeUnlistedClasses(boolean isExclude) |
void |
setJtaDataSource(java.lang.String name) |
void |
setJtaDataSourceValue(javax.sql.DataSource dataSource) |
void |
setNonJtaDataSource(java.lang.String name) |
void |
setNonJtaDataSourceValue(javax.sql.DataSource dataSource) |
void |
setProvider(java.lang.Class<PersistenceProvider> cl) |
void |
setRoot(java.net.URL url)
The root URL of the persistence .jar or classes directory.
|
void |
setSharedCacheMode(java.lang.String mode) |
void |
setValidationMode(java.lang.String mode) |
void |
setVersion(java.lang.String version)
Sets the schema version.
|
java.lang.String |
toString() |
public java.lang.String getName()
public void setConfigLocation(java.lang.String location)
public void setVersion(java.lang.String version)
public java.net.URL getRoot()
public void setRoot(java.net.URL url)
public void setDescription(java.lang.String description)
public java.lang.Class<?> getProvider()
public void setProvider(java.lang.Class<PersistenceProvider> cl)
public void addClass(java.lang.String className)
public void setExcludeUnlistedClasses(boolean isExclude)
public void addMappingFile(java.lang.String fileName)
public void addJarFile(java.lang.String jarFile)
public void setSharedCacheMode(java.lang.String mode)
public void setValidationMode(java.lang.String mode)
public void setJtaDataSource(java.lang.String name)
public void setJtaDataSourceValue(javax.sql.DataSource dataSource)
public void setNonJtaDataSource(java.lang.String name)
public void setNonJtaDataSourceValue(javax.sql.DataSource dataSource)
public PersistenceUnitManager.PropertiesConfig createProperties()
public EntityManagerFactory getEntityManagerFactoryDelegate()
public java.lang.String getPersistenceUnitName()
PersistenceUnitInfo
getPersistenceUnitName
in interface PersistenceUnitInfo
public java.lang.String getPersistenceXMLSchemaVersion()
getPersistenceXMLSchemaVersion
in interface PersistenceUnitInfo
public java.net.URL getPersistenceUnitRootUrl()
PersistenceUnitInfo
getPersistenceUnitRootUrl
in interface PersistenceUnitInfo
public java.lang.String getPersistenceProviderClassName()
PersistenceUnitInfo
getPersistenceProviderClassName
in interface PersistenceUnitInfo
public java.lang.ClassLoader getClassLoader()
PersistenceUnitInfo
getClassLoader
in interface PersistenceUnitInfo
public java.util.List<java.lang.String> getManagedClassNames()
PersistenceUnitInfo
getManagedClassNames
in interface PersistenceUnitInfo
public boolean excludeUnlistedClasses()
PersistenceUnitInfo
excludeUnlistedClasses
in interface PersistenceUnitInfo
public java.util.List<java.net.URL> getJarFileUrls()
PersistenceUnitInfo
getJarFileUrls
in interface PersistenceUnitInfo
public java.util.List<java.lang.String> getMappingFileNames()
PersistenceUnitInfo
getMappingFileNames
in interface PersistenceUnitInfo
public SharedCacheMode getSharedCacheMode()
getSharedCacheMode
in interface PersistenceUnitInfo
public PersistenceUnitTransactionType getTransactionType()
PersistenceUnitInfo
getTransactionType
in interface PersistenceUnitInfo
public ValidationMode getValidationMode()
getValidationMode
in interface PersistenceUnitInfo
public javax.sql.DataSource getJtaDataSource()
PersistenceUnitInfo
getJtaDataSource
in interface PersistenceUnitInfo
public javax.sql.DataSource getNonJtaDataSource()
PersistenceUnitInfo
getNonJtaDataSource
in interface PersistenceUnitInfo
public java.util.Properties getProperties()
PersistenceUnitInfo
getProperties
in interface PersistenceUnitInfo
public void addTransformer(ClassTransformer transformer)
addTransformer
in interface PersistenceUnitInfo
public java.lang.ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface PersistenceUnitInfo
public java.lang.String toString()
toString
in class java.lang.Object