|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.metadata.MetaData
org.datanucleus.metadata.PersistenceUnitMetaData
public class PersistenceUnitMetaData
MetaData representation of a "persistence.xml" persistence unit. Corresponds to the JPA spec section 6.2.1
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.metadata.MetaData |
|---|
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD |
| Constructor Summary | |
|---|---|
PersistenceUnitMetaData(java.lang.String name,
java.lang.String transactionType,
java.net.URI rootURI)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addClassName(java.lang.String className)
Method to add a class name to the persistence unit. |
void |
addJarFile(java.lang.String jarName)
Method to add a jar file to the persistence unit. |
void |
addJarFile(java.net.URL jarURL)
Method to add a jar file to the persistence unit. |
void |
addMappingFile(java.lang.String mappingFile)
Method to add a mapping file to the persistence unit. |
void |
addProperty(java.lang.String key,
java.lang.String value)
Method to add a vendor property to the persistence unit. |
void |
clearJarFiles()
Convenience method to clear out all jar files. |
java.lang.String |
getCaching()
Accessor for the persistence unit caching policy. |
java.util.HashSet |
getClassNames()
Accessor for the class names for this persistence unit. |
java.lang.String |
getDescription()
Accessor for the persistence unit description. |
boolean |
getExcludeUnlistedClasses()
Whether we should exclude any unlisted classes from this persistence-unit. |
java.util.HashSet |
getJarFiles()
Accessor for the jar files for this persistence unit. |
java.lang.String |
getJtaDataSource()
Accessor for the persistence unit JTA data source. |
java.util.HashSet |
getMappingFiles()
Accessor for the class names for this persistence unit. |
java.lang.String |
getName()
Accessor for the persistence unit name. |
java.lang.String |
getNonJtaDataSource()
Accessor for the persistence unit non-JTA data source. |
java.util.Properties |
getProperties()
Accessor for the properties for this persistence unit. |
java.lang.String |
getProvider()
Accessor for the persistence unit provider. |
java.net.URI |
getRootURI()
Accessor for the persistence unit root. |
TransactionType |
getTransactionType()
Accessor for the persistence unit transaction type |
java.lang.String |
getValidationMode()
Accessor to the Validation Mode |
void |
setCaching(java.lang.String cache)
Mutator for the unit caching policy |
void |
setDescription(java.lang.String desc)
Mutator for the unit description |
void |
setExcludeUnlistedClasses()
Method to exclude unlisted classes |
void |
setJtaDataSource(java.lang.String data)
Mutator for the unit JTA data source |
void |
setNonJtaDataSource(java.lang.String data)
Mutator for the unit non-JTA data source |
void |
setProvider(java.lang.String provider)
Mutator for the unit provider |
void |
setValidationMode(java.lang.String validationMode)
Mutator for the validation mode |
java.lang.String |
toString(java.lang.String prefix,
java.lang.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.MetaData |
|---|
addExtension, addExtension, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceUnitMetaData(java.lang.String name,
java.lang.String transactionType,
java.net.URI rootURI)
name - Name of the persistence unittransactionType - Transaction type for this unitrootURI - Root of the persistence-unit| Method Detail |
|---|
public java.lang.String getName()
public java.net.URI getRootURI()
public TransactionType getTransactionType()
public java.lang.String getCaching()
public void setCaching(java.lang.String cache)
cache - The caching policy: ALL, NONE, ENABLE_SELECTIVE, DISABLE_SELECTIVE, UNSPECIFIED.public java.lang.String getDescription()
public void setDescription(java.lang.String desc)
desc - The descriptionpublic java.lang.String getProvider()
public void setProvider(java.lang.String provider)
provider - The providerpublic java.lang.String getJtaDataSource()
public void setJtaDataSource(java.lang.String data)
data - The JTA data sourcepublic java.lang.String getNonJtaDataSource()
public void setNonJtaDataSource(java.lang.String data)
data - The non-JTA data sourcepublic void setValidationMode(java.lang.String validationMode)
validationMode - AUTO, CALLBACK or NONEpublic java.lang.String getValidationMode()
public void setExcludeUnlistedClasses()
public boolean getExcludeUnlistedClasses()
public void addClassName(java.lang.String className)
className - Name of the classpublic void addJarFile(java.lang.String jarName)
jarName - Jar file namepublic void addJarFile(java.net.URL jarURL)
jarURL - Jar file URLpublic void clearJarFiles()
public void addMappingFile(java.lang.String mappingFile)
mappingFile - Mapping file name
public void addProperty(java.lang.String key,
java.lang.String value)
key - Property namevalue - Property valuepublic java.util.HashSet getClassNames()
public java.util.HashSet getMappingFiles()
public java.util.HashSet getJarFiles()
public java.util.Properties getProperties()
public java.lang.String toString(java.lang.String prefix,
java.lang.String indent)
toString in class MetaDataprefix - prefix stringindent - indent string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||