Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.shrinkwrap.descriptor.api.persistence20
Interface Persistence20Descriptor

All Superinterfaces:
  org.jboss.shrinkwrap.descriptor.api.Descriptor, org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>

All Known Implementing Classes:
  Persistence20DescriptorImpl

    public interface Persistence20Descriptor

extends org.jboss.shrinkwrap.descriptor.api.Descriptor, org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>

This deployment descriptor provides the functionalities as described in the persistence_2_0.xsd specification

Example:

`Persistence20Descriptor descriptor = Descriptors.create(Persistence20Descriptor.class);`

Since:
  Generation date :2011-07-19T22:55:02.759+02:00
Author:
  Ralf Battenfeld

Method Summary
`java.util.List<PersistenceUnit<Persistence20Descriptor>>` | `getPersistenceUnitList()` Returns all `persistence-unit` elements
`java.lang.String` | `getVersion()` Returns the `version` element
`PersistenceUnit<Persistence20Descriptor>` | `persistenceUnit()` Returns the `persistence-unit` element
`Persistence20Descriptor` | `removeAllPersistenceUnit()` Removes all `persistence-unit` elements
`Persistence20Descriptor` | `removeVersion()` Removes the `version` element
`Persistence20Descriptor` | `setVersion(java.lang.String version)` If not already created, a new `version` element with the given value will be created.

Methods inherited from interface org.jboss.shrinkwrap.descriptor.api.Descriptor
`exportAsString, exportTo, getDescriptorName`

Methods inherited from interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace
`addDefaultNamespaces, addNamespace, getNamespaces, removeAllNamespaces`

Method Detail

### removeAllPersistenceUnit

    Persistence20Descriptor removeAllPersistenceUnit()

  Removes all `persistence-unit` elements

  Returns:
    the current instance of `Persistence20Descriptor`

### persistenceUnit

    PersistenceUnit<Persistence20Descriptor> persistenceUnit()

  Returns the `persistence-unit` element

  Returns:
    the node defined for the element `persistence-unit`

### getPersistenceUnitList

    java.util.List<PersistenceUnit<Persistence20Descriptor>> getPersistenceUnitList()

  Returns all `persistence-unit` elements

  Returns:
    list of `persistence-unit`

### setVersion

    Persistence20Descriptor setVersion(java.lang.String version)

  If not already created, a new `version` element with the given value will be created. Otherwise, the existing `version` element will be updated with the given value.

  Returns:
    the current instance of `Persistence20Descriptor`

### removeVersion

    Persistence20Descriptor removeVersion()

  Removes the `version` element

  Returns:
    the current instance of `Persistence20Descriptor`

### getVersion

    java.lang.String getVersion()

  Returns the `version` element

  Returns:
    the node defined for the element `version`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD