Package org.apache.tapestry5.jpa
Interface TapestryPersistenceUnitInfo
-
- All Superinterfaces:
- All Known Implementing Classes:
PersistenceUnitInfoImpl
public interface TapestryPersistenceUnitInfo extends
Tapestry's mutable extension of interface used for XML-less configuration of persistence units.- Since:
- 5.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TapestryPersistenceUnitInfo
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.TapestryPersistenceUnitInfo
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.TapestryPersistenceUnitInfo
<?> clazz)
Add a managed class to be used by persistence provider.TapestryPersistenceUnitInfo
className)
Add a managed class name to be used by persistence provider.TapestryPersistenceUnitInfo
fileName)
Add a mapping file to be loaded by the persistence provider to determine the mappings for the entity classes.TapestryPersistenceUnitInfo
name, value)
Add a property.TapestryPersistenceUnitInfo
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.getEntityManagerProperties()
TapestryPersistenceUnitInfo
jtaDataSource)
Set the JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.TapestryPersistenceUnitInfo
nonJtaDataSource)
Set the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.TapestryPersistenceUnitInfo
persistenceProviderClassName)
Set the the fully qualified name of the persistence provider implementation class.TapestryPersistenceUnitInfo
properties)
allows creating an with a default EntityManager properties map.TapestryPersistenceUnitInfo
cacheMode)
Defines how the persistence provider must use a second-level cache for the persistence unit.TapestryPersistenceUnitInfo
transactionType)
Set the transaction type of the entity managers.TapestryPersistenceUnitInfo
validationMode)
Set the validation mode to be used by the persistence provider for the persistence unit.
-
-
-
Method Detail
-
persistenceProviderClassName
persistenceProviderClassName)
Set the the fully qualified name of the persistence provider implementation class. Corresponds to theprovider
element in thepersistence.xml
file.- Parameters:
persistenceProviderClassName
- persistence provider's class name
-
transactionType
transactionType)
Set the transaction type of the entity managers. Corresponds to thetransaction-type
attribute in thepersistence.xml
file.- Parameters:
transactionType
- transition type to set
-
nonJtaDataSource
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-source
element in thepersistence.xml
file.- Parameters:
nonJtaDataSource
- data source to set
-
jtaDataSource
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-source
element in thepersistence.xml
file.- Parameters:
jtaDataSource
- data source to set
-
addManagedClassName
className)
Add a managed class name to be used by persistence provider. Corresponds to a namedclass
element in thepersistence.xml
file.- Parameters:
className
- class name to add- See Also:
addManagedClass(Class)
-
addManagedClass
<?> clazz)
Add a managed class to be used by persistence provider. Corresponds to a namedclass
element in thepersistence.xml
file.- Parameters:
clazz
- class to add- See Also:
addManagedClassName(String)
-
sharedCacheMode
cacheMode)
Defines how the persistence provider must use a second-level cache for the persistence unit. Corresponds to theshared-cache-mode
element in thepersistence.xml
file.- Parameters:
cacheMode
- cache mode to set
-
validationMode
validationMode)
Set the validation mode to be used by the persistence provider for the persistence unit. Corresponds to thevalidation-mode
element in thepersistence.xml
file.- Parameters:
validationMode
- validation mode to set
-
addMappingFileName
fileName)
Add a mapping file to be loaded by the persistence provider to determine the mappings for the entity classes. Corresponds to amapping-file
element in thepersistence.xml
file.- Parameters:
fileName
- mapping file name to add
-
addJarFileUrl
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-file
element in thepersistence.xml
file.- Parameters:
url
- url to add
-
addJarFileUrl
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-file
element in thepersistence.xml
file.- Parameters:
url
- url to add
-
addProperty
name, value)
Add a property. Corresponds to aproperty
element in thepersistence.xml
file.- Parameters:
name
- property's namevalue
- property's value
-
excludeUnlistedClasses
TapestryPersistenceUnitInfo 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-classes
element in thepersistence.xml
file.- Parameters:
exclude
- defines whether to exclude or not
-
setEntityManagerProperties
properties)
allows creating an with a default EntityManager properties map. This operation allows contributing default properties for EntityManager.- Parameters:
properties
- properties to initialize EntityManagerFactory with- Since:
- 5.4
-
getEntityManagerProperties
getEntityManagerProperties()
- Returns:
- Returns the supplied EntityManagerFactory properties. Returns null if not set.
- Since:
- 5.4
-
-