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.ejbjar30
Class EjbRelationshipRoleTypeImpl<T>

    java.lang.Object
      org.jboss.shrinkwrap.descriptor.impl.ejbjar30.EjbRelationshipRoleTypeImpl<T>

All Implemented Interfaces:
  org.jboss.shrinkwrap.descriptor.api.Child<T>, EjbRelationshipRoleType<T>

    public class EjbRelationshipRoleTypeImpl<T>

extends java.lang.Object
implements org.jboss.shrinkwrap.descriptor.api.Child<T>, EjbRelationshipRoleType<T>

This class implements the `ejb-relationship-roleType` xsd type

Original Documentation:

The ejb-relationship-roleType describes a role within a
relationship. There are two roles in each relationship.
The ejb-relationship-roleType contains an optional
description; an optional name for the relationship role; a
specification of the multiplicity of the role; an optional
specification of cascade-delete functionality for the role;
the role source; and a declaration of the cmr-field, if any,
by means of which the other side of the relationship is
accessed from the perspective of the role source.
The multiplicity and role-source element are mandatory.
The relationship-role-source element designates an entity
bean by means of an ejb-name element. For bidirectional
relationships, both roles of a relationship must declare a
relationship-role-source element that specifies a cmr-field
in terms of which the relationship is accessed. The lack of
a cmr-field element in an ejb-relationship-role specifies
that the relationship is unidirectional in navigability and
the entity bean that participates in the relationship is
"not aware" of the relationship.
Example:
Product-LineItem
product-has-lineitems
One
ProductEJB

Since:
  Generation date :2011-07-19T22:54:35.59+02:00
Author:
  Ralf Battenfeld

Constructor Summary
`EjbRelationshipRoleTypeImpl(T t, java.lang.String nodeName, org.jboss.shrinkwrap.descriptor.spi.Node node)`
`EjbRelationshipRoleTypeImpl(T t, java.lang.String nodeName, org.jboss.shrinkwrap.descriptor.spi.Node node, org.jboss.shrinkwrap.descriptor.spi.Node childNode)`

Method Summary
`EjbRelationshipRoleType<T>` | `cascadeDelete()`
`CmrFieldType<EjbRelationshipRoleType<T>>` | `cmrField()` If not already created, a new `cmr-field` element will be created and returned.
`java.util.List<java.lang.String>` | `getDescriptionList()` Returns all `description` elements
`java.lang.String` | `getEjbRelationshipRoleName()` Returns the `ejb-relationship-role-name` element
`MultiplicityType` | `getMultiplicity()` Returns the `multiplicity` element
`java.lang.String` | `getMultiplicityAsString()` Returns the `multiplicity` element
`java.lang.Boolean` | `isCascadeDelete()`
`RelationshipRoleSourceType<EjbRelationshipRoleType<T>>` | `relationshipRoleSource()` If not already created, a new `relationship-role-source` element will be created and returned.
`EjbRelationshipRoleType<T>` | `removeAllDescription()` Removes the `description` element
`EjbRelationshipRoleType<T>` | `removeCmrField()` Removes the `cmr-field` element
`EjbRelationshipRoleType<T>` | `removeEjbRelationshipRoleName()` Removes the `ejb-relationship-role-name` element
`EjbRelationshipRoleType<T>` | `removeRelationshipRoleSource()` Removes the `relationship-role-source` element
`EjbRelationshipRoleType<T>` | `setDescription(java.lang.String description)` Creates a new `description` element
`EjbRelationshipRoleType<T>` | `setDescriptionList(java.lang.String... values)` Creates for all String objects representing `description` elements, a new `description` element
`EjbRelationshipRoleType<T>` | `setEjbRelationshipRoleName(java.lang.String ejbRelationshipRoleName)` If not already created, a new `ejb-relationship-role-name` element with the given value will be created.
`EjbRelationshipRoleType<T>` | `setMultiplicity(MultiplicityType multiplicity)` If not already created, a new `multiplicity` element with the given value will be created.
`EjbRelationshipRoleType<T>` | `setMultiplicity(java.lang.String multiplicity)` If not already created, a new `multiplicity` element with the given value will be created.
`T` | `up()`

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

Constructor Detail

### EjbRelationshipRoleTypeImpl

    public EjbRelationshipRoleTypeImpl(T t,
                                       java.lang.String nodeName,
                                       org.jboss.shrinkwrap.descriptor.spi.Node node)

### EjbRelationshipRoleTypeImpl

    public EjbRelationshipRoleTypeImpl(T t,
                                       java.lang.String nodeName,
                                       org.jboss.shrinkwrap.descriptor.spi.Node node,
                                       org.jboss.shrinkwrap.descriptor.spi.Node childNode)

Method Detail

### up

    public T up()

  Specified by:
    `up` in interface `org.jboss.shrinkwrap.descriptor.api.Child<T>`

### setDescription

    public EjbRelationshipRoleType<T> setDescription(java.lang.String description)

  Creates a new `description` element

  Specified by:
    `setDescription` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### setDescriptionList

    public EjbRelationshipRoleType<T> setDescriptionList(java.lang.String... values)

  Creates for all String objects representing `description` elements, a new `description` element

  Specified by:
    `setDescriptionList` in interface `EjbRelationshipRoleType<T>`
  Parameters:
    `list` - of `description` objects
  Returns:
    the current instance of `EjbRelationshipRoleType`

### removeAllDescription

    public EjbRelationshipRoleType<T> removeAllDescription()

  Removes the `description` element

  Specified by:
    `removeAllDescription` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### getDescriptionList

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

  Returns all `description` elements

  Specified by:
    `getDescriptionList` in interface `EjbRelationshipRoleType<T>`
  Returns:
    list of `description`

### setEjbRelationshipRoleName

    public EjbRelationshipRoleType<T> setEjbRelationshipRoleName(java.lang.String ejbRelationshipRoleName)

  If not already created, a new `ejb-relationship-role-name` element with the given value will be created. Otherwise, the existing `ejb-relationship-role-name` element will be updated with the given value.

  Specified by:
    `setEjbRelationshipRoleName` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### removeEjbRelationshipRoleName

    public EjbRelationshipRoleType<T> removeEjbRelationshipRoleName()

  Removes the `ejb-relationship-role-name` element

  Specified by:
    `removeEjbRelationshipRoleName` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### getEjbRelationshipRoleName

    public java.lang.String getEjbRelationshipRoleName()

  Returns the `ejb-relationship-role-name` element

  Specified by:
    `getEjbRelationshipRoleName` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the node defined for the element `ejb-relationship-role-name`

### setMultiplicity

    public EjbRelationshipRoleType<T> setMultiplicity(MultiplicityType multiplicity)

  If not already created, a new `multiplicity` element with the given value will be created. Otherwise, the existing `multiplicity` element will be updated with the given value.

  Specified by:
    `setMultiplicity` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### setMultiplicity

    public EjbRelationshipRoleType<T> setMultiplicity(java.lang.String multiplicity)

  If not already created, a new `multiplicity` element with the given value will be created. Otherwise, the existing `multiplicity` element will be updated with the given value.

  Specified by:
    `setMultiplicity` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### getMultiplicity

    public MultiplicityType getMultiplicity()

  Returns the `multiplicity` element

  Specified by:
    `getMultiplicity` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the node defined for the element `multiplicity`

### getMultiplicityAsString

    public java.lang.String getMultiplicityAsString()

  Returns the `multiplicity` element

  Specified by:
    `getMultiplicityAsString` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the node defined for the element `multiplicity`

### cascadeDelete

    public EjbRelationshipRoleType<T> cascadeDelete()

  Specified by:
    `cascadeDelete` in interface `EjbRelationshipRoleType<T>`

### isCascadeDelete

    public java.lang.Boolean isCascadeDelete()

  Specified by:
    `isCascadeDelete` in interface `EjbRelationshipRoleType<T>`

### removeRelationshipRoleSource

    public EjbRelationshipRoleType<T> removeRelationshipRoleSource()

  Removes the `relationship-role-source` element

  Specified by:
    `removeRelationshipRoleSource` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### relationshipRoleSource

    public RelationshipRoleSourceType<EjbRelationshipRoleType<T>> relationshipRoleSource()

  If not already created, a new `relationship-role-source` element will be created and returned. Otherwise, the existing `relationship-role-source` element will be returned.

  Specified by:
    `relationshipRoleSource` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the node defined for the element `relationship-role-source`

### removeCmrField

    public EjbRelationshipRoleType<T> removeCmrField()

  Removes the `cmr-field` element

  Specified by:
    `removeCmrField` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the current instance of `EjbRelationshipRoleType`

### cmrField

    public CmrFieldType<EjbRelationshipRoleType<T>> cmrField()

  If not already created, a new `cmr-field` element will be created and returned. Otherwise, the existing `cmr-field` element will be returned.

  Specified by:
    `cmrField` in interface `EjbRelationshipRoleType<T>`
  Returns:
    the node defined for the element `cmr-field`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD