public interface PersistenceDescriptor extends Descriptor, DescriptorNamespace<PersistenceDescriptor>
This deployment descriptor provides the functionalities as described in the specification
Example:
PersistenceDescriptor descriptor = Descriptors.create(PersistenceDescriptor.class);
| Modifier and Type | Method and Description |
|---|---|
PersistenceUnit<PersistenceDescriptor> |
createPersistenceUnit()
Creates a new
persistence-unit element |
List<PersistenceUnit<PersistenceDescriptor>> |
getAllPersistenceUnit()
Returns all
persistence-unit elements |
PersistenceUnit<PersistenceDescriptor> |
getOrCreatePersistenceUnit()
If not already created, a new
persistence-unit element will be created and returned. |
String |
getVersion()
Returns the
version attribute |
PersistenceDescriptor |
removeAllPersistenceUnit()
Removes all
persistence-unit elements |
PersistenceDescriptor |
removeVersion()
Removes the
version attribute |
PersistenceDescriptor |
version(String version)
Sets the
version attribute |
exportAsString, exportTo, getDescriptorNameaddDefaultNamespaces, addNamespace, getNamespaces, removeAllNamespacesPersistenceUnit<PersistenceDescriptor> getOrCreatePersistenceUnit()
persistence-unit element will be created and returned.
Otherwise, the first existing persistence-unit element will be returned.persistence-unitPersistenceUnit<PersistenceDescriptor> createPersistenceUnit()
persistence-unit elementPersistenceUnitList<PersistenceUnit<PersistenceDescriptor>> getAllPersistenceUnit()
persistence-unit elementspersistence-unitPersistenceDescriptor removeAllPersistenceUnit()
persistence-unit elementsPersistenceUnitPersistenceDescriptor version(String version)
version attributeversion - the value for the attribute versionPersistenceDescriptorString getVersion()
version attributeversionPersistenceDescriptor removeVersion()
version attributePersistenceDescriptorCopyright © 2016 JBoss by Red Hat. All rights reserved.