|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.PersistenceUnitInfoImpl
public class PersistenceUnitInfoImpl
Implementation of the PersistenceUnitInfo
interface used by OpenJPA
when parsing persistence configuration information.
Nested Class Summary | |
---|---|
static class |
PersistenceUnitInfoImpl.ClassResolverImpl
Simple class resolver built around the persistence unit loader. |
Field Summary | |
---|---|
static String |
KEY_PROVIDER
|
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker |
---|
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML |
Constructor Summary | |
---|---|
PersistenceUnitInfoImpl()
|
Method Summary | |
---|---|
void |
addJarFile(URL jar)
|
void |
addJarFileName(String name)
|
void |
addManagedClassName(String name)
|
void |
addMappingFileName(String name)
|
void |
addTransformer(ClassTransformer transformer)
|
boolean |
excludeUnlistedClasses()
|
void |
fromUserProperties(Map map)
Load the given user-supplied map of properties into this persistence unit. |
ClassLoader |
getClassLoader()
|
int |
getColNumber()
Return the column number in the line of the file at which this instance was parsed. |
List<URL> |
getJarFileUrls()
|
DataSource |
getJtaDataSource()
|
String |
getJtaDataSourceName()
|
int |
getLineNumber()
Return the line number of the file at which this instance was parsed. |
List<String> |
getManagedClassNames()
|
List<String> |
getMappingFileNames()
|
ClassLoader |
getNewTempClassLoader()
|
DataSource |
getNonJtaDataSource()
|
String |
getNonJtaDataSourceName()
|
String |
getPersistenceProviderClassName()
|
String |
getPersistenceUnitName()
|
URL |
getPersistenceUnitRootUrl()
|
URL |
getPersistenceXmlFileUrl()
The location of the persistence.xml resource. |
Properties |
getProperties()
|
String |
getResourceName()
Return the domain-meaningful name of the resource that was loaded from this source. |
File |
getSourceFile()
Return the file from which this instance was parsed. |
Object |
getSourceScope()
Return the domain-dependent scope of this instance within its file. |
int |
getSourceType()
Return the type of source. |
PersistenceUnitTransactionType |
getTransactionType()
|
void |
setExcludeUnlistedClasses(boolean excludeUnlisted)
|
void |
setJtaDataSource(DataSource ds)
|
void |
setJtaDataSourceName(String jta)
|
void |
setNonJtaDataSource(DataSource ds)
|
void |
setNonJtaDataSourceName(String nonJta)
|
void |
setPersistenceProviderClassName(String providerClassName)
|
void |
setPersistenceUnitName(String emName)
|
void |
setPersistenceUnitRootUrl(URL root)
|
void |
setPersistenceXmlFileUrl(URL url)
The location of the persistence.xml resource. |
void |
setProperty(String key,
String value)
|
void |
setTransactionType(PersistenceUnitTransactionType transType)
|
Map |
toOpenJPAProperties()
Return a Map containing the properties necessary to create
a Configuration that reflects the information in this
persistence unit info. |
static Map |
toOpenJPAProperties(PersistenceUnitInfo info)
Return a Map containing the properties necessary to create
a Configuration that reflects the information in the given
persistence unit info. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_PROVIDER
Constructor Detail |
---|
public PersistenceUnitInfoImpl()
Method Detail |
---|
public ClassLoader getClassLoader()
public ClassLoader getNewTempClassLoader()
public String getPersistenceUnitName()
public void setPersistenceUnitName(String emName)
public String getPersistenceProviderClassName()
public void setPersistenceProviderClassName(String providerClassName)
public PersistenceUnitTransactionType getTransactionType()
public void setTransactionType(PersistenceUnitTransactionType transType)
public String getJtaDataSourceName()
public void setJtaDataSourceName(String jta)
public DataSource getJtaDataSource()
public void setJtaDataSource(DataSource ds)
public String getNonJtaDataSourceName()
public void setNonJtaDataSourceName(String nonJta)
public DataSource getNonJtaDataSource()
public void setNonJtaDataSource(DataSource ds)
public URL getPersistenceUnitRootUrl()
public void setPersistenceUnitRootUrl(URL root)
public boolean excludeUnlistedClasses()
public void setExcludeUnlistedClasses(boolean excludeUnlisted)
public List<String> getMappingFileNames()
public void addMappingFileName(String name)
public List<URL> getJarFileUrls()
public void addJarFile(URL jar)
public void addJarFileName(String name)
public List<String> getManagedClassNames()
public void addManagedClassName(String name)
public Properties getProperties()
public void setProperty(String key, String value)
public void addTransformer(ClassTransformer transformer)
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |