atg.b2bcommerce.order
Class CostCenterRelationshipContainerImpl

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

public class CostCenterRelationshipContainerImpl
extends java.lang.Object
implements CostCenterRelationshipContainer

This class manages the containment of CostCenterRelationship objects.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
CostCenterRelationshipContainerImpl()
          Constructs a CostCenterRelationshipContainerImpl object.
 
Method Summary
 void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship)
          Add the CostCenterRelationship to the container.
 void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship, int pIndex)
          Add the CostCenterRelationship to the container at the given index.
 CostCenterRelationship getCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
          Returns the CostCenterRelationship whose id is pCostCenterRelationshipId.
 int getCostCenterRelationshipCount()
          Returns the number of CostCenterRelationships in the container.
 java.util.List getCostCenterRelationships()
          Returns a List of CostCenterRelationships.
 void removeAllCostCenterRelationships()
          Removes all the CostCenterRelationships
 CostCenterRelationship removeCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
          Removes a CostCenterRelationship 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

CostCenterRelationshipContainerImpl

public CostCenterRelationshipContainerImpl()
Constructs a CostCenterRelationshipContainerImpl object.

Method Detail

getCostCenterRelationships

public java.util.List getCostCenterRelationships()
Returns a List of CostCenterRelationships. 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:
getCostCenterRelationships in interface CostCenterRelationshipContainer

addCostCenterRelationship

public void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship)
                               throws DuplicateRelationshipException,
                                      InvalidParameterException
Add the CostCenterRelationship to the container. If the CostCenterRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addCostCenterRelationship

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

Specified by:
addCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removeCostCenterRelationship

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

Specified by:
removeCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllCostCenterRelationships

public void removeAllCostCenterRelationships()
Removes all the CostCenterRelationships

Specified by:
removeAllCostCenterRelationships in interface CostCenterRelationshipContainer

getCostCenterRelationship

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

Specified by:
getCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getCostCenterRelationshipCount

public int getCostCenterRelationshipCount()
Returns the number of CostCenterRelationships in the container.

Specified by:
getCostCenterRelationshipCount in interface CostCenterRelationshipContainer