Class PersistenceUnitRefTypeImpl<T>
- java.lang.Object
-
- org.jboss.shrinkwrap.descriptor.impl.javaee6.PersistenceUnitRefTypeImpl<T>
-
- All Implemented Interfaces:
org.jboss.shrinkwrap.descriptor.api.Child<T>,PersistenceUnitRefType<T>
public class PersistenceUnitRefTypeImpl<T> extends Object implements org.jboss.shrinkwrap.descriptor.api.Child<T>, PersistenceUnitRefType<T>
This class implements thepersistence-unit-refTypexsd type
-
-
Constructor Summary
Constructors Constructor Description PersistenceUnitRefTypeImpl(T t, String nodeName, org.jboss.shrinkwrap.descriptor.spi.node.Node node)PersistenceUnitRefTypeImpl(T t, String nodeName, org.jboss.shrinkwrap.descriptor.spi.node.Node node, org.jboss.shrinkwrap.descriptor.spi.node.Node childNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InjectionTargetType<PersistenceUnitRefType<T>>createInjectionTarget()Creates a newinjection-targetelementPersistenceUnitRefType<T>description(String... values)Creates for all String objects representingdescriptionelements, a newdescriptionelementList<String>getAllDescription()Returns alldescriptionelementsList<InjectionTargetType<PersistenceUnitRefType<T>>>getAllInjectionTarget()Returns allinjection-targetelementsStringgetId()Returns theidattributeStringgetMappedName()Returns themapped-nameelementInjectionTargetType<PersistenceUnitRefType<T>>getOrCreateInjectionTarget()If not already created, a newinjection-targetelement will be created and returned.StringgetPersistenceUnitName()Returns thepersistence-unit-nameelementStringgetPersistenceUnitRefName()Returns thepersistence-unit-ref-nameelementPersistenceUnitRefType<T>id(String id)Sets theidattributePersistenceUnitRefType<T>mappedName(String mappedName)Sets themapped-nameelementPersistenceUnitRefType<T>persistenceUnitName(String persistenceUnitName)Sets thepersistence-unit-nameelementPersistenceUnitRefType<T>persistenceUnitRefName(String persistenceUnitRefName)Sets thepersistence-unit-ref-nameelementPersistenceUnitRefType<T>removeAllDescription()Removes thedescriptionelementPersistenceUnitRefType<T>removeAllInjectionTarget()Removes allinjection-targetelementsPersistenceUnitRefType<T>removeId()Removes theidattributePersistenceUnitRefType<T>removeMappedName()Removes themapped-nameelementPersistenceUnitRefType<T>removePersistenceUnitName()Removes thepersistence-unit-nameelementPersistenceUnitRefType<T>removePersistenceUnitRefName()Removes thepersistence-unit-ref-nameelementTup()
-
-
-
Method Detail
-
mappedName
public PersistenceUnitRefType<T> mappedName(String mappedName)
Sets themapped-nameelement- Specified by:
mappedNamein interfacePersistenceUnitRefType<T>- Parameters:
mappedName- the value for the elementmapped-name- Returns:
- the current instance of
PersistenceUnitRefType
-
getMappedName
public String getMappedName()
Returns themapped-nameelement- Specified by:
getMappedNamein interfacePersistenceUnitRefType<T>- Returns:
- the node defined for the element
mapped-name
-
removeMappedName
public PersistenceUnitRefType<T> removeMappedName()
Removes themapped-nameelement- Specified by:
removeMappedNamein interfacePersistenceUnitRefType<T>- Returns:
- the current instance of
PersistenceUnitRefType
-
getOrCreateInjectionTarget
public InjectionTargetType<PersistenceUnitRefType<T>> getOrCreateInjectionTarget()
If not already created, a newinjection-targetelement will be created and returned. Otherwise, the first existinginjection-targetelement will be returned.- Specified by:
getOrCreateInjectionTargetin interfacePersistenceUnitRefType<T>- Returns:
- the instance defined for the element
injection-target
-
createInjectionTarget
public InjectionTargetType<PersistenceUnitRefType<T>> createInjectionTarget()
Creates a newinjection-targetelement- Specified by:
createInjectionTargetin interfacePersistenceUnitRefType<T>- Returns:
- the new created instance of
InjectionTargetType>
-
getAllInjectionTarget
public List<InjectionTargetType<PersistenceUnitRefType<T>>> getAllInjectionTarget()
Returns allinjection-targetelements- Specified by:
getAllInjectionTargetin interfacePersistenceUnitRefType<T>- Returns:
- list of
injection-target
-
removeAllInjectionTarget
public PersistenceUnitRefType<T> removeAllInjectionTarget()
Removes allinjection-targetelements- Specified by:
removeAllInjectionTargetin interfacePersistenceUnitRefType<T>- Returns:
- the current instance of
InjectionTargetType>
-
description
public PersistenceUnitRefType<T> description(String... values)
Creates for all String objects representingdescriptionelements, a newdescriptionelement- Specified by:
descriptionin interfacePersistenceUnitRefType<T>- Parameters:
values- list ofdescriptionobjects- Returns:
- the current instance of
PersistenceUnitRefType
-
getAllDescription
public List<String> getAllDescription()
Returns alldescriptionelements- Specified by:
getAllDescriptionin interfacePersistenceUnitRefType<T>- Returns:
- list of
description
-
removeAllDescription
public PersistenceUnitRefType<T> removeAllDescription()
Removes thedescriptionelement- Specified by:
removeAllDescriptionin interfacePersistenceUnitRefType<T>- Returns:
- the current instance of
PersistenceUnitRefType
-
persistenceUnitRefName
public PersistenceUnitRefType<T> persistenceUnitRefName(String persistenceUnitRefName)
Sets thepersistence-unit-ref-nameelement- Specified by:
persistenceUnitRefNamein interfacePersistenceUnitRefType<T>- Parameters:
persistenceUnitRefName- the value for the elementpersistence-unit-ref-name- Returns:
- the current instance of
PersistenceUnitRefType
-
getPersistenceUnitRefName
public String getPersistenceUnitRefName()
Returns thepersistence-unit-ref-nameelement- Specified by:
getPersistenceUnitRefNamein interfacePersistenceUnitRefType<T>- Returns:
- the node defined for the element
persistence-unit-ref-name
-
removePersistenceUnitRefName
public PersistenceUnitRefType<T> removePersistenceUnitRefName()
Removes thepersistence-unit-ref-nameelement- Specified by:
removePersistenceUnitRefNamein interfacePersistenceUnitRefType<T>- Returns:
- the current instance of
PersistenceUnitRefType
-
persistenceUnitName
public PersistenceUnitRefType<T> persistenceUnitName(String persistenceUnitName)
Sets thepersistence-unit-nameelement- Specified by:
persistenceUnitNamein interfacePersistenceUnitRefType<T>- Parameters:
persistenceUnitName- the value for the elementpersistence-unit-name- Returns:
- the current instance of
PersistenceUnitRefType
-
getPersistenceUnitName
public String getPersistenceUnitName()
Returns thepersistence-unit-nameelement- Specified by:
getPersistenceUnitNamein interfacePersistenceUnitRefType<T>- Returns:
- the node defined for the element
persistence-unit-name
-
removePersistenceUnitName
public PersistenceUnitRefType<T> removePersistenceUnitName()
Removes thepersistence-unit-nameelement- Specified by:
removePersistenceUnitNamein interfacePersistenceUnitRefType<T>- Returns:
- the current instance of
PersistenceUnitRefType
-
id
public PersistenceUnitRefType<T> id(String id)
Sets theidattribute- Specified by:
idin interfacePersistenceUnitRefType<T>- Parameters:
id- the value for the attributeid- Returns:
- the current instance of
PersistenceUnitRefType
-
getId
public String getId()
Returns theidattribute- Specified by:
getIdin interfacePersistenceUnitRefType<T>- Returns:
- the value defined for the attribute
id
-
removeId
public PersistenceUnitRefType<T> removeId()
Removes theidattribute- Specified by:
removeIdin interfacePersistenceUnitRefType<T>- Returns:
- the current instance of
PersistenceUnitRefType
-
-