public class PersistenceUnitInfoImpl extends Object implements PersistenceUnitInfo, SourceTracker
PersistenceUnitInfo
interface used by OpenJPA
when parsing persistence configuration information.Modifier and Type | Class and Description |
---|---|
static class |
PersistenceUnitInfoImpl.ClassResolverImpl
Simple class resolver built around the persistence unit loader.
|
Modifier and Type | Field and Description |
---|---|
static String |
PERSISTENCE_VERSION |
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
Constructor and Description |
---|
PersistenceUnitInfoImpl() |
public static final String PERSISTENCE_VERSION
public ClassLoader getClassLoader()
getClassLoader
in interface PersistenceUnitInfo
public ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface PersistenceUnitInfo
public String getPersistenceUnitName()
getPersistenceUnitName
in interface PersistenceUnitInfo
public void setPersistenceUnitName(String emName)
public String getPersistenceProviderClassName()
getPersistenceProviderClassName
in interface PersistenceUnitInfo
public void setPersistenceProviderClassName(String providerClassName)
public PersistenceUnitTransactionType getTransactionType()
getTransactionType
in interface PersistenceUnitInfo
public void setTransactionType(PersistenceUnitTransactionType transType)
public String getJtaDataSourceName()
public void setJtaDataSourceName(String jta)
public DataSource getJtaDataSource()
getJtaDataSource
in interface PersistenceUnitInfo
public void setJtaDataSource(DataSource ds)
public String getNonJtaDataSourceName()
public void setNonJtaDataSourceName(String nonJta)
public DataSource getNonJtaDataSource()
getNonJtaDataSource
in interface PersistenceUnitInfo
public void setNonJtaDataSource(DataSource ds)
public URL getPersistenceUnitRootUrl()
getPersistenceUnitRootUrl
in interface PersistenceUnitInfo
public void setPersistenceUnitRootUrl(URL root)
public boolean excludeUnlistedClasses()
excludeUnlistedClasses
in interface PersistenceUnitInfo
public void setExcludeUnlistedClasses(boolean excludeUnlisted)
public List<String> getMappingFileNames()
getMappingFileNames
in interface PersistenceUnitInfo
public void addMappingFileName(String name)
public List<URL> getJarFileUrls()
getJarFileUrls
in interface PersistenceUnitInfo
public void addJarFile(URL jar)
public void addJarFileName(String name)
public void processJarFileNames()
public void validateJarFileName(String name)
public List<String> getManagedClassNames()
getManagedClassNames
in interface PersistenceUnitInfo
public void addManagedClassName(String name)
public Properties getProperties()
getProperties
in interface PersistenceUnitInfo
public void addTransformer(ClassTransformer transformer)
addTransformer
in interface PersistenceUnitInfo
public URL getPersistenceXmlFileUrl()
public void setPersistenceXmlFileUrl(URL url)
public void fromUserProperties(Map map)
public Map toOpenJPAProperties()
Map
containing the properties necessary to create
a Configuration
that reflects the information in this
persistence unit info.public static Map toOpenJPAProperties(PersistenceUnitInfo info)
Map
containing the properties necessary to create
a Configuration
that reflects the information in the given
persistence unit info.public File getSourceFile()
SourceTracker
getSourceFile
in interface SourceTracker
public Object getSourceScope()
SourceTracker
getSourceScope
in interface SourceTracker
public int getSourceType()
SourceTracker
getSourceType
in interface SourceTracker
public int getLineNumber()
SourceTracker
getLineNumber
in interface SourceTracker
public int getColNumber()
SourceTracker
getColNumber
in interface SourceTracker
public String getResourceName()
SourceTracker
getResourceName
in interface SourceTracker
public String getPersistenceXMLSchemaVersion()
getPersistenceXMLSchemaVersion
in interface PersistenceUnitInfo
public void setPersistenceXMLSchemaVersion(String version)
public ValidationMode getValidationMode()
getValidationMode
in interface PersistenceUnitInfo
public void setValidationMode(ValidationMode mode)
public SharedCacheMode getSharedCacheMode()
getSharedCacheMode
in interface PersistenceUnitInfo
public void setSharedCacheMode(SharedCacheMode mode)
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.