public class OJPAPersistenceUnitInfo extends Object implements javax.persistence.spi.PersistenceUnitInfo
Constructor and Description |
---|
OJPAPersistenceUnitInfo(String unitName,
String transactionType,
URL unitRootUrl,
String xmlSchemaVersion)
Create a new persistence unit with the given name, transaction type, location and defining
bundle
|
Modifier and Type | Method and Description |
---|---|
void |
addClassName(String className) |
void |
addJarFileName(String jarFileName) |
void |
addMappingFileName(String mappingFileName) |
void |
addProperty(String name,
String value) |
void |
addTransformer(javax.persistence.spi.ClassTransformer transformer) |
boolean |
equals(Object obj) |
boolean |
excludeUnlistedClasses() |
ClassLoader |
getClassLoader() |
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() |
javax.persistence.SharedCacheMode |
getSharedCacheMode() |
javax.persistence.spi.PersistenceUnitTransactionType |
getTransactionType() |
javax.persistence.ValidationMode |
getValidationMode() |
int |
hashCode() |
static URL |
initJarFile(String jarFileName) |
static javax.persistence.SharedCacheMode |
initSharedCacheMode(String sharedCacheMode) |
static javax.persistence.spi.PersistenceUnitTransactionType |
initTransactionType(String elementContent)
TODO: init default value In a Java EE environment, if this element is not specified, the
default is JTA.
|
static javax.persistence.ValidationMode |
initValidationMode(String validationMode) |
void |
setExcludeUnlisted(boolean exclude) |
void |
setJtaDataSource(String jtaDataSource) |
void |
setNonJtaDataSource(String nonJtaDataSource) |
void |
setProviderClassName(String providerClassName) |
void |
setSharedCacheMode(String sharedCacheMode) |
void |
setValidationMode(String validationMode) |
String |
toString() |
public OJPAPersistenceUnitInfo(String unitName, String transactionType, URL unitRootUrl, String xmlSchemaVersion)
unitName
- must not be nulltransactionType
- may be nullunitRootUrl
- root of the persistence unitschemaVersion
- The version of the JPA schema used in persistence.xmlpublic void setProviderClassName(String providerClassName)
provider
- public void setJtaDataSource(String jtaDataSource)
jtaDataSource
- public void setNonJtaDataSource(String nonJtaDataSource)
nonJtaDataSource
- public void addMappingFileName(String mappingFileName)
mappingFileName
- public void addJarFileName(String jarFileName)
jarFileName
- public void addClassName(String className)
className
- public void setExcludeUnlisted(boolean exclude)
exclude
- public void setSharedCacheMode(String sharedCacheMode)
sharedCacheMode
- public void setValidationMode(String validationMode)
validationMode
- public String getPersistenceUnitName()
getPersistenceUnitName
in interface javax.persistence.spi.PersistenceUnitInfo
public String getPersistenceProviderClassName()
getPersistenceProviderClassName
in interface javax.persistence.spi.PersistenceUnitInfo
public 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 javax.persistence.SharedCacheMode getSharedCacheMode()
getSharedCacheMode
in interface javax.persistence.spi.PersistenceUnitInfo
public javax.persistence.ValidationMode getValidationMode()
getValidationMode
in interface javax.persistence.spi.PersistenceUnitInfo
public Properties getProperties()
getProperties
in interface javax.persistence.spi.PersistenceUnitInfo
public String getPersistenceXMLSchemaVersion()
getPersistenceXMLSchemaVersion
in interface javax.persistence.spi.PersistenceUnitInfo
public ClassLoader getClassLoader()
getClassLoader
in interface javax.persistence.spi.PersistenceUnitInfo
public void addTransformer(javax.persistence.spi.ClassTransformer transformer)
addTransformer
in interface javax.persistence.spi.PersistenceUnitInfo
public ClassLoader getNewTempClassLoader()
getNewTempClassLoader
in interface javax.persistence.spi.PersistenceUnitInfo
public static javax.persistence.spi.PersistenceUnitTransactionType initTransactionType(String elementContent)
elementContent
- public static javax.persistence.ValidationMode initValidationMode(String validationMode)
public static javax.persistence.SharedCacheMode initSharedCacheMode(String sharedCacheMode)
Copyright © 2009–2020 OrientDB. All rights reserved.