Class PersistenceUnitInfoImpl
java.lang.Object
org.apache.tapestry5.internal.jpa.PersistenceUnitInfoImpl
- All Implemented Interfaces:
javax.persistence.spi.PersistenceUnitInfo,TapestryPersistenceUnitInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddJarFileUrl(String url) Add a URLs for the jar file or exploded jar file directory that the persistence provider must examine for managed classes of the persistence unit.addJarFileUrl(URL url) Add a URLs for the jar file or exploded jar file directory that the persistence provider must examine for managed classes of the persistence unit.addManagedClass(Class<?> clazz) Add a managed class to be used by persistence provider.addManagedClassName(String className) Add a managed class name to be used by persistence provider.addMappingFileName(String fileName) Add a mapping file to be loaded by the persistence provider to determine the mappings for the entity classes.addProperty(String name, String value) Add a property.voidaddTransformer(javax.persistence.spi.ClassTransformer transformer) booleanexcludeUnlistedClasses(boolean exclude) Defines 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.javax.persistence.SharedCacheModejavax.persistence.spi.PersistenceUnitTransactionTypejavax.persistence.ValidationModejtaDataSource(String jtaDataSource) Set the JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.nonJtaDataSource(String nonJtaDataSource) Set the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.persistenceProviderClassName(String persistenceProviderClassName) Set the the fully qualified name of the persistence provider implementation class.setEntityManagerProperties(Map properties) PersistenceProviderallows creating anEntityManagerFactorywith a default EntityManager properties map.voidsetPersistenceXMLSchemaVersion(String version) sharedCacheMode(javax.persistence.SharedCacheMode cacheMode) Defines how the persistence provider must use a second-level cache for the persistence unit.transactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType) Set the transaction type of the entity managers.validationMode(javax.persistence.ValidationMode validationMode) Set the validation mode to be used by the persistence provider for the persistence unit.
-
Constructor Details
-
PersistenceUnitInfoImpl
-
-
Method Details
-
getPersistenceUnitName
- Specified by:
getPersistenceUnitNamein interfacejavax.persistence.spi.PersistenceUnitInfo
-
getPersistenceProviderClassName
- Specified by:
getPersistenceProviderClassNamein interfacejavax.persistence.spi.PersistenceUnitInfo
-
persistenceProviderClassName
public TapestryPersistenceUnitInfo persistenceProviderClassName(String persistenceProviderClassName) Set the the fully qualified name of the persistence provider implementation class. Corresponds to theproviderelement in thepersistence.xmlfile.- Specified by:
persistenceProviderClassNamein interfaceTapestryPersistenceUnitInfo- Parameters:
persistenceProviderClassName- persistence provider's class name
-
getTransactionType
- Specified by:
getTransactionTypein interfacejavax.persistence.spi.PersistenceUnitInfo
-
transactionType
public TapestryPersistenceUnitInfo transactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType) Set the transaction type of the entity managers. Corresponds to thetransaction-typeattribute in thepersistence.xmlfile.- Specified by:
transactionTypein interfaceTapestryPersistenceUnitInfo- Parameters:
transactionType- transition type to set
-
getJtaDataSource
- Specified by:
getJtaDataSourcein interfacejavax.persistence.spi.PersistenceUnitInfo
-
getNonJtaDataSource
- Specified by:
getNonJtaDataSourcein interfacejavax.persistence.spi.PersistenceUnitInfo
-
nonJtaDataSource
Set the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction. Corresponds to the namednon-jta-data-sourceelement in thepersistence.xmlfile.- Specified by:
nonJtaDataSourcein interfaceTapestryPersistenceUnitInfo- Parameters:
nonJtaDataSource- data source to set
-
jtaDataSource
Set the JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction. Corresponds to the namedjta-data-sourceelement in thepersistence.xmlfile.- Specified by:
jtaDataSourcein interfaceTapestryPersistenceUnitInfo- Parameters:
jtaDataSource- data source to set
-
getMappingFileNames
- Specified by:
getMappingFileNamesin interfacejavax.persistence.spi.PersistenceUnitInfo
-
addMappingFileName
Add a mapping file to be loaded by the persistence provider to determine the mappings for the entity classes. Corresponds to amapping-fileelement in thepersistence.xmlfile.- Specified by:
addMappingFileNamein interfaceTapestryPersistenceUnitInfo- Parameters:
fileName- mapping file name to add
-
addJarFileUrl
Add a URLs for the jar file or exploded jar file directory that the persistence provider must examine for managed classes of the persistence unit. Corresponds to ajar-fileelement in thepersistence.xmlfile.- Specified by:
addJarFileUrlin interfaceTapestryPersistenceUnitInfo- Parameters:
url- url to add
-
addJarFileUrl
Add a URLs for the jar file or exploded jar file directory that the persistence provider must examine for managed classes of the persistence unit. Corresponds to ajar-fileelement in thepersistence.xmlfile.- Specified by:
addJarFileUrlin interfaceTapestryPersistenceUnitInfo- Parameters:
url- url to add
-
addProperty
Add a property. Corresponds to apropertyelement in thepersistence.xmlfile.- Specified by:
addPropertyin interfaceTapestryPersistenceUnitInfo- Parameters:
name- property's namevalue- property's value
-
excludeUnlistedClasses
Defines 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. Corresponds to theexclude-unlisted-classeselement in thepersistence.xmlfile.- Specified by:
excludeUnlistedClassesin interfaceTapestryPersistenceUnitInfo- Parameters:
exclude- defines whether to exclude or not
-
getJarFileUrls
- Specified by:
getJarFileUrlsin interfacejavax.persistence.spi.PersistenceUnitInfo
-
getPersistenceUnitRootUrl
- Specified by:
getPersistenceUnitRootUrlin interfacejavax.persistence.spi.PersistenceUnitInfo
-
getManagedClassNames
- Specified by:
getManagedClassNamesin interfacejavax.persistence.spi.PersistenceUnitInfo
-
addManagedClassName
Add a managed class name to be used by persistence provider. Corresponds to a namedclasselement in thepersistence.xmlfile.- Specified by:
addManagedClassNamein interfaceTapestryPersistenceUnitInfo- Parameters:
className- class name to add- See Also:
-
addManagedClass
Add a managed class to be used by persistence provider. Corresponds to a namedclasselement in thepersistence.xmlfile.- Specified by:
addManagedClassin interfaceTapestryPersistenceUnitInfo- Parameters:
clazz- class to add- See Also:
-
excludeUnlistedClasses
- Specified by:
excludeUnlistedClassesin interfacejavax.persistence.spi.PersistenceUnitInfo
-
getValidationMode
- Specified by:
getValidationModein interfacejavax.persistence.spi.PersistenceUnitInfo
-
validationMode
Set the validation mode to be used by the persistence provider for the persistence unit. Corresponds to thevalidation-modeelement in thepersistence.xmlfile.- Specified by:
validationModein interfaceTapestryPersistenceUnitInfo- Parameters:
validationMode- validation mode to set
-
getProperties
- Specified by:
getPropertiesin interfacejavax.persistence.spi.PersistenceUnitInfo
-
getPersistenceXMLSchemaVersion
- Specified by:
getPersistenceXMLSchemaVersionin interfacejavax.persistence.spi.PersistenceUnitInfo
-
setPersistenceXMLSchemaVersion
-
getClassLoader
- Specified by:
getClassLoaderin interfacejavax.persistence.spi.PersistenceUnitInfo
-
addTransformer
- Specified by:
addTransformerin interfacejavax.persistence.spi.PersistenceUnitInfo
-
getNewTempClassLoader
- Specified by:
getNewTempClassLoaderin interfacejavax.persistence.spi.PersistenceUnitInfo
-
setEntityManagerProperties
Description copied from interface:TapestryPersistenceUnitInfoPersistenceProviderallows creating anEntityManagerFactorywith a default EntityManager properties map. This operation allows contributing default properties for EntityManager.- Specified by:
setEntityManagerPropertiesin interfaceTapestryPersistenceUnitInfo- Parameters:
properties- properties to initialize EntityManagerFactory with
-
getEntityManagerProperties
- Specified by:
getEntityManagerPropertiesin interfaceTapestryPersistenceUnitInfo- Returns:
- Returns the supplied EntityManagerFactory properties. Returns null if not set.
-