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() |
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(List<String> entityClassNames) |
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()
PersistenceUnitDescriptor
getPersistenceUnitRootUrl
in interface PersistenceUnitDescriptor
public String getName()
PersistenceUnitDescriptor
getName
in interface PersistenceUnitDescriptor
public void setName(String name)
public Object getNonJtaDataSource()
getNonJtaDataSource
in interface PersistenceUnitDescriptor
public void setNonJtaDataSource(Object nonJtaDataSource)
public Object getJtaDataSource()
getJtaDataSource
in interface PersistenceUnitDescriptor
public void setJtaDataSource(Object jtaDataSource)
public String getProviderClassName()
PersistenceUnitDescriptor
null
if not specified.getProviderClassName
in interface PersistenceUnitDescriptor
public void setProviderClassName(String providerClassName)
public javax.persistence.spi.PersistenceUnitTransactionType getTransactionType()
getTransactionType
in interface PersistenceUnitDescriptor
public void setTransactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType)
public boolean isUseQuotedIdentifiers()
PersistenceUnitDescriptor
isUseQuotedIdentifiers
in interface PersistenceUnitDescriptor
true
is quoted identifiers should be used throughout the unit.public void setUseQuotedIdentifiers(boolean useQuotedIdentifiers)
public Properties getProperties()
getProperties
in interface PersistenceUnitDescriptor
public boolean isExcludeUnlistedClasses()
PersistenceUnitDescriptor
PersistenceUnitDescriptor.getManagedClassNames()
PersistenceUnitDescriptor.getMappingFileNames()
PersistenceUnitDescriptor.getJarFileUrls()
isExcludeUnlistedClasses
in interface PersistenceUnitDescriptor
true
if the root url should not be scanned for classes.public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
public javax.persistence.ValidationMode getValidationMode()
getValidationMode
in interface PersistenceUnitDescriptor
public void setValidationMode(String validationMode)
public javax.persistence.SharedCacheMode getSharedCacheMode()
getSharedCacheMode
in interface PersistenceUnitDescriptor
public void setSharedCacheMode(String sharedCacheMode)
public List<String> getManagedClassNames()
getManagedClassNames
in interface PersistenceUnitDescriptor
public void addClasses(String... classes)
public List<String> getMappingFileNames()
getMappingFileNames
in interface PersistenceUnitDescriptor
public void addMappingFiles(String... mappingFiles)
public List<URL> getJarFileUrls()
getJarFileUrls
in interface PersistenceUnitDescriptor
public void addJarFileUrl(URL jarFileUrl)
public ClassLoader getClassLoader()
getClassLoader
in interface PersistenceUnitDescriptor
public void pushClassTransformer(List<String> entityClassNames)
pushClassTransformer
in interface PersistenceUnitDescriptor
Copyright © 2013. All rights reserved.