|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.jpa.JpaUnit
public abstract class JpaUnit
A javax.persistence.spi.PersistenceUnitInfo
implementor used by Cayenne
JPA provider.
Field Summary | |
---|---|
protected ClassLoader |
classLoader
|
protected String |
description
|
protected boolean |
excludeUnlistedClasses
|
protected List<URL> |
jarFileUrls
|
protected List<String> |
managedClassNames
|
protected List<String> |
mappingFileNames
|
protected String |
persistenceUnitName
|
protected URL |
persistenceUnitRootUrl
|
protected Properties |
properties
|
Constructor Summary | |
---|---|
JpaUnit()
|
Method Summary | |
---|---|
void |
addJarFileUrl(String jarName)
|
void |
addManagedClassName(String managedClassName)
|
void |
addMappingFileName(String mappingFileName)
|
void |
addProperties(Map<?,?> properties)
|
abstract void |
addTransformer(javax.persistence.spi.ClassTransformer transformer)
Adds a ClassTransformer to the persistence unit. |
boolean |
excludeUnlistedClasses()
Returns whether classes not listed in the persistence.xml descriptor file should be excluded from persistence unit. |
ClassLoader |
getClassLoader()
|
String |
getDescription()
|
List<URL> |
getJarFileUrls()
|
DataSource |
getJtaDataSource()
|
List<String> |
getManagedClassNames()
|
List<String> |
getMappingFileNames()
|
ClassLoader |
getNewTempClassLoader()
Creates and returns a child of the main unit ClassLoader. |
DataSource |
getNonJtaDataSource()
|
String |
getPersistenceProviderClassName()
|
String |
getPersistenceUnitName()
|
URL |
getPersistenceUnitRootUrl()
|
Properties |
getProperties()
|
javax.persistence.spi.PersistenceUnitTransactionType |
getTransactionType()
|
void |
putProperty(String key,
String value)
|
void |
setClassLoader(ClassLoader classLoader)
Sets new "main" ClassLoader of this unit. |
protected void |
setDefaultClassLoader()
|
void |
setDescription(String description)
|
void |
setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
|
void |
setPersistenceUnitName(String persistenceUnitName)
|
void |
setPersistenceUnitRootUrl(URL persistenceUnitRootUrl)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String persistenceUnitName
protected List<String> mappingFileNames
protected List<URL> jarFileUrls
protected List<String> managedClassNames
protected URL persistenceUnitRootUrl
protected boolean excludeUnlistedClasses
protected Properties properties
protected String description
protected ClassLoader classLoader
Constructor Detail |
---|
public JpaUnit()
Method Detail |
---|
public String getPersistenceUnitName()
getPersistenceUnitName
in interface javax.persistence.spi.PersistenceUnitInfo
public String getPersistenceProviderClassName()
getPersistenceProviderClassName
in interface javax.persistence.spi.PersistenceUnitInfo
public abstract void addTransformer(javax.persistence.spi.ClassTransformer transformer)
ClassTransformer
to the persistence unit.
addTransformer
in interface javax.persistence.spi.PersistenceUnitInfo
transformer
- A provider-supplied transformer that the Container invokes at
class-(re)definition timepublic javax.persistence.spi.PersistenceUnitTransactionType getTransactionType()
getTransactionType
in interface javax.persistence.spi.PersistenceUnitInfo
public DataSource getJtaDataSource()
getJtaDataSource
in interface javax.persistence.spi.PersistenceUnitInfo
public DataSource getNonJtaDataSource()
getNonJtaDataSource
in interface javax.persistence.spi.PersistenceUnitInfo
public List<String> getMappingFileNames()
getMappingFileNames
in interface javax.persistence.spi.PersistenceUnitInfo
public List<URL> getJarFileUrls()
getJarFileUrls
in interface javax.persistence.spi.PersistenceUnitInfo
public URL getPersistenceUnitRootUrl()
getPersistenceUnitRootUrl
in interface javax.persistence.spi.PersistenceUnitInfo
public List<String> getManagedClassNames()
getManagedClassNames
in interface javax.persistence.spi.PersistenceUnitInfo
public boolean excludeUnlistedClasses()
excludeUnlistedClasses
in interface javax.persistence.spi.PersistenceUnitInfo
public Properties getProperties()
getProperties
in interface javax.persistence.spi.PersistenceUnitInfo
public ClassLoader getClassLoader()
getClassLoader
in interface javax.persistence.spi.PersistenceUnitInfo
public ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface javax.persistence.spi.PersistenceUnitInfo
public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
public void addJarFileUrl(String jarName)
public void setPersistenceUnitName(String persistenceUnitName)
public void setClassLoader(ClassLoader classLoader)
protected void setDefaultClassLoader()
public void addManagedClassName(String managedClassName)
public void addMappingFileName(String mappingFileName)
public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl)
public void addProperties(Map<?,?> properties)
public void putProperty(String key, String value)
public String getDescription()
public void setDescription(String description)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |