atg.b2bcommerce.order
Class B2BCommerceItemRelationshipContainerImpl

java.lang.Object
  extended by atg.b2bcommerce.order.B2BCommerceItemRelationshipContainerImpl
All Implemented Interfaces:
B2BCommerceItemRelationshipContainer, java.io.Serializable

public class B2BCommerceItemRelationshipContainerImpl
extends java.lang.Object
implements B2BCommerceItemRelationshipContainer

A class which manages the containment of B2BCommerceItemRelationship objects.

See Also:
atg.commerce.order.B2BCommerceItemRelationship, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
B2BCommerceItemRelationshipContainerImpl()
          Constructs a CommerceItemRelationshipContainerImpl object.
 
Method Summary
 void addCommerceItemRelationship(B2BCommerceItemRelationship pCommerceItemRelationship)
          Add the CommerceItemRelationship to the container.
 void addCommerceItemRelationship(B2BCommerceItemRelationship pCommerceItemRelationship, int pIndex)
          Add the CommerceItemRelationship to the container at the given index.
 B2BCommerceItemRelationship 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
 B2BCommerceItemRelationship 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

B2BCommerceItemRelationshipContainerImpl

public B2BCommerceItemRelationshipContainerImpl()
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 B2BCommerceItemRelationshipContainer

addCommerceItemRelationship

public void addCommerceItemRelationship(B2BCommerceItemRelationship 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 B2BCommerceItemRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addCommerceItemRelationship

public void addCommerceItemRelationship(B2BCommerceItemRelationship 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 B2BCommerceItemRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removeCommerceItemRelationship

public B2BCommerceItemRelationship 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 B2BCommerceItemRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllCommerceItemRelationships

public void removeAllCommerceItemRelationships()
Removes all the CommerceItemRelationships

Specified by:
removeAllCommerceItemRelationships in interface B2BCommerceItemRelationshipContainer

getCommerceItemRelationship

public B2BCommerceItemRelationship 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 B2BCommerceItemRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getCommerceItemRelationshipCount

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

Specified by:
getCommerceItemRelationshipCount in interface B2BCommerceItemRelationshipContainer