Package org.apache.tapestry5.jpa
Interface TapestryPersistenceUnitInfo
- 
- All Superinterfaces:
- PersistenceUnitInfo
 - All Known Implementing Classes:
- PersistenceUnitInfoImpl
 
 public interface TapestryPersistenceUnitInfo extends PersistenceUnitInfo Tapestry's mutable extension ofPersistenceUnitInfointerface used for XML-less configuration of persistence units.- Since:
- 5.3
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description TapestryPersistenceUnitInfoaddJarFileUrl(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.TapestryPersistenceUnitInfoaddJarFileUrl(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.TapestryPersistenceUnitInfoaddManagedClass(Class<?> clazz)Add a managed class to be used by persistence provider.TapestryPersistenceUnitInfoaddManagedClassName(String className)Add a managed class name to be used by persistence provider.TapestryPersistenceUnitInfoaddMappingFileName(String fileName)Add a mapping file to be loaded by the persistence provider to determine the mappings for the entity classes.TapestryPersistenceUnitInfoaddProperty(String name, String value)Add a property.TapestryPersistenceUnitInfoexcludeUnlistedClasses(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.MapgetEntityManagerProperties()TapestryPersistenceUnitInfojtaDataSource(String jtaDataSource)Set the JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.TapestryPersistenceUnitInfononJtaDataSource(String nonJtaDataSource)Set the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.TapestryPersistenceUnitInfopersistenceProviderClassName(String persistenceProviderClassName)Set the the fully qualified name of the persistence provider implementation class.TapestryPersistenceUnitInfosetEntityManagerProperties(Map properties)PersistenceProviderallows creating anEntityManagerFactorywith a default EntityManager properties map.TapestryPersistenceUnitInfosharedCacheMode(SharedCacheMode cacheMode)Defines how the persistence provider must use a second-level cache for the persistence unit.TapestryPersistenceUnitInfotransactionType(PersistenceUnitTransactionType transactionType)Set the transaction type of the entity managers.TapestryPersistenceUnitInfovalidationMode(ValidationMode validationMode)Set the validation mode to be used by the persistence provider for the persistence unit.- 
Methods inherited from interface javax.persistence.spi.PersistenceUnitInfoaddTransformer, excludeUnlistedClasses, getClassLoader, getJarFileUrls, getJtaDataSource, getManagedClassNames, getMappingFileNames, getNewTempClassLoader, getNonJtaDataSource, getPersistenceProviderClassName, getPersistenceUnitName, getPersistenceUnitRootUrl, getPersistenceXMLSchemaVersion, getProperties, getSharedCacheMode, getTransactionType, getValidationMode
 
- 
 
- 
- 
- 
Method Detail- 
persistenceProviderClassNameTapestryPersistenceUnitInfo persistenceProviderClassName(String persistenceProviderClassName) Set the the fully qualified name of the persistence provider implementation class. Corresponds to theproviderelement in thepersistence.xmlfile.- Parameters:
- persistenceProviderClassName- persistence provider's class name
 
 - 
transactionTypeTapestryPersistenceUnitInfo transactionType(PersistenceUnitTransactionType transactionType) Set the transaction type of the entity managers. Corresponds to thetransaction-typeattribute in thepersistence.xmlfile.- Parameters:
- transactionType- transition type to set
 
 - 
nonJtaDataSourceTapestryPersistenceUnitInfo nonJtaDataSource(String 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.- Parameters:
- nonJtaDataSource- data source to set
 
 - 
jtaDataSourceTapestryPersistenceUnitInfo jtaDataSource(String 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.- Parameters:
- jtaDataSource- data source to set
 
 - 
addManagedClassNameTapestryPersistenceUnitInfo addManagedClassName(String className) Add a managed class name to be used by persistence provider. Corresponds to a namedclasselement in thepersistence.xmlfile.- Parameters:
- className- class name to add
- See Also:
- addManagedClass(Class)
 
 - 
addManagedClassTapestryPersistenceUnitInfo addManagedClass(Class<?> clazz) Add a managed class to be used by persistence provider. Corresponds to a namedclasselement in thepersistence.xmlfile.- Parameters:
- clazz- class to add
- See Also:
- addManagedClassName(String)
 
 - 
sharedCacheModeTapestryPersistenceUnitInfo sharedCacheMode(SharedCacheMode cacheMode) Defines how the persistence provider must use a second-level cache for the persistence unit. Corresponds to theshared-cache-modeelement in thepersistence.xmlfile.- Parameters:
- cacheMode- cache mode to set
 
 - 
validationModeTapestryPersistenceUnitInfo validationMode(ValidationMode validationMode) Set the validation mode to be used by the persistence provider for the persistence unit. Corresponds to thevalidation-modeelement in thepersistence.xmlfile.- Parameters:
- validationMode- validation mode to set
 
 - 
addMappingFileNameTapestryPersistenceUnitInfo addMappingFileName(String fileName) 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.- Parameters:
- fileName- mapping file name to add
 
 - 
addJarFileUrlTapestryPersistenceUnitInfo 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. Corresponds to ajar-fileelement in thepersistence.xmlfile.- Parameters:
- url- url to add
 
 - 
addJarFileUrlTapestryPersistenceUnitInfo addJarFileUrl(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. Corresponds to ajar-fileelement in thepersistence.xmlfile.- Parameters:
- url- url to add
 
 - 
addPropertyTapestryPersistenceUnitInfo addProperty(String name, String value) Add a property. Corresponds to apropertyelement in thepersistence.xmlfile.- Parameters:
- name- property's name
- value- property's value
 
 - 
excludeUnlistedClassesTapestryPersistenceUnitInfo excludeUnlistedClasses(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. Corresponds to theexclude-unlisted-classeselement in thepersistence.xmlfile.- Parameters:
- exclude- defines whether to exclude or not
 
 - 
setEntityManagerPropertiesTapestryPersistenceUnitInfo setEntityManagerProperties(Map properties) PersistenceProviderallows creating anEntityManagerFactorywith a default EntityManager properties map. This operation allows contributing default properties for EntityManager.- Parameters:
- properties- properties to initialize EntityManagerFactory with
- Since:
- 5.4
 
 - 
getEntityManagerPropertiesMap getEntityManagerProperties() - Returns:
- Returns the supplied EntityManagerFactory properties. Returns null if not set.
- Since:
- 5.4
 
 
- 
 
-