ShrinkWrap Descriptors Generated Java EE API 2.0.0-alpha-3

org.jboss.shrinkwrap.descriptor.api.persistence20
Interface Persistence<T>

All Superinterfaces:
Child<T>

public interface Persistence<T>
extends Child<T>

This interface defines the contract for the persistence xsd type

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

Method Summary
 PersistenceUnit<Persistence<T>> createPersistenceUnit()
          Creates a new persistence-unit element
 List<PersistenceUnit<Persistence<T>>> getAllPersistenceUnit()
          Returns all persistence-unit elements
 PersistenceUnit<Persistence<T>> getOrCreatePersistenceUnit()
          If not already created, a new persistence-unit element will be created and returned.
 String getVersion()
          Returns the version attribute
 Persistence<T> removeAllPersistenceUnit()
          Removes all persistence-unit elements
 Persistence<T> removeVersion()
          Removes the version attribute
 Persistence<T> version(String version)
          Sets the version attribute
 
Methods inherited from interface org.jboss.shrinkwrap.descriptor.api.Child
up
 

Method Detail

getOrCreatePersistenceUnit

PersistenceUnit<Persistence<T>> 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<Persistence<T>> createPersistenceUnit()
Creates a new persistence-unit element

Returns:
the new created instance of PersistenceUnit>

getAllPersistenceUnit

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

Returns:
list of persistence-unit

removeAllPersistenceUnit

Persistence<T> removeAllPersistenceUnit()
Removes all persistence-unit elements

Returns:
the current instance of PersistenceUnit>

version

Persistence<T> version(String version)
Sets the version attribute

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

getVersion

String getVersion()
Returns the version attribute

Returns:
the value defined for the attribute version

removeVersion

Persistence<T> removeVersion()
Removes the version attribute

Returns:
the current instance of Persistence

ShrinkWrap Descriptors Generated Java EE API 2.0.0-alpha-3

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