public class SEPersistenceUnitInfo extends Object implements PersistenceUnitInfo
Modifier and Type | Field and Description |
---|---|
protected boolean |
excludeUnlistedClasses |
protected List<URL> |
jarFileUrls |
protected DataSource |
jtaDataSource |
protected List<String> |
managedClassNames |
protected List<String> |
mappingFiles |
protected DataSource |
nonJtaDataSource |
protected String |
persistenceProviderClassName |
protected String |
persistenceUnitName |
protected URL |
persistenceUnitRootUrl |
protected PersistenceUnitTransactionType |
persistenceUnitTransactionType |
protected Properties |
properties |
protected ClassLoader |
realClassLoader |
protected ClassLoader |
tempClassLoader |
Constructor and Description |
---|
SEPersistenceUnitInfo() |
Modifier and Type | Method and Description |
---|---|
void |
addTransformer(ClassTransformer transformer)
Add a transformer supplied by the provider that will be
called for every new class definition or class redefinition
that gets loaded by the loader returned by the
PersistenceUnitInfo.getClassLoader method.
|
boolean |
excludeUnlistedClasses()
Returns whether classes in the root of the persistence unit that have not
been explicitly listed are to be included in the set of managed
classes.
|
ClassLoader |
getClassLoader()
Returns ClassLoader that the provider may use to load any classes,
resources, or open URLs.
|
Collection<String> |
getJarFiles() |
List<URL> |
getJarFileUrls()
Returns a list of URLs for the jar files or exploded jar
file directories that the persistence provider must examine
for managed classes of the persistence unit.
|
DataSource |
getJtaDataSource()
Returns the JTA-enabled data source to be used by the persistence
provider.
|
List<String> |
getManagedClassNames()
Returns the list of the names of the classes that the persistence
provider must add it to its set of managed classes.
|
List<String> |
getMappingFileNames()
Returns the list of mapping file names that the persistence provider must
load to determine the mappings for the entity classes.
|
ClassLoader |
getNewTempClassLoader()
Return a ClassLoader that the provider may use to temporarily
load any classes, resources, or open URLs.
|
DataSource |
getNonJtaDataSource()
Returns the non-JTA-enabled data source to be used by the persistence
provider for accessing data outside a JTA transaction.
|
String |
getPersistenceProviderClassName()
Returns the fully qualified name of the persistence provider
implementation class.
|
String |
getPersistenceUnitName()
Returns the name of the persistence unit.
|
URL |
getPersistenceUnitRootUrl()
Returns the URL for the jar file or directory that is the
root of the persistence unit.
|
Properties |
getProperties()
Returns properties object.
|
PersistenceUnitTransactionType |
getTransactionType()
Returns the transaction type of the entity managers created by the
EntityManagerFactory.
|
void |
setClassLoader(ClassLoader loader) |
void |
setExcludeUnlistedClasses(boolean excludeUnlistedClasses) |
void |
setJarFileUrls(List<URL> jarFileUrls) |
void |
setJtaDataSource(DataSource jtaDataSource) |
void |
setManagedClassNames(List<String> managedClassNames) |
void |
setMappingFileNames(List<String> mappingFiles) |
void |
setNewTempClassLoader(ClassLoader loader) |
void |
setNonJtaDataSource(DataSource nonJtaDataSource) |
void |
setPersistenceProviderClassName(String persistenceProviderClassName) |
void |
setPersistenceUnitName(String persistenceUnitName) |
void |
setPersistenceUnitRootUrl(URL persistenceUnitRootUrl) |
void |
setProperties(Properties properties) |
void |
setTransactionType(PersistenceUnitTransactionType persistenceUnitTransactionType) |
protected String persistenceUnitName
protected String persistenceProviderClassName
protected DataSource jtaDataSource
protected DataSource nonJtaDataSource
protected PersistenceUnitTransactionType persistenceUnitTransactionType
protected URL persistenceUnitRootUrl
protected boolean excludeUnlistedClasses
protected Properties properties
protected ClassLoader tempClassLoader
protected ClassLoader realClassLoader
public String getPersistenceUnitName()
PersistenceUnitInfo
getPersistenceUnitName
in interface PersistenceUnitInfo
public void setPersistenceUnitName(String persistenceUnitName)
public String getPersistenceProviderClassName()
PersistenceUnitInfo
getPersistenceProviderClassName
in interface PersistenceUnitInfo
public void setPersistenceProviderClassName(String persistenceProviderClassName)
public PersistenceUnitTransactionType getTransactionType()
PersistenceUnitInfo
getTransactionType
in interface PersistenceUnitInfo
public void setTransactionType(PersistenceUnitTransactionType persistenceUnitTransactionType)
public DataSource getJtaDataSource()
PersistenceUnitInfo
getJtaDataSource
in interface PersistenceUnitInfo
public void setJtaDataSource(DataSource jtaDataSource)
public DataSource getNonJtaDataSource()
PersistenceUnitInfo
getNonJtaDataSource
in interface PersistenceUnitInfo
public void setNonJtaDataSource(DataSource nonJtaDataSource)
public List<String> getMappingFileNames()
PersistenceUnitInfo
getMappingFileNames
in interface PersistenceUnitInfo
public List<URL> getJarFileUrls()
PersistenceUnitInfo
getJarFileUrls
in interface PersistenceUnitInfo
public URL getPersistenceUnitRootUrl()
PersistenceUnitInfo
getPersistenceUnitRootUrl
in interface PersistenceUnitInfo
public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl)
public List<String> getManagedClassNames()
PersistenceUnitInfo
getManagedClassNames
in interface PersistenceUnitInfo
public boolean excludeUnlistedClasses()
PersistenceUnitInfo
excludeUnlistedClasses
in interface PersistenceUnitInfo
public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
public Properties getProperties()
PersistenceUnitInfo
getProperties
in interface PersistenceUnitInfo
public void setProperties(Properties properties)
public ClassLoader getClassLoader()
PersistenceUnitInfo
getClassLoader
in interface PersistenceUnitInfo
public void addTransformer(ClassTransformer transformer)
addTransformer
in interface PersistenceUnitInfo
transformer
- A provider-supplied transformer that the
Container invokes at class-(re)definition timepublic ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface PersistenceUnitInfo
public void setNewTempClassLoader(ClassLoader loader)
public void setClassLoader(ClassLoader loader)
public Collection<String> getJarFiles()
Copyright © 2023. All rights reserved.