atg.commerce.order
Interface RelationshipContainer

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
B2BOrder, Order
All Known Implementing Classes:
B2BOrderImpl, OrderImpl, RelationshipContainerImpl

public interface RelationshipContainer
extends java.io.Serializable

Implemented by a class that contains and manages Relationship objects. This interface defines methods for getting, adding, and removing Relationship objects.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 void addRelationship(Relationship pRelationship)
          Add the Relationship to the container.
 void addRelationship(Relationship pRelationship, int pIndex)
          Add the Relationship to the container at the given index.
 Relationship getRelationship(java.lang.String pRelationshipId)
          Returns the Relationship whose id is pRelationshipId.
 int getRelationshipCount()
          Returns the number of Relationships in the container.
 java.util.List getRelationships()
          Returns a List of Relationships
 void removeAllRelationships()
          Removes all the Relationships in the container.
 Relationship removeRelationship(java.lang.String pRelationshipId)
          Removes a Relationship whose id is passed in.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

getRelationships

java.util.List getRelationships()
Returns a List of Relationships


addRelationship

void addRelationship(Relationship pRelationship)
                     throws DuplicateRelationshipException,
                            InvalidParameterException
Add the Relationship to the container. If the Relationship was already in the container a DuplicateRelationshipException is thrown.

Throws:
DuplicateRelationshipException
InvalidParameterException

addRelationship

void addRelationship(Relationship pRelationship,
                     int pIndex)
                     throws DuplicateRelationshipException,
                            InvalidParameterException
Add the Relationship to the container at the given index. If the Relationship was already in the container a DuplicateRelationshipException is thrown.

Throws:
DuplicateRelationshipException
InvalidParameterException

removeRelationship

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

Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllRelationships

void removeAllRelationships()
Removes all the Relationships in the container.


getRelationship

Relationship getRelationship(java.lang.String pRelationshipId)
                             throws RelationshipNotFoundException,
                                    InvalidParameterException
Returns the Relationship whose id is pRelationshipId. If theRelationship with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Throws:
RelationshipNotFoundException
InvalidParameterException

getRelationshipCount

int getRelationshipCount()
Returns the number of Relationships in the container.