Package org.datanucleus.metadata
Class PersistenceUnitMetaData
- java.lang.Object
- 
- org.datanucleus.metadata.MetaData
- 
- org.datanucleus.metadata.PersistenceUnitMetaData
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class PersistenceUnitMetaData extends MetaData MetaData representation of a "persistence.xml" persistence unit. Corresponds to the JPA spec section 6.2.1- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.datanucleus.metadata.MetaDataEXTENSION_CLASS_CREATETIMESTAMP, EXTENSION_CLASS_CREATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_CREATEUSER, EXTENSION_CLASS_CREATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_CREATEUSER_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_MULTITENANT, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_UPDATETIMESTAMP, EXTENSION_CLASS_UPDATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_UPDATEUSER, EXTENSION_CLASS_UPDATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_UPDATEUSER_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_INDEX_COLUMN_ORDERING, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_ATTACH, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_CREATE_TIMESTAMP, EXTENSION_MEMBER_CREATE_USER, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATE_TIMESTAMP, EXTENSION_MEMBER_UPDATE_USER, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, metaDataState, parent, VENDOR_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description PersistenceUnitMetaData(String name, String transactionType, URI rootURI)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClassName(String className)voidaddClassNames(Set<String> classNames)voidaddJarFile(String jarName)voidaddJarFile(URL jarURL)Method to add a jar file to the persistence unit.voidaddJarFiles(Set<String> jarNames)voidaddMappingFile(String mappingFile)voidaddProperty(String key, String value)voidclearJarFiles()Convenience method to clear out all jar files.Set<String>getClassNames()StringgetDescription()booleangetExcludeUnlistedClasses()SetgetJarFiles()Accessor for the jar files for this persistence unit.StringgetJtaDataSource()Set<String>getMappingFiles()StringgetName()StringgetNonJtaDataSource()PropertiesgetProperties()StringgetProvider()URIgetRootURI()Accessor for the persistence unit root.StringgetSharedCacheMode()Accessor for the persistence unit shared cache mode.TransactionTypegetTransactionType()StringgetValidationMode()Accessor to the Validation ModevoidsetDescription(String desc)voidsetExcludeUnlistedClasses(boolean flag)voidsetJtaDataSource(String data)voidsetNonJtaDataSource(String data)voidsetProvider(String provider)voidsetSharedCacheMode(String cache)Mutator for the shared cache mode.voidsetTransactionType(String transType)voidsetValidationMode(String validationMode)Mutator for the validation modeStringtoString(String prefix, String indent)Returns a string representation of the object using a prefix This can be used as part of a facility to output a MetaData file.- 
Methods inherited from class org.datanucleus.metadata.MetaDataaddExtension, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setParent
 
- 
 
- 
- 
- 
Method Detail- 
getNamepublic String getName() 
 - 
getRootURIpublic URI getRootURI() Accessor for the persistence unit root.- Returns:
- Root of the persistence unit
 
 - 
setTransactionTypepublic void setTransactionType(String transType) 
 - 
getTransactionTypepublic TransactionType getTransactionType() 
 - 
getSharedCacheModepublic String getSharedCacheMode() Accessor for the persistence unit shared cache mode.- Returns:
- Caching policy: ALL, NONE, ENABLE_SELECTIVE, DISABLE_SELECTIVE, UNSPECIFIED.
 
 - 
setSharedCacheModepublic void setSharedCacheMode(String cache) Mutator for the shared cache mode.- Parameters:
- cache- The shared cache mode: ALL, NONE, ENABLE_SELECTIVE, DISABLE_SELECTIVE, UNSPECIFIED.
 
 - 
getDescriptionpublic String getDescription() 
 - 
setDescriptionpublic void setDescription(String desc) 
 - 
getProviderpublic String getProvider() 
 - 
setProviderpublic void setProvider(String provider) 
 - 
getJtaDataSourcepublic String getJtaDataSource() 
 - 
setJtaDataSourcepublic void setJtaDataSource(String data) 
 - 
getNonJtaDataSourcepublic String getNonJtaDataSource() 
 - 
setNonJtaDataSourcepublic void setNonJtaDataSource(String data) 
 - 
setValidationModepublic void setValidationMode(String validationMode) Mutator for the validation mode- Parameters:
- validationMode- AUTO, CALLBACK or NONE
 
 - 
getValidationModepublic String getValidationMode() Accessor to the Validation Mode- Returns:
- AUTO, CALLBACK or NONE
 
 - 
setExcludeUnlistedClassespublic void setExcludeUnlistedClasses(boolean flag) 
 - 
getExcludeUnlistedClassespublic boolean getExcludeUnlistedClasses() 
 - 
addClassNamepublic void addClassName(String className) 
 - 
addJarFilepublic void addJarFile(String jarName) 
 - 
addJarFilepublic void addJarFile(URL jarURL) Method to add a jar file to the persistence unit.- Parameters:
- jarURL- Jar file URL
 
 - 
clearJarFilespublic void clearJarFiles() Convenience method to clear out all jar files.
 - 
addMappingFilepublic void addMappingFile(String mappingFile) 
 - 
getJarFilespublic Set getJarFiles() Accessor for the jar files for this persistence unit. The contents of the Set may be Strings (the names) or URLs- Returns:
- The jar names
 
 - 
getPropertiespublic Properties getProperties() 
 
- 
 
-