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.impl.persistence20
Class Persistence20DescriptorImpl

    java.lang.Object
      org.jboss.shrinkwrap.descriptor.spi.DescriptorImplBase
          org.jboss.shrinkwrap.descriptor.spi.NodeProviderImplBase
              org.jboss.shrinkwrap.descriptor.impl.persistence20.Persistence20DescriptorImpl

All Implemented Interfaces:
  org.jboss.shrinkwrap.descriptor.api.Descriptor, org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>, Persistence20Descriptor, org.jboss.shrinkwrap.descriptor.spi.NodeProvider

    public class Persistence20DescriptorImpl

extends org.jboss.shrinkwrap.descriptor.spi.NodeProviderImplBase
implements org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>, 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

Constructor Summary
`Persistence20DescriptorImpl(java.lang.String descriptorName)`
`Persistence20DescriptorImpl(java.lang.String descriptorName, org.jboss.shrinkwrap.descriptor.spi.Node node)`

Method Summary
`Persistence20Descriptor` | `addDefaultNamespaces()`
`Persistence20Descriptor` | `addNamespace(java.lang.String name, java.lang.String value)`
`java.util.List<java.lang.String>` | `getNamespaces()`
`java.util.List<PersistenceUnit<Persistence20Descriptor>>` | `getPersistenceUnitList()` Returns all `persistence-unit` elements
`org.jboss.shrinkwrap.descriptor.spi.Node` | `getRootNode()`
`java.lang.String` | `getVersion()` Returns the `version` element
`PersistenceUnit<Persistence20Descriptor>` | `persistenceUnit()` Returns the `persistence-unit` element
`Persistence20Descriptor` | `removeAllNamespaces()`
`Persistence20Descriptor` | `removeAllPersistenceUnit()` Removes all `persistence-unit` elements
`Persistence20Descriptor` | `removeVersion()` Removes the `version` attribute
`Persistence20Descriptor` | `setVersion(java.lang.String version)` Sets the `version` attribute

Methods inherited from class org.jboss.shrinkwrap.descriptor.spi.NodeProviderImplBase
`exportAsString, exportTo`

Methods inherited from class org.jboss.shrinkwrap.descriptor.spi.DescriptorImplBase
`getDescriptorName`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

Constructor Detail

### Persistence20DescriptorImpl

    public Persistence20DescriptorImpl(java.lang.String descriptorName)

### Persistence20DescriptorImpl

    public Persistence20DescriptorImpl(java.lang.String descriptorName,
                                       org.jboss.shrinkwrap.descriptor.spi.Node node)

Method Detail

### getRootNode

    public org.jboss.shrinkwrap.descriptor.spi.Node getRootNode()

  Specified by:
    `getRootNode` in interface `org.jboss.shrinkwrap.descriptor.spi.NodeProvider`

### addDefaultNamespaces

    public Persistence20Descriptor addDefaultNamespaces()

  Specified by:
    `addDefaultNamespaces` in interface `org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>`

### addNamespace

    public Persistence20Descriptor addNamespace(java.lang.String name,
                                                java.lang.String value)

  Specified by:
    `addNamespace` in interface `org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>`

### getNamespaces

    public java.util.List<java.lang.String> getNamespaces()

  Specified by:
    `getNamespaces` in interface `org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>`

### removeAllNamespaces

    public Persistence20Descriptor removeAllNamespaces()

  Specified by:
    `removeAllNamespaces` in interface `org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<Persistence20Descriptor>`

### removeAllPersistenceUnit

    public Persistence20Descriptor removeAllPersistenceUnit()

  Removes all `persistence-unit` elements

  Specified by:
    `removeAllPersistenceUnit` in interface `Persistence20Descriptor`
  Returns:
    the current instance of `Persistence20Descriptor`

### persistenceUnit

    public PersistenceUnit<Persistence20Descriptor> persistenceUnit()

  Returns the `persistence-unit` element

  Specified by:
    `persistenceUnit` in interface `Persistence20Descriptor`
  Returns:
    the node defined for the element `persistence-unit`

### getPersistenceUnitList

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

  Returns all `persistence-unit` elements

  Specified by:
    `getPersistenceUnitList` in interface `Persistence20Descriptor`
  Returns:
    list of `persistence-unit`

### setVersion

    public Persistence20Descriptor setVersion(java.lang.String version)

  Sets the `version` attribute

  Specified by:
    `setVersion` in interface `Persistence20Descriptor`
  Parameters:
    `version` - the value for the attribute `version`
  Returns:
    the current instance of `Persistence20Descriptor`

### removeVersion

    public Persistence20Descriptor removeVersion()

  Removes the `version` attribute

  Specified by:
    `removeVersion` in interface `Persistence20Descriptor`
  Returns:
    the current instance of `Persistence20Descriptor`

### getVersion

    public java.lang.String getVersion()

  Returns the `version` element

  Specified by:
    `getVersion` in interface `Persistence20Descriptor`
  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