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

All Superinterfaces:
org.jboss.shrinkwrap.descriptor.api.Child<T>
All Known Implementing Classes:
PersistenceUnitImpl

public interface PersistenceUnit<T>
extends org.jboss.shrinkwrap.descriptor.api.Child<T>

This interface defines the contract for the persistence-unit xsd type

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

Method Summary
 java.util.List<java.lang.String> getClazzList()
          Returns all class elements
 java.lang.String getDescription()
          Returns the description element
 java.util.List<java.lang.String> getJarFileList()
          Returns all jar-file elements
 java.lang.String getJtaDataSource()
          Returns the jta-data-source element
 java.util.List<java.lang.String> getMappingFileList()
          Returns all mapping-file elements
 java.lang.String getName()
          Returns the name element
 java.lang.String getNonJtaDataSource()
          Returns the non-jta-data-source element
 java.lang.String getProvider()
          Returns the provider element
 PersistenceUnitCachingType getSharedCacheMode()
          Returns the shared-cache-mode element
 java.lang.String getSharedCacheModeAsString()
          Returns the shared-cache-mode element
 PersistenceUnitTransactionType getTransactionType()
          Returns the transaction-type element
 java.lang.String getTransactionTypeAsString()
          Returns the transaction-type element
 PersistenceUnitValidationModeType getValidationMode()
          Returns the validation-mode element
 java.lang.String getValidationModeAsString()
          Returns the validation-mode element
 java.lang.Boolean isExcludeUnlistedClasses()
          Returns the exclude-unlisted-classes element
 Properties<PersistenceUnit<T>> properties()
          If not already created, a new properties element will be created and returned.
 PersistenceUnit<T> removeAllClazz()
          Removes the class element
 PersistenceUnit<T> removeAllJarFile()
          Removes the jar-file element
 PersistenceUnit<T> removeAllMappingFile()
          Removes the mapping-file element
 PersistenceUnit<T> removeDescription()
          Removes the description element
 PersistenceUnit<T> removeExcludeUnlistedClasses()
          Removes the exclude-unlisted-classes element
 PersistenceUnit<T> removeJtaDataSource()
          Removes the jta-data-source element
 PersistenceUnit<T> removeName()
          Removes the name attribute
 PersistenceUnit<T> removeNonJtaDataSource()
          Removes the non-jta-data-source element
 PersistenceUnit<T> removeProperties()
          Removes the properties element
 PersistenceUnit<T> removeProvider()
          Removes the provider element
 PersistenceUnit<T> removeTransactionType()
          Removes the transaction-type attribute
 PersistenceUnit<T> setClazz(java.lang.String clazz)
          Creates a new class element
 PersistenceUnit<T> setClazzList(java.lang.String... values)
          Creates for all String objects representing class elements, a new class element
 PersistenceUnit<T> setDescription(java.lang.String description)
          If not already created, a new description element with the given value will be created.
 PersistenceUnit<T> setExcludeUnlistedClasses(java.lang.Boolean excludeUnlistedClasses)
          If not already created, a new exclude-unlisted-classes element with the given value will be created.
 PersistenceUnit<T> setJarFile(java.lang.String jarFile)
          Creates a new jar-file element
 PersistenceUnit<T> setJarFileList(java.lang.String... values)
          Creates for all String objects representing jar-file elements, a new jar-file element
 PersistenceUnit<T> setJtaDataSource(java.lang.String jtaDataSource)
          If not already created, a new jta-data-source element with the given value will be created.
 PersistenceUnit<T> setMappingFile(java.lang.String mappingFile)
          Creates a new mapping-file element
 PersistenceUnit<T> setMappingFileList(java.lang.String... values)
          Creates for all String objects representing mapping-file elements, a new mapping-file element
 PersistenceUnit<T> setName(java.lang.String name)
          Sets the name attribute
 PersistenceUnit<T> setNonJtaDataSource(java.lang.String nonJtaDataSource)
          If not already created, a new non-jta-data-source element with the given value will be created.
 PersistenceUnit<T> setProvider(java.lang.String provider)
          If not already created, a new provider element with the given value will be created.
 PersistenceUnit<T> setSharedCacheMode(PersistenceUnitCachingType sharedCacheMode)
          If not already created, a new shared-cache-mode element with the given value will be created.
 PersistenceUnit<T> setSharedCacheMode(java.lang.String sharedCacheMode)
          If not already created, a new shared-cache-mode element with the given value will be created.
 PersistenceUnit<T> setTransactionType(PersistenceUnitTransactionType transactionType)
          Sets the transaction-type attribute
 PersistenceUnit<T> setTransactionType(java.lang.String transactionType)
          Sets the transaction-type attribute
 PersistenceUnit<T> setValidationMode(PersistenceUnitValidationModeType validationMode)
          If not already created, a new validation-mode element with the given value will be created.
 PersistenceUnit<T> setValidationMode(java.lang.String validationMode)
          If not already created, a new validation-mode element with the given value will be created.
 
Methods inherited from interface org.jboss.shrinkwrap.descriptor.api.Child
up
 

Method Detail

setDescription

PersistenceUnit<T> setDescription(java.lang.String description)
If not already created, a new description element with the given value will be created. Otherwise, the existing description element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

removeDescription

PersistenceUnit<T> removeDescription()
Removes the description element

Returns:
the current instance of PersistenceUnit

getDescription

java.lang.String getDescription()
Returns the description element

Returns:
the node defined for the element description

setProvider

PersistenceUnit<T> setProvider(java.lang.String provider)
If not already created, a new provider element with the given value will be created. Otherwise, the existing provider element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

removeProvider

PersistenceUnit<T> removeProvider()
Removes the provider element

Returns:
the current instance of PersistenceUnit

getProvider

java.lang.String getProvider()
Returns the provider element

Returns:
the node defined for the element provider

setJtaDataSource

PersistenceUnit<T> setJtaDataSource(java.lang.String jtaDataSource)
If not already created, a new jta-data-source element with the given value will be created. Otherwise, the existing jta-data-source element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

removeJtaDataSource

PersistenceUnit<T> removeJtaDataSource()
Removes the jta-data-source element

Returns:
the current instance of PersistenceUnit

getJtaDataSource

java.lang.String getJtaDataSource()
Returns the jta-data-source element

Returns:
the node defined for the element jta-data-source

setNonJtaDataSource

PersistenceUnit<T> setNonJtaDataSource(java.lang.String nonJtaDataSource)
If not already created, a new non-jta-data-source element with the given value will be created. Otherwise, the existing non-jta-data-source element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

removeNonJtaDataSource

PersistenceUnit<T> removeNonJtaDataSource()
Removes the non-jta-data-source element

Returns:
the current instance of PersistenceUnit

getNonJtaDataSource

java.lang.String getNonJtaDataSource()
Returns the non-jta-data-source element

Returns:
the node defined for the element non-jta-data-source

setMappingFile

PersistenceUnit<T> setMappingFile(java.lang.String mappingFile)
Creates a new mapping-file element

Returns:
the current instance of PersistenceUnit

setMappingFileList

PersistenceUnit<T> setMappingFileList(java.lang.String... values)
Creates for all String objects representing mapping-file elements, a new mapping-file element

Parameters:
list - of mapping-file objects
Returns:
the current instance of PersistenceUnit

removeAllMappingFile

PersistenceUnit<T> removeAllMappingFile()
Removes the mapping-file element

Returns:
the current instance of PersistenceUnit

getMappingFileList

java.util.List<java.lang.String> getMappingFileList()
Returns all mapping-file elements

Returns:
list of mapping-file

setJarFile

PersistenceUnit<T> setJarFile(java.lang.String jarFile)
Creates a new jar-file element

Returns:
the current instance of PersistenceUnit

setJarFileList

PersistenceUnit<T> setJarFileList(java.lang.String... values)
Creates for all String objects representing jar-file elements, a new jar-file element

Parameters:
list - of jar-file objects
Returns:
the current instance of PersistenceUnit

removeAllJarFile

PersistenceUnit<T> removeAllJarFile()
Removes the jar-file element

Returns:
the current instance of PersistenceUnit

getJarFileList

java.util.List<java.lang.String> getJarFileList()
Returns all jar-file elements

Returns:
list of jar-file

setClazz

PersistenceUnit<T> setClazz(java.lang.String clazz)
Creates a new class element

Returns:
the current instance of PersistenceUnit

setClazzList

PersistenceUnit<T> setClazzList(java.lang.String... values)
Creates for all String objects representing class elements, a new class element

Parameters:
list - of class objects
Returns:
the current instance of PersistenceUnit

removeAllClazz

PersistenceUnit<T> removeAllClazz()
Removes the class element

Returns:
the current instance of PersistenceUnit

getClazzList

java.util.List<java.lang.String> getClazzList()
Returns all class elements

Returns:
list of class

setExcludeUnlistedClasses

PersistenceUnit<T> setExcludeUnlistedClasses(java.lang.Boolean excludeUnlistedClasses)
If not already created, a new exclude-unlisted-classes element with the given value will be created. Otherwise, the existing exclude-unlisted-classes element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

removeExcludeUnlistedClasses

PersistenceUnit<T> removeExcludeUnlistedClasses()
Removes the exclude-unlisted-classes element

Returns:
the current instance of PersistenceUnit

isExcludeUnlistedClasses

java.lang.Boolean isExcludeUnlistedClasses()
Returns the exclude-unlisted-classes element

Returns:
the node defined for the element exclude-unlisted-classes

setSharedCacheMode

PersistenceUnit<T> setSharedCacheMode(PersistenceUnitCachingType sharedCacheMode)
If not already created, a new shared-cache-mode element with the given value will be created. Otherwise, the existing shared-cache-mode element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

setSharedCacheMode

PersistenceUnit<T> setSharedCacheMode(java.lang.String sharedCacheMode)
If not already created, a new shared-cache-mode element with the given value will be created. Otherwise, the existing shared-cache-mode element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

getSharedCacheMode

PersistenceUnitCachingType getSharedCacheMode()
Returns the shared-cache-mode element

Returns:
the node defined for the element shared-cache-mode

getSharedCacheModeAsString

java.lang.String getSharedCacheModeAsString()
Returns the shared-cache-mode element

Returns:
the node defined for the element shared-cache-mode

setValidationMode

PersistenceUnit<T> setValidationMode(PersistenceUnitValidationModeType validationMode)
If not already created, a new validation-mode element with the given value will be created. Otherwise, the existing validation-mode element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

setValidationMode

PersistenceUnit<T> setValidationMode(java.lang.String validationMode)
If not already created, a new validation-mode element with the given value will be created. Otherwise, the existing validation-mode element will be updated with the given value.

Returns:
the current instance of PersistenceUnit

getValidationMode

PersistenceUnitValidationModeType getValidationMode()
Returns the validation-mode element

Returns:
the node defined for the element validation-mode

getValidationModeAsString

java.lang.String getValidationModeAsString()
Returns the validation-mode element

Returns:
the node defined for the element validation-mode

removeProperties

PersistenceUnit<T> removeProperties()
Removes the properties element

Returns:
the current instance of PersistenceUnit

properties

Properties<PersistenceUnit<T>> properties()
If not already created, a new properties element will be created and returned. Otherwise, the existing properties element will be returned.

Returns:
the node defined for the element properties

setName

PersistenceUnit<T> setName(java.lang.String name)
Sets the name attribute

Parameters:
name - the value for the attribute name
Returns:
the current instance of PersistenceUnit

removeName

PersistenceUnit<T> removeName()
Removes the name attribute

Returns:
the current instance of PersistenceUnit

getName

java.lang.String getName()
Returns the name element

Returns:
the node defined for the element name

setTransactionType

PersistenceUnit<T> setTransactionType(PersistenceUnitTransactionType transactionType)
Sets the transaction-type attribute

Parameters:
transactionType - the value for the attribute transaction-type
Returns:
the current instance of PersistenceUnit

setTransactionType

PersistenceUnit<T> setTransactionType(java.lang.String transactionType)
Sets the transaction-type attribute

Parameters:
transactionType - the value for the attribute transaction-type
Returns:
the current instance of PersistenceUnit

removeTransactionType

PersistenceUnit<T> removeTransactionType()
Removes the transaction-type attribute

Returns:
the current instance of PersistenceUnit

getTransactionType

PersistenceUnitTransactionType getTransactionType()
Returns the transaction-type element

Returns:
the node defined for the element transaction-type

getTransactionTypeAsString

java.lang.String getTransactionTypeAsString()
Returns the transaction-type element

Returns:
the node defined for the element transaction-type