|
||||||||||
| 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(MetaData parent,
java.lang.String name,
java.lang.String transactionType)
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.util.HashSet |
getClassNames()
Accessor for the class names for this persistence unit. |
java.lang.String |
getDescription()
Accessor for the persistence unit description. |
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. |
TransactionType |
getTransactionType()
Accessor for the persistence unit transaction type |
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 |
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, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceUnitMetaData(MetaData parent,
java.lang.String name,
java.lang.String transactionType)
parent - MetaData of parent elementname - Name of the persistence unittransactionType - Transaction type for this unit| Method Detail |
|---|
public java.lang.String getName()
public TransactionType getTransactionType()
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 setExcludeUnlistedClasses()
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 | |||||||||