ShrinkWrap Descriptors Generated Java EE API 2.0.0-alpha-3

org.jboss.shrinkwrap.descriptor.api.persistence10
Interface PersistenceDescriptor

All Superinterfaces:
Descriptor, DescriptorNamespace<PersistenceDescriptor>

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);

Since:
Generation date :2012-05-09T23:45:03.702-07:00
Author:
Ralf Battenfeld, Andrew Lee Rubinger

Method Summary
 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
 
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

getOrCreatePersistenceUnit

PersistenceUnit<PersistenceDescriptor> getOrCreatePersistenceUnit()
If not already created, a new persistence-unit element will be created and returned. Otherwise, the first existing persistence-unit element will be returned.

Returns:
the instance defined for the element persistence-unit

createPersistenceUnit

PersistenceUnit<PersistenceDescriptor> createPersistenceUnit()
Creates a new persistence-unit element

Returns:
the new created instance of PersistenceUnit

getAllPersistenceUnit

List<PersistenceUnit<PersistenceDescriptor>> getAllPersistenceUnit()
Returns all persistence-unit elements

Returns:
list of persistence-unit

removeAllPersistenceUnit

PersistenceDescriptor removeAllPersistenceUnit()
Removes all persistence-unit elements

Returns:
the current instance of PersistenceUnit

version

PersistenceDescriptor version(String version)
Sets the version attribute

Parameters:
version - the value for the attribute version
Returns:
the current instance of PersistenceDescriptor

getVersion

String getVersion()
Returns the version attribute

Returns:
the value defined for the attribute version

removeVersion

PersistenceDescriptor removeVersion()
Removes the version attribute

Returns:
the current instance of PersistenceDescriptor

ShrinkWrap Descriptors Generated Java EE API 2.0.0-alpha-3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.