Package org.hibernate.jpa.boot.internal
Class ParsedPersistenceXmlDescriptor
java.lang.Object
org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor
- All Implemented Interfaces:
PersistenceUnitDescriptor
Describes the information gleaned from a
<persistence-unit/>
element in a persistence.xml file whether parsed directly by
Hibernate or passed to us by an EE container as an instance of
PersistenceUnitInfo.
Easier to consolidate both views into a single contract and extract information through that shared contract.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClasses(String... classes) voidaddClasses(List<String> classes) voidaddJarFileUrl(URL jarFileUrl) voidaddJarFileUrls(List<String> jarFiles) voidaddMappingFiles(String... mappingFiles) voidaddMappingFiles(List<String> mappingFiles) getName()Get the persistence unit name,Get the root url for the persistence unit.Get the explicitly specified provider class name, ornullif not specified.booleanEssentially should scanning for classes be performed? If not, the list of classes available is limited to: classes listed inPersistenceUnitDescriptor.getManagedClassNames()classes named in allPersistenceUnitDescriptor.getMappingFileNames()classes discovered inPersistenceUnitDescriptor.getJarFileUrls()booleanIs the use of quoted identifiers in effect for this whole persistence unit?voidpushClassTransformer(EnhancementContext enhancementContext) voidsetExcludeUnlistedClasses(boolean excludeUnlistedClasses) voidsetJtaDataSource(Object jtaDataSource) voidvoidsetNonJtaDataSource(Object nonJtaDataSource) voidsetProviderClassName(String providerClassName) voidsetSharedCacheMode(SharedCacheMode sharedCacheMode) voidsetSharedCacheMode(String sharedCacheMode) voidsetTransactionType(PersistenceUnitTransactionType transactionType) voidsetUseQuotedIdentifiers(boolean useQuotedIdentifiers) voidsetValidationMode(ValidationMode validationMode) voidsetValidationMode(String validationMode)
-
Constructor Details
-
ParsedPersistenceXmlDescriptor
-
-
Method Details
-
getPersistenceUnitRootUrl
Description copied from interface:PersistenceUnitDescriptorGet the root url for the persistence unit. Intended to describe the base for scanning.- Specified by:
getPersistenceUnitRootUrlin interfacePersistenceUnitDescriptor- Returns:
- The root url
-
getName
Description copied from interface:PersistenceUnitDescriptorGet the persistence unit name,- Specified by:
getNamein interfacePersistenceUnitDescriptor- Returns:
- The persistence unit name,
-
setName
-
getNonJtaDataSource
- Specified by:
getNonJtaDataSourcein interfacePersistenceUnitDescriptor
-
setNonJtaDataSource
-
getJtaDataSource
- Specified by:
getJtaDataSourcein interfacePersistenceUnitDescriptor
-
setJtaDataSource
-
getProviderClassName
Description copied from interface:PersistenceUnitDescriptorGet the explicitly specified provider class name, ornullif not specified.- Specified by:
getProviderClassNamein interfacePersistenceUnitDescriptor- Returns:
- The specified provider class name
-
setProviderClassName
-
getPersistenceUnitTransactionType
- Specified by:
getPersistenceUnitTransactionTypein interfacePersistenceUnitDescriptor
-
getTransactionType
- Specified by:
getTransactionTypein interfacePersistenceUnitDescriptor
-
setTransactionType
-
isUseQuotedIdentifiers
public boolean isUseQuotedIdentifiers()Description copied from interface:PersistenceUnitDescriptorIs the use of quoted identifiers in effect for this whole persistence unit?- Specified by:
isUseQuotedIdentifiersin interfacePersistenceUnitDescriptor- Returns:
trueis quoted identifiers should be used throughout the unit.
-
setUseQuotedIdentifiers
public void setUseQuotedIdentifiers(boolean useQuotedIdentifiers) -
getProperties
- Specified by:
getPropertiesin interfacePersistenceUnitDescriptor
-
isExcludeUnlistedClasses
public boolean isExcludeUnlistedClasses()Description copied from interface:PersistenceUnitDescriptorEssentially should scanning for classes be performed? If not, the list of classes available is limited to:- classes listed in
PersistenceUnitDescriptor.getManagedClassNames() - classes named in all
PersistenceUnitDescriptor.getMappingFileNames() - classes discovered in
PersistenceUnitDescriptor.getJarFileUrls()
- Specified by:
isExcludeUnlistedClassesin interfacePersistenceUnitDescriptor- Returns:
trueif the root url should not be scanned for classes.
- classes listed in
-
setExcludeUnlistedClasses
public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses) -
getValidationMode
- Specified by:
getValidationModein interfacePersistenceUnitDescriptor
-
setValidationMode
-
setValidationMode
-
getManagedClassNames
- Specified by:
getManagedClassNamesin interfacePersistenceUnitDescriptor
-
addClasses
-
addClasses
-
getMappingFileNames
- Specified by:
getMappingFileNamesin interfacePersistenceUnitDescriptor
-
addMappingFiles
-
addMappingFiles
-
getJarFileUrls
- Specified by:
getJarFileUrlsin interfacePersistenceUnitDescriptor
-
addJarFileUrl
-
addJarFileUrls
-
getClassLoader
- Specified by:
getClassLoaderin interfacePersistenceUnitDescriptor
-
getTempClassLoader
- Specified by:
getTempClassLoaderin interfacePersistenceUnitDescriptor
-
pushClassTransformer
- Specified by:
pushClassTransformerin interfacePersistenceUnitDescriptor
-
getClassTransformer
- Specified by:
getClassTransformerin interfacePersistenceUnitDescriptor
-