public class ParsedPersistenceXmlDescriptor extends Object implements PersistenceUnitDescriptor
<persistence-unit/> element in a persistence.xml file
whether parsed directly by Hibernate or passed to us by an EE container as a
PersistenceUnitInfo.
Easier to consolidate both views into a single contract and extract information through that shared contract.| Constructor and Description |
|---|
ParsedPersistenceXmlDescriptor(URL persistenceUnitRootUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClasses(List<String> classes) |
void |
addClasses(String... classes) |
void |
addJarFileUrl(URL jarFileUrl) |
void |
addMappingFiles(List<String> mappingFiles) |
void |
addMappingFiles(String... mappingFiles) |
ClassLoader |
getClassLoader() |
List<URL> |
getJarFileUrls() |
Object |
getJtaDataSource() |
List<String> |
getManagedClassNames() |
List<String> |
getMappingFileNames() |
String |
getName()
Get the persistence unit name,
|
Object |
getNonJtaDataSource() |
URL |
getPersistenceUnitRootUrl()
Get the root url for the persistence unit.
|
Properties |
getProperties() |
String |
getProviderClassName()
Get the explicitly specified provider class name, or
null if not specified. |
javax.persistence.SharedCacheMode |
getSharedCacheMode() |
ClassLoader |
getTempClassLoader() |
javax.persistence.spi.PersistenceUnitTransactionType |
getTransactionType() |
javax.persistence.ValidationMode |
getValidationMode() |
boolean |
isExcludeUnlistedClasses()
Essentially should scanning for classes be performed?
|
boolean |
isUseQuotedIdentifiers()
Is the use of quoted identifiers in effect for this whole persistence unit?
|
void |
pushClassTransformer(EnhancementContext enhancementContext) |
void |
setExcludeUnlistedClasses(boolean excludeUnlistedClasses) |
void |
setJtaDataSource(Object jtaDataSource) |
void |
setName(String name) |
void |
setNonJtaDataSource(Object nonJtaDataSource) |
void |
setProviderClassName(String providerClassName) |
void |
setSharedCacheMode(String sharedCacheMode) |
void |
setTransactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType) |
void |
setUseQuotedIdentifiers(boolean useQuotedIdentifiers) |
void |
setValidationMode(String validationMode) |
public ParsedPersistenceXmlDescriptor(URL persistenceUnitRootUrl)
public URL getPersistenceUnitRootUrl()
PersistenceUnitDescriptorgetPersistenceUnitRootUrl in interface PersistenceUnitDescriptorpublic String getName()
PersistenceUnitDescriptorgetName in interface PersistenceUnitDescriptorpublic void setName(String name)
public Object getNonJtaDataSource()
getNonJtaDataSource in interface PersistenceUnitDescriptorpublic void setNonJtaDataSource(Object nonJtaDataSource)
public Object getJtaDataSource()
getJtaDataSource in interface PersistenceUnitDescriptorpublic void setJtaDataSource(Object jtaDataSource)
public String getProviderClassName()
PersistenceUnitDescriptornull if not specified.getProviderClassName in interface PersistenceUnitDescriptorpublic void setProviderClassName(String providerClassName)
public javax.persistence.spi.PersistenceUnitTransactionType getTransactionType()
getTransactionType in interface PersistenceUnitDescriptorpublic void setTransactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType)
public boolean isUseQuotedIdentifiers()
PersistenceUnitDescriptorisUseQuotedIdentifiers in interface PersistenceUnitDescriptortrue is quoted identifiers should be used throughout the unit.public void setUseQuotedIdentifiers(boolean useQuotedIdentifiers)
public Properties getProperties()
getProperties in interface PersistenceUnitDescriptorpublic boolean isExcludeUnlistedClasses()
PersistenceUnitDescriptorPersistenceUnitDescriptor.getManagedClassNames()PersistenceUnitDescriptor.getMappingFileNames()PersistenceUnitDescriptor.getJarFileUrls()isExcludeUnlistedClasses in interface PersistenceUnitDescriptortrue if the root url should not be scanned for classes.public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
public javax.persistence.ValidationMode getValidationMode()
getValidationMode in interface PersistenceUnitDescriptorpublic void setValidationMode(String validationMode)
public javax.persistence.SharedCacheMode getSharedCacheMode()
getSharedCacheMode in interface PersistenceUnitDescriptorpublic void setSharedCacheMode(String sharedCacheMode)
public List<String> getManagedClassNames()
getManagedClassNames in interface PersistenceUnitDescriptorpublic void addClasses(String... classes)
public List<String> getMappingFileNames()
getMappingFileNames in interface PersistenceUnitDescriptorpublic void addMappingFiles(String... mappingFiles)
public List<URL> getJarFileUrls()
getJarFileUrls in interface PersistenceUnitDescriptorpublic void addJarFileUrl(URL jarFileUrl)
public ClassLoader getClassLoader()
getClassLoader in interface PersistenceUnitDescriptorpublic ClassLoader getTempClassLoader()
getTempClassLoader in interface PersistenceUnitDescriptorpublic void pushClassTransformer(EnhancementContext enhancementContext)
pushClassTransformer in interface PersistenceUnitDescriptorCopyright © 2016. All rights reserved.