atg.commerce.order
Class CommerceItemRelationshipContainerImpl

java.lang.Object
  extended by atg.commerce.order.CommerceItemRelationshipContainerImpl
All Implemented Interfaces:
CommerceItemRelationshipContainer, java.io.Serializable

public class CommerceItemRelationshipContainerImpl
extends java.lang.Object
implements CommerceItemRelationshipContainer

A class which manages the containment of CommerceItemRelationship objects.

See Also:
CommerceItemRelationship, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
CommerceItemRelationshipContainerImpl()
          Constructs a CommerceItemRelationshipContainerImpl object.
 
Method Summary
 void addCommerceItemRelationship(CommerceItemRelationship pCommerceItemRelationship)
          Add the CommerceItemRelationship to the container.
 void addCommerceItemRelationship(CommerceItemRelationship pCommerceItemRelationship, int pIndex)
          Add the CommerceItemRelationship to the container at the given index.
 CommerceItemRelationship getCommerceItemRelationship(java.lang.String pCommerceItemRelationshipId)
          Returns the CommerceItemRelationship whose id is pCommerceItemRelationshipId.
 int getCommerceItemRelationshipCount()
          Returns the number of CommerceItemRelationships in the container.
 java.util.List getCommerceItemRelationships()
          Returns a List of CommerceItemRelationships.
 void removeAllCommerceItemRelationships()
          Removes all the CommerceItemRelationships
 CommerceItemRelationship removeCommerceItemRelationship(java.lang.String pCommerceItemRelationshipId)
          Removes a CommerceItemRelationship whose id is passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

CommerceItemRelationshipContainerImpl

public CommerceItemRelationshipContainerImpl()
Constructs a CommerceItemRelationshipContainerImpl object.

Method Detail

getCommerceItemRelationships

public java.util.List getCommerceItemRelationships()
Returns a List of CommerceItemRelationships. Note that the returned List should not be edited directly. Doing so will result in unexpected behavior. Any editing should be done through this class.

Specified by:
getCommerceItemRelationships in interface CommerceItemRelationshipContainer

addCommerceItemRelationship

public void addCommerceItemRelationship(CommerceItemRelationship pCommerceItemRelationship)
                                 throws DuplicateRelationshipException,
                                        InvalidParameterException
Add the CommerceItemRelationship to the container. If the CommerceItemRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addCommerceItemRelationship in interface CommerceItemRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addCommerceItemRelationship

public void addCommerceItemRelationship(CommerceItemRelationship pCommerceItemRelationship,
                                        int pIndex)
                                 throws DuplicateRelationshipException,
                                        InvalidParameterException
Add the CommerceItemRelationship to the container at the given index. If the CommerceItemRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addCommerceItemRelationship in interface CommerceItemRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removeCommerceItemRelationship

public CommerceItemRelationship removeCommerceItemRelationship(java.lang.String pCommerceItemRelationshipId)
                                                        throws RelationshipNotFoundException,
                                                               InvalidParameterException
Removes a CommerceItemRelationship whose id is passed in. If the CommerceItemRelationship is not in the container then a RelationshipNotFoundException is thrown. Otherwise a reference to the removed CommerceItemRelationship is returned.

Specified by:
removeCommerceItemRelationship in interface CommerceItemRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllCommerceItemRelationships

public void removeAllCommerceItemRelationships()
Removes all the CommerceItemRelationships

Specified by:
removeAllCommerceItemRelationships in interface CommerceItemRelationshipContainer

getCommerceItemRelationship

public CommerceItemRelationship getCommerceItemRelationship(java.lang.String pCommerceItemRelationshipId)
                                                     throws RelationshipNotFoundException,
                                                            InvalidParameterException
Returns the CommerceItemRelationship whose id is pCommerceItemRelationshipId. If the CommerceItemRelationship with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getCommerceItemRelationship in interface CommerceItemRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getCommerceItemRelationshipCount

public int getCommerceItemRelationshipCount()
Returns the number of CommerceItemRelationships in the container.

Specified by:
getCommerceItemRelationshipCount in interface CommerceItemRelationshipContainer