public class PersistenceUnitInfoImpl extends Object implements TapestryPersistenceUnitInfo
Constructor and Description |
---|
PersistenceUnitInfoImpl(String persistenceUnitName) |
Modifier and Type | Method and Description |
---|---|
TapestryPersistenceUnitInfo |
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.
|
TapestryPersistenceUnitInfo |
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.
|
TapestryPersistenceUnitInfo |
addManagedClass(Class<?> clazz)
Add a managed class to be used by persistence provider.
|
TapestryPersistenceUnitInfo |
addManagedClassName(String className)
Add a managed class name to be used by persistence provider.
|
TapestryPersistenceUnitInfo |
addMappingFileName(String fileName)
Add a mapping file to be loaded by the persistence provider to determine the mappings for
the entity classes.
|
TapestryPersistenceUnitInfo |
addProperty(String name,
String value)
Add a property.
|
void |
addTransformer(ClassTransformer transformer) |
boolean |
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.
|
ClassLoader |
getClassLoader() |
Map |
getEntityManagerProperties() |
List<URL> |
getJarFileUrls() |
DataSource |
getJtaDataSource() |
List<String> |
getManagedClassNames() |
List<String> |
getMappingFileNames() |
ClassLoader |
getNewTempClassLoader() |
DataSource |
getNonJtaDataSource() |
String |
getPersistenceProviderClassName() |
String |
getPersistenceUnitName() |
URL |
getPersistenceUnitRootUrl() |
String |
getPersistenceXMLSchemaVersion() |
Properties |
getProperties() |
SharedCacheMode |
getSharedCacheMode() |
PersistenceUnitTransactionType |
getTransactionType() |
ValidationMode |
getValidationMode() |
TapestryPersistenceUnitInfo |
jtaDataSource(String jtaDataSource)
Set the JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA
transaction.
|
TapestryPersistenceUnitInfo |
nonJtaDataSource(String nonJtaDataSource)
Set the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA
transaction.
|
TapestryPersistenceUnitInfo |
persistenceProviderClassName(String persistenceProviderClassName)
Set the the fully qualified name of the persistence provider implementation class.
|
TapestryPersistenceUnitInfo |
setEntityManagerProperties(Map properties)
PersistenceProvider allows creating an EntityManagerFactory
with a default EntityManager properties map. |
void |
setPersistenceXMLSchemaVersion(String version) |
TapestryPersistenceUnitInfo |
sharedCacheMode(SharedCacheMode cacheMode)
Defines how the persistence provider must use a second-level cache for the persistence unit.
|
TapestryPersistenceUnitInfo |
transactionType(PersistenceUnitTransactionType transactionType)
Set the transaction type of the entity managers.
|
TapestryPersistenceUnitInfo |
validationMode(ValidationMode validationMode)
Set the validation mode to be used by the persistence provider for the persistence unit.
|
public PersistenceUnitInfoImpl(String persistenceUnitName)
public String getPersistenceUnitName()
getPersistenceUnitName
in interface PersistenceUnitInfo
public String getPersistenceProviderClassName()
getPersistenceProviderClassName
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo persistenceProviderClassName(String persistenceProviderClassName)
provider
element in the persistence.xml
file.persistenceProviderClassName
in interface TapestryPersistenceUnitInfo
persistenceProviderClassName
- persistence provider's class namepublic PersistenceUnitTransactionType getTransactionType()
getTransactionType
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo transactionType(PersistenceUnitTransactionType transactionType)
transaction-type
attribute in the persistence.xml
file.transactionType
in interface TapestryPersistenceUnitInfo
transactionType
- transition type to setpublic DataSource getJtaDataSource()
getJtaDataSource
in interface PersistenceUnitInfo
public DataSource getNonJtaDataSource()
getNonJtaDataSource
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo nonJtaDataSource(String nonJtaDataSource)
non-jta-data-source
element in the
persistence.xml
file.nonJtaDataSource
in interface TapestryPersistenceUnitInfo
nonJtaDataSource
- data source to setpublic TapestryPersistenceUnitInfo jtaDataSource(String jtaDataSource)
jta-data-source
element in the
persistence.xml
file.jtaDataSource
in interface TapestryPersistenceUnitInfo
jtaDataSource
- data source to setpublic List<String> getMappingFileNames()
getMappingFileNames
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo addMappingFileName(String fileName)
mapping-file
element in the persistence.xml
file.addMappingFileName
in interface TapestryPersistenceUnitInfo
fileName
- mapping file name to addpublic TapestryPersistenceUnitInfo addJarFileUrl(URL url)
jar-file
element in the
persistence.xml
file.addJarFileUrl
in interface TapestryPersistenceUnitInfo
url
- url to addpublic TapestryPersistenceUnitInfo addJarFileUrl(String url)
jar-file
element in the
persistence.xml
file.addJarFileUrl
in interface TapestryPersistenceUnitInfo
url
- url to addpublic TapestryPersistenceUnitInfo addProperty(String name, String value)
property
element in the persistence.xml
file.addProperty
in interface TapestryPersistenceUnitInfo
name
- property's namevalue
- property's valuepublic TapestryPersistenceUnitInfo excludeUnlistedClasses(boolean exclude)
exclude-unlisted-classes
element in the persistence.xml
file.excludeUnlistedClasses
in interface TapestryPersistenceUnitInfo
exclude
- defines whether to exclude or notpublic List<URL> getJarFileUrls()
getJarFileUrls
in interface PersistenceUnitInfo
public URL getPersistenceUnitRootUrl()
getPersistenceUnitRootUrl
in interface PersistenceUnitInfo
public List<String> getManagedClassNames()
getManagedClassNames
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo addManagedClassName(String className)
class
element in the persistence.xml
file.addManagedClassName
in interface TapestryPersistenceUnitInfo
className
- class name to addTapestryPersistenceUnitInfo.addManagedClass(Class)
public TapestryPersistenceUnitInfo addManagedClass(Class<?> clazz)
class
element in the persistence.xml
file.addManagedClass
in interface TapestryPersistenceUnitInfo
clazz
- class to addTapestryPersistenceUnitInfo.addManagedClassName(String)
public boolean excludeUnlistedClasses()
excludeUnlistedClasses
in interface PersistenceUnitInfo
public SharedCacheMode getSharedCacheMode()
getSharedCacheMode
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo sharedCacheMode(SharedCacheMode cacheMode)
shared-cache-mode
element in the persistence.xml
file.sharedCacheMode
in interface TapestryPersistenceUnitInfo
cacheMode
- cache mode to setpublic ValidationMode getValidationMode()
getValidationMode
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo validationMode(ValidationMode validationMode)
validation-mode
element in the persistence.xml
file.validationMode
in interface TapestryPersistenceUnitInfo
validationMode
- validation mode to setpublic Properties getProperties()
getProperties
in interface PersistenceUnitInfo
public String getPersistenceXMLSchemaVersion()
getPersistenceXMLSchemaVersion
in interface PersistenceUnitInfo
public void setPersistenceXMLSchemaVersion(String version)
public ClassLoader getClassLoader()
getClassLoader
in interface PersistenceUnitInfo
public void addTransformer(ClassTransformer transformer)
addTransformer
in interface PersistenceUnitInfo
public ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface PersistenceUnitInfo
public TapestryPersistenceUnitInfo setEntityManagerProperties(Map properties)
TapestryPersistenceUnitInfo
PersistenceProvider
allows creating an EntityManagerFactory
with a default EntityManager properties map. This operation allows contributing default properties for
EntityManager.setEntityManagerProperties
in interface TapestryPersistenceUnitInfo
properties
- properties to initialize EntityManagerFactory withpublic Map getEntityManagerProperties()
getEntityManagerProperties
in interface TapestryPersistenceUnitInfo
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.