atg.commerce.order
Class OrderImpl

java.lang.Object
  extended by atg.commerce.order.CommerceIdentifierImpl
      extended by atg.commerce.order.OrderImpl
All Implemented Interfaces:
ChangedProperties, CommerceIdentifier, CommerceItemContainer, CostCenterContainer, CostCenterRelationshipContainer, Order, PaymentGroupContainer, PaymentGroupRelationshipContainer, RelationshipContainer, ShippingGroupContainer, java.io.Serializable, java.util.Observer
Direct Known Subclasses:
B2BOrderImpl

public class OrderImpl
extends CommerceIdentifierImpl
implements Order, ChangedProperties

An implementation of the Order interface which represents an Order. This class implements the Order and ChangedProperties interfaces and provides an implementation for the methods.

See Also:
Order, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  CommerceItemContainerImpl mCommerceItemContainer
           
protected  CostCenterContainerImpl mCostCenterContainer
           
protected  CostCenterRelationshipContainerImpl mCostCenterRelationshipContainer
           
protected  boolean mInitialized
           
protected  boolean mInvalidated
           
protected  PaymentGroupContainerImpl mPaymentGroupContainer
           
protected  PaymentGroupRelationshipContainerImpl mPaymentGroupRelationshipContainer
           
protected  RelationshipContainerImpl mRelationshipContainer
           
protected  ShippingGroupContainerImpl mShippingGroupContainer
           
 
Constructor Summary
OrderImpl()
           
 
Method Summary
 void addChangedProperty(java.lang.String pPropertyName)
          Adds a changedProperty
 void addCommerceItem(CommerceItem pCommerceItem)
          Add the CommerceItem to the container.
 void addCommerceItem(CommerceItem pCommerceItem, int pIndex)
          Add the CommerceItem to the container at the given index.
 void addCostCenter(CostCenter pCostCenter)
          Add the CostCenter to the container.
 void addCostCenter(CostCenter pCostCenter, int pIndex)
          Add the CostCenter to the container at the given index.
 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.
 void addOrderIdToRelatedOrders(java.lang.String pOrderId)
          Adds an order id to the relatedOrders list
 void addPaymentGroup(PaymentGroup pPaymentGroup)
          Add the PaymentGroup to the container.
 void addPaymentGroup(PaymentGroup pPaymentGroup, int pIndex)
          Add the PaymentGroup to the container at the given index.
 void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship)
          Add the PaymentGroupRelationship to the container.
 void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship, int pIndex)
          Add the PaymentGroupRelationship to the container at the given index.
 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.
 void addShippingGroup(ShippingGroup pShippingGroup)
          Add the ShippingGroup to the container.
 void addShippingGroup(ShippingGroup pShippingGroup, int pIndex)
          Add the ShippingGroup to the container at the given index.
 void clearChangedProperties()
          Clears the changedProperties List
protected  void ensureContainers()
          Internal method to refresh the Commerce object list
 boolean equals(java.lang.Object pOrder)
          Returns true if pOrder is the same as this Order.
 java.lang.String getAgentId()
          Returns the agentId
 java.util.List getApprovalSystemMessages()
          Returns property approvalSystemMessages
 java.util.List getApproverIds()
          Returns property approverIds
 java.util.List getApproverMessages()
          Returns property approverMessages
 java.util.List getAuthorizedApproverIds()
          Returns property authorizedApproverIds
 java.util.Set getChangedProperties()
          Returns the changedProperties
 CommerceItem getCommerceItem(java.lang.String pCommerceItemId)
          Returns the CommerceItem whose id is pCommerceItemId.
 int getCommerceItemCount()
          Returns the number of CommerceItems in the container.
 java.util.List getCommerceItems()
          Returns a List of CommerceItems
 java.util.List getCommerceItemsByCatalogRefId(java.lang.String pCatalogRefId)
          Returns a List of CommerceItems whose catalogRefId is pCatalogRefId.
 java.util.Date getCompletedDate()
          Returns the completedDate
 long getCompletedTime()
          Returns property completedTime
 CostCenter getCostCenter(java.lang.String pCostCenterId)
          Returns the CostCenter whose id is pCostCenterId.
 int getCostCenterCount()
          Returns the number of CostCenters in the container.
 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
 java.util.List getCostCenters()
          Returns a List of CostCenters
 java.lang.String getCreatedByOrderId()
          Returns property createdByOrderId
 java.util.Date getCreationDate()
          Returns the creationDate
 java.lang.String getCreationSiteId()
          Returns the creationSiteId
 long getCreationTime()
          Returns property creationTime
 java.lang.String getDescription()
          Returns the description
 java.util.Date getLastModifiedDate()
          Returns the lastModifiedDate
 long getLastModifiedTime()
          Returns property lastModifiedTime
 java.util.List getManualAdjustments()
          Returns a list of manualAdjustment repository items for this order.
 java.lang.String getOrderClassType()
          Returns the orderClassType
 java.lang.String getOriginOfOrder()
          Returns the originOfOrder
 PaymentGroup getPaymentGroup(java.lang.String pPaymentGroupId)
          Returns the PaymentGroup whose id is pPaymentGroupId.
 int getPaymentGroupCount()
          Returns the number of PaymentGroups in the container.
 PaymentGroupRelationship getPaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
          Returns the PaymentGroupRelationship whose id is pPaymentGroupRelationshipId.
 int getPaymentGroupRelationshipCount()
          Returns the number of PaymentGroupRelationships in the container.
 java.util.List getPaymentGroupRelationships()
          Returns a List of PaymentGroupRelationships
 java.util.List getPaymentGroups()
          Returns a List of PaymentGroups
 OrderPriceInfo getPriceInfo()
          Returns the OrderPriceInfo for the order
 MutableRepositoryItem getPriceInfoRepositoryItem()
          Returns the priceInfoRepositoryItem
 java.lang.String getProfileId()
          Returns the RepositoryId of the profile which this Order belongs to.
 java.lang.Object getPropertyValue(java.lang.String pPropertyName)
          Returns a property value
 java.util.List getRelatedOrders()
          Returns property relatedOrders
 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
 MutableRepositoryItem getRepositoryItem()
          Returns the repositoryItem
 java.lang.String getSalesChannel()
          Returns the salesChannel
 boolean getSaveAllProperties()
          Returns the saveAllProperties
 ShippingGroup getShippingGroup(java.lang.String pShippingGroupId)
          Returns the ShippingGroup whose id is pShippingGroupId.
 int getShippingGroupCount()
          Returns the number of ShippingGroups in the container.
 java.util.List getShippingGroups()
          Returns a List of ShippingGroups
 java.lang.String getSiteId()
          Returns the siteId
 java.util.Map getSpecialInstructions()
          Returns the specialInstructions
 int getState()
          returns the Order state.
 java.lang.String getStateAsString()
           
 java.lang.String getStateAsUserResource()
          returns the Order state as a user resource
 java.lang.String getStateDetail()
          returns the Order state details.
 java.lang.String getStateDetailAsUserResource()
          returns the Order state detail as a user resource
 java.util.Date getSubmittedDate()
          Returns the submittedDate
 long getSubmittedTime()
          Returns property submittedTime
 TaxPriceInfo getTaxPriceInfo()
          Returns the taxPriceInfo
 MutableRepositoryItem getTaxPriceInfoRepositoryItem()
          Returns the taxPriceInfoRepositoryItem
 long getTotalCommerceItemCount()
          Returns the number of individual CommerceItems in the container.
 int getVersion()
          Returns property version
 int hashCode()
          Override the default hashCode method to return the hashCode of the id.
 void invalidateOrder()
          Invalidates the order so on the next access the order will be refreshed from the item descriptors.
 boolean isChanged()
          Returns the isChanged flag
 boolean isExplicitlySaved()
          Returns true if the order was explicitly marked for saving.
 boolean isTransient()
          Returns the transient property
protected  void preEnsureContainers()
          Method which is called by ensureContainers to allow subclasses to do any initialization when the order is reconstructed.
 void removeAllCommerceItems()
          Removes all the CommerceItems
 void removeAllCostCenterRelationships()
          Removes all the CostCenterRelationships
 void removeAllCostCenters()
          Removes all the CostCenters
 void removeAllPaymentGroupRelationships()
          Removes all the PaymentGroupRelationships
 void removeAllPaymentGroups()
          Removes all the PaymentGroups
 void removeAllRelationships()
          Removes all the Relationships
 void removeAllShippingGroups()
          Removes all the ShippingGroups
 CommerceItem removeCommerceItem(java.lang.String pCommerceItemId)
          Removes a CommerceItem whose id is passed in.
 CostCenter removeCostCenter(java.lang.String pCostCenterId)
          Removes a CostCenter whose id is passed in.
 CostCenterRelationship removeCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
          Removes a CostCenterRelationship whose id is passed in.
 PaymentGroup removePaymentGroup(java.lang.String pPaymentGroupId)
          Removes a PaymentGroup whose id is passed in.
 PaymentGroupRelationship removePaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
          Removes a PaymentGroupRelationship whose id is passed in.
 Relationship removeRelationship(java.lang.String pRelationshipId)
          Removes a Relationship whose id is passed in.
 ShippingGroup removeShippingGroup(java.lang.String pShippingGroupId)
          Removes a ShippingGroup whose id is passed in.
 void repositionCommerceItem(CommerceItem pItem, int pNewIndex)
          Changes the position of the given commerce item within the order.
 void setAgentId(java.lang.String pAgentId)
          Sets the agentId
 void setApprovalSystemMessages(java.util.List pApprovalSystemMessages)
          Sets property approvalSystemMessages
 void setApproverIds(java.util.List pApproverIds)
          Sets property approverIds
 void setApproverMessages(java.util.List pApproverMessages)
          Sets property approverMessages
 void setAuthorizedApproverIds(java.util.List pAuthorizedApproverIds)
          Sets property authorizedApproverIds
 void setChanged(boolean pChanged)
          Marks this object as changed
 void setCompletedDate(java.util.Date pCompletedDate)
          Sets the completedDate
 void setCompletedTime(long pCompletedTime)
          Sets property completedTime
 void setCreatedByOrderId(java.lang.String pCreatedByOrderId)
          Sets property createdByOrderId
 void setCreationDate(java.util.Date pCreationDate)
          Sets the creationDate
 void setCreationSiteId(java.lang.String pCreationSiteId)
          Sets the creationSiteId
 void setCreationTime(long pCreationTime)
          Sets property creationTime
 void setDescription(java.lang.String pDescription)
          Sets the description
 void setExplicitlySaved(boolean pExplicitlySaved)
          Marks the order as one that has been explicitly saved.
 void setLastModifiedDate(java.util.Date pLastModifiedDate)
          Sets the lastModifiedDate
 void setLastModifiedTime(long pLastModifiedTime)
          Sets property lastModifiedTime
 void setManualAdjustments(java.util.List pManualAdjustments)
          Sets the list of manual adjustment repository items
 void setOrderClassType(java.lang.String pOrderClassType)
          Sets the orderClassType
 void setOriginOfOrder(java.lang.String pOriginOfOrder)
          Sets the originOfOrder
 void setPriceInfo(OrderPriceInfo pPriceInfo)
          Sets the OrderPriceInfo for the order
 void setPriceInfoRepositoryItem(MutableRepositoryItem pPriceInfoRepositoryItem)
          Sets the priceInfoRepositoryItem
 void setProfileId(java.lang.String pId)
          Sets the RepositoryId of the profile which this Order belongs to.
 void setPropertyValue(java.lang.String pPropertyName, java.lang.Object pPropertyValue)
          Sets a property value
 void setRepositoryItem(MutableRepositoryItem pRepositoryItem)
          Sets the repositoryItem and calls updateVersion()
 void setSalesChannel(java.lang.String pSalesChannel)
          Sets the salesChannel
 void setSaveAllProperties(boolean pSaveAllProperties)
          Sets the saveAllProperties
 void setSiteId(java.lang.String pSiteId)
          Sets the siteId
 void setSpecialInstructions(java.util.Map pSpecialInstructions)
          Sets the specialInstructions
 void setState(int pState)
          sets the Order state.
 void setStateAsString(java.lang.String pState)
          sets the Order state using a string.
 void setStateDetail(java.lang.String pStateDetail)
          sets the Order state details.
 void setSubmittedDate(java.util.Date pSubmittedDate)
          Sets the submittedDate
 void setSubmittedTime(long pSubmittedTime)
          Sets property submittedTime
 void setTaxPriceInfo(TaxPriceInfo pTaxPriceInfo)
          Sets the taxPriceInfo
 void setTaxPriceInfoRepositoryItem(MutableRepositoryItem pTaxPriceInfoRepositoryItem)
          Sets the taxPriceInfoRepositoryItem
 void setTransient(boolean pTransient)
          Deprecated. this method no longer does anything
protected  void setVersion(int pVersion)
          Sets property version
 java.lang.String toString()
          Method that renders the general order information in a readable string format
 void update(java.util.Observable o, java.lang.Object arg)
          This method is called whenever a property in a contained object changes and the containing object needs to be notified.
 void updateVersion()
          Method for updating the local copy of the version stored in this class
 
Methods inherited from class atg.commerce.order.CommerceIdentifierImpl
getId, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface atg.commerce.order.CommerceIdentifier
getId
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mCommerceItemContainer

protected transient CommerceItemContainerImpl mCommerceItemContainer

mShippingGroupContainer

protected transient ShippingGroupContainerImpl mShippingGroupContainer

mPaymentGroupContainer

protected transient PaymentGroupContainerImpl mPaymentGroupContainer

mRelationshipContainer

protected transient RelationshipContainerImpl mRelationshipContainer

mPaymentGroupRelationshipContainer

protected transient PaymentGroupRelationshipContainerImpl mPaymentGroupRelationshipContainer

mCostCenterContainer

protected transient CostCenterContainerImpl mCostCenterContainer

mCostCenterRelationshipContainer

protected transient CostCenterRelationshipContainerImpl mCostCenterRelationshipContainer

mInitialized

protected transient volatile boolean mInitialized

mInvalidated

protected transient boolean mInvalidated
Constructor Detail

OrderImpl

public OrderImpl()
Method Detail

hashCode

public int hashCode()
Override the default hashCode method to return the hashCode of the id.

Overrides:
hashCode in class java.lang.Object
Returns:
the hashCode of the Order object

getVersion

public int getVersion()
Returns property version

Returns:
returns property version

setVersion

protected void setVersion(int pVersion)
Sets property version

Parameters:
pVersion - the value to set for property version

updateVersion

public void updateVersion()
Method for updating the local copy of the version stored in this class


getOrderClassType

public java.lang.String getOrderClassType()
Returns the orderClassType

Specified by:
getOrderClassType in interface Order

setOrderClassType

public void setOrderClassType(java.lang.String pOrderClassType)
Sets the orderClassType

Specified by:
setOrderClassType in interface Order

getProfileId

public java.lang.String getProfileId()
Returns the RepositoryId of the profile which this Order belongs to.

Specified by:
getProfileId in interface Order

setProfileId

public void setProfileId(java.lang.String pId)
Sets the RepositoryId of the profile which this Order belongs to.

Specified by:
setProfileId in interface Order

getDescription

public java.lang.String getDescription()
Returns the description

Specified by:
getDescription in interface Order

setDescription

public void setDescription(java.lang.String pDescription)
Sets the description

Specified by:
setDescription in interface Order

getState

public int getState()
returns the Order state. The default is "incomplete", defined in the item descriptor.

Specified by:
getState in interface Order

setState

public void setState(int pState)
sets the Order state.

Specified by:
setState in interface Order
Parameters:
pState - the state to set

getStateAsString

public java.lang.String getStateAsString()

setStateAsString

public void setStateAsString(java.lang.String pState)
sets the Order state using a string.

Parameters:
pState - the state to set

getStateAsUserResource

public java.lang.String getStateAsUserResource()
returns the Order state as a user resource


getStateDetailAsUserResource

public java.lang.String getStateDetailAsUserResource()
returns the Order state detail as a user resource


getStateDetail

public java.lang.String getStateDetail()
returns the Order state details.

Specified by:
getStateDetail in interface Order

setStateDetail

public void setStateDetail(java.lang.String pStateDetail)
sets the Order state details.

Specified by:
setStateDetail in interface Order
Parameters:
pStateDetail - the stateDetail to set

getPriceInfo

public OrderPriceInfo getPriceInfo()
Returns the OrderPriceInfo for the order

Specified by:
getPriceInfo in interface Order

setPriceInfo

public void setPriceInfo(OrderPriceInfo pPriceInfo)
Sets the OrderPriceInfo for the order

Specified by:
setPriceInfo in interface Order

getPriceInfoRepositoryItem

public MutableRepositoryItem getPriceInfoRepositoryItem()
Returns the priceInfoRepositoryItem


setPriceInfoRepositoryItem

public void setPriceInfoRepositoryItem(MutableRepositoryItem pPriceInfoRepositoryItem)
Sets the priceInfoRepositoryItem


getTaxPriceInfo

public TaxPriceInfo getTaxPriceInfo()
Returns the taxPriceInfo

Specified by:
getTaxPriceInfo in interface Order

setTaxPriceInfo

public void setTaxPriceInfo(TaxPriceInfo pTaxPriceInfo)
Sets the taxPriceInfo

Specified by:
setTaxPriceInfo in interface Order

getTaxPriceInfoRepositoryItem

public MutableRepositoryItem getTaxPriceInfoRepositoryItem()
Returns the taxPriceInfoRepositoryItem


setTaxPriceInfoRepositoryItem

public void setTaxPriceInfoRepositoryItem(MutableRepositoryItem pTaxPriceInfoRepositoryItem)
Sets the taxPriceInfoRepositoryItem


getCreatedByOrderId

public java.lang.String getCreatedByOrderId()
Returns property createdByOrderId

Specified by:
getCreatedByOrderId in interface Order
Returns:
returns property createdByOrderId

setCreatedByOrderId

public void setCreatedByOrderId(java.lang.String pCreatedByOrderId)
Sets property createdByOrderId

Specified by:
setCreatedByOrderId in interface Order
Parameters:
pCreatedByOrderId - the value to set for property createdByOrderId

getRelatedOrders

public java.util.List getRelatedOrders()
Returns property relatedOrders

Specified by:
getRelatedOrders in interface Order
Returns:
returns property relatedOrders

addOrderIdToRelatedOrders

public void addOrderIdToRelatedOrders(java.lang.String pOrderId)
Adds an order id to the relatedOrders list

Specified by:
addOrderIdToRelatedOrders in interface Order
Parameters:
pOrderId - the order id to add to the relatedOrders list

getSubmittedDate

public java.util.Date getSubmittedDate()
Returns the submittedDate

Specified by:
getSubmittedDate in interface Order

setSubmittedDate

public void setSubmittedDate(java.util.Date pSubmittedDate)
Sets the submittedDate


getSubmittedTime

public long getSubmittedTime()
Returns property submittedTime

Specified by:
getSubmittedTime in interface Order
Returns:
returns property submittedTime

setSubmittedTime

public void setSubmittedTime(long pSubmittedTime)
Sets property submittedTime

Specified by:
setSubmittedTime in interface Order
Parameters:
pSubmittedTime - the value to set for property submittedTime

getOriginOfOrder

public java.lang.String getOriginOfOrder()
Returns the originOfOrder

Specified by:
getOriginOfOrder in interface Order

setOriginOfOrder

public void setOriginOfOrder(java.lang.String pOriginOfOrder)
Sets the originOfOrder

Specified by:
setOriginOfOrder in interface Order

setExplicitlySaved

public void setExplicitlySaved(boolean pExplicitlySaved)
Marks the order as one that has been explicitly saved. Explicitly saving an order indicates that it was persisted because of a direct call instead of the automatic persistence of a session's shopping cart.

Specified by:
setExplicitlySaved in interface Order
Parameters:
pExplicitlySaved - is true if this order was explicitly saved, false otherwise.

isExplicitlySaved

public boolean isExplicitlySaved()
Returns true if the order was explicitly marked for saving.

Specified by:
isExplicitlySaved in interface Order

getCreationDate

public java.util.Date getCreationDate()
Returns the creationDate

Specified by:
getCreationDate in interface Order

setCreationDate

public void setCreationDate(java.util.Date pCreationDate)
Sets the creationDate


getCreationTime

public long getCreationTime()
Returns property creationTime

Specified by:
getCreationTime in interface Order
Returns:
returns property creationTime

setCreationTime

public void setCreationTime(long pCreationTime)
Sets property creationTime

Specified by:
setCreationTime in interface Order
Parameters:
pCreationTime - the value to set for property creationTime

getLastModifiedDate

public java.util.Date getLastModifiedDate()
Returns the lastModifiedDate

Specified by:
getLastModifiedDate in interface Order

setLastModifiedDate

public void setLastModifiedDate(java.util.Date pLastModifiedDate)
Sets the lastModifiedDate


getLastModifiedTime

public long getLastModifiedTime()
Returns property lastModifiedTime

Specified by:
getLastModifiedTime in interface Order
Returns:
returns property lastModifiedTime

setLastModifiedTime

public void setLastModifiedTime(long pLastModifiedTime)
Sets property lastModifiedTime

Specified by:
setLastModifiedTime in interface Order
Parameters:
pLastModifiedTime - the value to set for property lastModifiedTime

getCompletedDate

public java.util.Date getCompletedDate()
Returns the completedDate

Specified by:
getCompletedDate in interface Order

setCompletedDate

public void setCompletedDate(java.util.Date pCompletedDate)
Sets the completedDate


getCompletedTime

public long getCompletedTime()
Returns property completedTime

Specified by:
getCompletedTime in interface Order
Returns:
returns property completedTime

setCompletedTime

public void setCompletedTime(long pCompletedTime)
Sets property completedTime

Specified by:
setCompletedTime in interface Order
Parameters:
pCompletedTime - the value to set for property completedTime

isTransient

public boolean isTransient()
Returns the transient property

Specified by:
isTransient in interface Order

setTransient

public void setTransient(boolean pTransient)
Deprecated. this method no longer does anything

Sets the transient property

Specified by:
setTransient in interface Order

getSpecialInstructions

public java.util.Map getSpecialInstructions()
Returns the specialInstructions

Specified by:
getSpecialInstructions in interface Order

setSpecialInstructions

public void setSpecialInstructions(java.util.Map pSpecialInstructions)
Sets the specialInstructions


getManualAdjustments

public java.util.List getManualAdjustments()
Returns a list of manualAdjustment repository items for this order.

Specified by:
getManualAdjustments in interface Order
Returns:
List of repository items

setManualAdjustments

public void setManualAdjustments(java.util.List pManualAdjustments)
Sets the list of manual adjustment repository items

Specified by:
setManualAdjustments in interface Order

getAgentId

public java.lang.String getAgentId()
Returns the agentId

Specified by:
getAgentId in interface Order
Returns:
agentId

setAgentId

public void setAgentId(java.lang.String pAgentId)
Sets the agentId

Specified by:
setAgentId in interface Order

getSalesChannel

public java.lang.String getSalesChannel()
Returns the salesChannel

Specified by:
getSalesChannel in interface Order
Returns:
salesChannel

setSalesChannel

public void setSalesChannel(java.lang.String pSalesChannel)
Sets the salesChannel

Specified by:
setSalesChannel in interface Order
Parameters:
pSalesChannel -

getCreationSiteId

public java.lang.String getCreationSiteId()
Returns the creationSiteId

Specified by:
getCreationSiteId in interface Order
Returns:
creation site ID

setCreationSiteId

public void setCreationSiteId(java.lang.String pCreationSiteId)
Sets the creationSiteId

Specified by:
setCreationSiteId in interface Order
Parameters:
pCreationSiteId - the value to set for property createdSiteId

getSiteId

public java.lang.String getSiteId()
Returns the siteId

Specified by:
getSiteId in interface Order
Returns:
site ID

setSiteId

public void setSiteId(java.lang.String pSiteId)
Sets the siteId

Specified by:
setSiteId in interface Order
Parameters:
pSiteId - the value to set for property siteId

getApproverIds

public java.util.List getApproverIds()
Returns property approverIds

Specified by:
getApproverIds in interface Order
Returns:
returns property approverIds

setApproverIds

public void setApproverIds(java.util.List pApproverIds)
Sets property approverIds

Specified by:
setApproverIds in interface Order
Parameters:
pApproverIds - the value to set for property approverIds

getAuthorizedApproverIds

public java.util.List getAuthorizedApproverIds()
Returns property authorizedApproverIds

Specified by:
getAuthorizedApproverIds in interface Order
Returns:
returns property authorizedApproverIds

setAuthorizedApproverIds

public void setAuthorizedApproverIds(java.util.List pAuthorizedApproverIds)
Sets property authorizedApproverIds

Specified by:
setAuthorizedApproverIds in interface Order
Parameters:
pAuthorizedApproverIds - the value to set for property authorizedApproverIds

getApprovalSystemMessages

public java.util.List getApprovalSystemMessages()
Returns property approvalSystemMessages

Specified by:
getApprovalSystemMessages in interface Order
Returns:
returns property approvalSystemMessages

setApprovalSystemMessages

public void setApprovalSystemMessages(java.util.List pApprovalSystemMessages)
Sets property approvalSystemMessages

Specified by:
setApprovalSystemMessages in interface Order
Parameters:
pApprovalSystemMessages - the value to set for property approvalSystemMessages

getApproverMessages

public java.util.List getApproverMessages()
Returns property approverMessages

Specified by:
getApproverMessages in interface Order
Returns:
returns property approverMessages

setApproverMessages

public void setApproverMessages(java.util.List pApproverMessages)
Sets property approverMessages

Specified by:
setApproverMessages in interface Order
Parameters:
pApproverMessages - the value to set for property approverMessages

getCommerceItems

public java.util.List getCommerceItems()
Returns a List of CommerceItems

Specified by:
getCommerceItems in interface CommerceItemContainer

addCommerceItem

public void addCommerceItem(CommerceItem pCommerceItem)
                     throws DuplicateCommerceItemException,
                            InvalidParameterException
Add the CommerceItem to the container. If the CommerceItem was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addCommerceItem in interface CommerceItemContainer
Throws:
DuplicateCommerceItemException
InvalidParameterException

addCommerceItem

public void addCommerceItem(CommerceItem pCommerceItem,
                            int pIndex)
                     throws DuplicateCommerceItemException,
                            InvalidParameterException
Add the CommerceItem to the container at the given index. If the CommerceItem was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addCommerceItem in interface CommerceItemContainer
Throws:
DuplicateCommerceItemException
InvalidParameterException

removeCommerceItem

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

Specified by:
removeCommerceItem in interface CommerceItemContainer
Throws:
CommerceItemNotFoundException
InvalidParameterException

removeAllCommerceItems

public void removeAllCommerceItems()
Removes all the CommerceItems

Specified by:
removeAllCommerceItems in interface CommerceItemContainer

repositionCommerceItem

public void repositionCommerceItem(CommerceItem pItem,
                                   int pNewIndex)
                            throws CommerceItemNotFoundException,
                                   InvalidParameterException,
                                   DuplicateCommerceItemException
Changes the position of the given commerce item within the order. If the new index is negative or greater than the number of items in the order then the item will be moved to the end of the order.

Parameters:
pItem - CommerceItem already in the order
pNewIndex - int new index to move the item to.
Throws:
CommerceItemNotFoundException - if pItem is not in the order
InvalidParameterException
DuplicateCommerceItemException

getCommerceItem

public CommerceItem getCommerceItem(java.lang.String pCommerceItemId)
                             throws CommerceItemNotFoundException,
                                    InvalidParameterException
Returns the CommerceItem whose id is pCommerceItemId. If theCommerceItem with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getCommerceItem in interface CommerceItemContainer
Throws:
CommerceItemNotFoundException
InvalidParameterException

getCommerceItemsByCatalogRefId

public java.util.List getCommerceItemsByCatalogRefId(java.lang.String pCatalogRefId)
                                              throws CommerceItemNotFoundException,
                                                     InvalidParameterException
Returns a List of CommerceItems whose catalogRefId is pCatalogRefId. If a CommerceItem with the corresponding catalogRefId is not in the container then a CommerceItemNotFoundException is thrown.

Specified by:
getCommerceItemsByCatalogRefId in interface CommerceItemContainer
Throws:
CommerceItemNotFoundException
InvalidParameterException

getCommerceItemCount

public int getCommerceItemCount()
Returns the number of CommerceItems in the container.

Specified by:
getCommerceItemCount in interface CommerceItemContainer

getTotalCommerceItemCount

public long getTotalCommerceItemCount()
Returns the number of individual CommerceItems in the container. This means the total of all the quantities in each CommerceItem.

Specified by:
getTotalCommerceItemCount in interface CommerceItemContainer

getShippingGroups

public java.util.List getShippingGroups()
Returns a List of ShippingGroups

Specified by:
getShippingGroups in interface ShippingGroupContainer

addShippingGroup

public void addShippingGroup(ShippingGroup pShippingGroup)
                      throws DuplicateShippingGroupException,
                             InvalidParameterException
Add the ShippingGroup to the container. If the ShippingGroup was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addShippingGroup in interface ShippingGroupContainer
Throws:
DuplicateShippingGroupException
InvalidParameterException

addShippingGroup

public void addShippingGroup(ShippingGroup pShippingGroup,
                             int pIndex)
                      throws DuplicateShippingGroupException,
                             InvalidParameterException
Add the ShippingGroup to the container at the given index. If the ShippingGroup was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addShippingGroup in interface ShippingGroupContainer
Throws:
DuplicateShippingGroupException
InvalidParameterException

removeShippingGroup

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

Specified by:
removeShippingGroup in interface ShippingGroupContainer
Throws:
ShippingGroupNotFoundException
InvalidParameterException

removeAllShippingGroups

public void removeAllShippingGroups()
Removes all the ShippingGroups

Specified by:
removeAllShippingGroups in interface ShippingGroupContainer

getShippingGroup

public ShippingGroup getShippingGroup(java.lang.String pShippingGroupId)
                               throws ShippingGroupNotFoundException,
                                      InvalidParameterException
Returns the ShippingGroup whose id is pShippingGroupId. If theShippingGroup with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getShippingGroup in interface ShippingGroupContainer
Throws:
ShippingGroupNotFoundException
InvalidParameterException

getShippingGroupCount

public int getShippingGroupCount()
Returns the number of ShippingGroups in the container.

Specified by:
getShippingGroupCount in interface ShippingGroupContainer

getPaymentGroups

public java.util.List getPaymentGroups()
Returns a List of PaymentGroups

Specified by:
getPaymentGroups in interface PaymentGroupContainer

addPaymentGroup

public void addPaymentGroup(PaymentGroup pPaymentGroup)
                     throws DuplicatePaymentGroupException,
                            InvalidParameterException
Add the PaymentGroup to the container. If the PaymentGroup was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addPaymentGroup in interface PaymentGroupContainer
Throws:
DuplicatePaymentGroupException
InvalidParameterException

addPaymentGroup

public void addPaymentGroup(PaymentGroup pPaymentGroup,
                            int pIndex)
                     throws DuplicatePaymentGroupException,
                            InvalidParameterException
Add the PaymentGroup to the container at the given index. If the PaymentGroup was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addPaymentGroup in interface PaymentGroupContainer
Throws:
DuplicatePaymentGroupException
InvalidParameterException

removePaymentGroup

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

Specified by:
removePaymentGroup in interface PaymentGroupContainer
Throws:
PaymentGroupNotFoundException
InvalidParameterException

removeAllPaymentGroups

public void removeAllPaymentGroups()
Removes all the PaymentGroups

Specified by:
removeAllPaymentGroups in interface PaymentGroupContainer

getPaymentGroup

public PaymentGroup getPaymentGroup(java.lang.String pPaymentGroupId)
                             throws PaymentGroupNotFoundException,
                                    InvalidParameterException
Returns the PaymentGroup whose id is pPaymentGroupId. If thePaymentGroup with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getPaymentGroup in interface PaymentGroupContainer
Throws:
PaymentGroupNotFoundException
InvalidParameterException

getPaymentGroupCount

public int getPaymentGroupCount()
Returns the number of PaymentGroups in the container.

Specified by:
getPaymentGroupCount in interface PaymentGroupContainer

getCostCenters

public java.util.List getCostCenters()
Returns a List of CostCenters

Specified by:
getCostCenters in interface CostCenterContainer
Returns:
returns a List of Strings for cost center

addCostCenter

public void addCostCenter(CostCenter pCostCenter)
                   throws DuplicateCostCenterException,
                          InvalidParameterException
Add the CostCenter to the container. If the CostCenter was already in the container a DuplicateCostCenterException is thrown.

Specified by:
addCostCenter in interface CostCenterContainer
Throws:
DuplicateCostCenterException
InvalidParameterException

addCostCenter

public void addCostCenter(CostCenter pCostCenter,
                          int pIndex)
                   throws DuplicateCostCenterException,
                          InvalidParameterException
Add the CostCenter to the container at the given index. If the CostCenter was already in the container a DuplicateCostCenterException is thrown.

Specified by:
addCostCenter in interface CostCenterContainer
Throws:
DuplicateCostCenterException
InvalidParameterException

removeCostCenter

public CostCenter removeCostCenter(java.lang.String pCostCenterId)
                            throws CostCenterNotFoundException,
                                   InvalidParameterException
Removes a CostCenter whose id is passed in. If the CostCenter is not in the container then a CostCenterNotFoundException is thrown. Otherwise a reference to the removed CostCenter is returned.

Specified by:
removeCostCenter in interface CostCenterContainer
Throws:
CostCenterNotFoundException
InvalidParameterException

removeAllCostCenters

public void removeAllCostCenters()
Removes all the CostCenters

Specified by:
removeAllCostCenters in interface CostCenterContainer

getCostCenter

public CostCenter getCostCenter(java.lang.String pCostCenterId)
                         throws CostCenterNotFoundException,
                                InvalidParameterException
Returns the CostCenter whose id is pCostCenterId. If the CostCenter with the corresponding id is not in the container then a CostCenterNotFoundException is thrown.

Specified by:
getCostCenter in interface CostCenterContainer
Throws:
CostCenterNotFoundException
InvalidParameterException

getCostCenterCount

public int getCostCenterCount()
Returns the number of CostCenters in the container.

Specified by:
getCostCenterCount in interface CostCenterContainer
Returns:
count of cost centers in the order

getRelationships

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

Specified by:
getRelationships in interface RelationshipContainer

addRelationship

public 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.

Specified by:
addRelationship in interface RelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addRelationship

public 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.

Specified by:
addRelationship in interface RelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removeRelationship

public 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.

Specified by:
removeRelationship in interface RelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllRelationships

public void removeAllRelationships()
Removes all the Relationships

Specified by:
removeAllRelationships in interface RelationshipContainer

getRelationship

public 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.

Specified by:
getRelationship in interface RelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getRelationshipCount

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

Specified by:
getRelationshipCount in interface RelationshipContainer

getPaymentGroupRelationships

public java.util.List getPaymentGroupRelationships()
Returns a List of PaymentGroupRelationships

Specified by:
getPaymentGroupRelationships in interface PaymentGroupRelationshipContainer

addPaymentGroupRelationship

public void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship)
                                 throws DuplicateRelationshipException,
                                        InvalidParameterException
Add the PaymentGroupRelationship to the container. If the PaymentGroupRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addPaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addPaymentGroupRelationship

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

Specified by:
addPaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removePaymentGroupRelationship

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

Specified by:
removePaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllPaymentGroupRelationships

public void removeAllPaymentGroupRelationships()
Removes all the PaymentGroupRelationships

Specified by:
removeAllPaymentGroupRelationships in interface PaymentGroupRelationshipContainer

getPaymentGroupRelationship

public PaymentGroupRelationship getPaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
                                                     throws RelationshipNotFoundException,
                                                            InvalidParameterException
Returns the PaymentGroupRelationship whose id is pPaymentGroupRelationshipId. If thePaymentGroupRelationship with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getPaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getPaymentGroupRelationshipCount

public int getPaymentGroupRelationshipCount()
Returns the number of PaymentGroupRelationships in the container.

Specified by:
getPaymentGroupRelationshipCount in interface PaymentGroupRelationshipContainer

getCostCenterRelationships

public java.util.List getCostCenterRelationships()
Returns a List of CostCenterRelationships

Specified by:
getCostCenterRelationships in interface CostCenterRelationshipContainer
Returns:
CostCenter relationships in the order

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
Returns:
count of CostCenter relationships in the order

preEnsureContainers

protected void preEnsureContainers()
Method which is called by ensureContainers to allow subclasses to do any initialization when the order is reconstructed.


ensureContainers

protected void ensureContainers()
Internal method to refresh the Commerce object list


invalidateOrder

public void invalidateOrder()
Invalidates the order so on the next access the order will be refreshed from the item descriptors.


update

public void update(java.util.Observable o,
                   java.lang.Object arg)
This method is called whenever a property in a contained object changes and the containing object needs to be notified.

Specified by:
update in interface java.util.Observer
Parameters:
o - the object which changed
arg - the name of the property which changed

getSaveAllProperties

public boolean getSaveAllProperties()
Returns the saveAllProperties

Specified by:
getSaveAllProperties in interface ChangedProperties

setSaveAllProperties

public void setSaveAllProperties(boolean pSaveAllProperties)
Sets the saveAllProperties

Specified by:
setSaveAllProperties in interface ChangedProperties

isChanged

public boolean isChanged()
Returns the isChanged flag

Specified by:
isChanged in interface ChangedProperties
Specified by:
isChanged in interface Order

setChanged

public void setChanged(boolean pChanged)
Marks this object as changed

Specified by:
setChanged in interface ChangedProperties

getChangedProperties

public java.util.Set getChangedProperties()
Returns the changedProperties

Specified by:
getChangedProperties in interface ChangedProperties

addChangedProperty

public void addChangedProperty(java.lang.String pPropertyName)
Adds a changedProperty

Specified by:
addChangedProperty in interface ChangedProperties

clearChangedProperties

public void clearChangedProperties()
Clears the changedProperties List

Specified by:
clearChangedProperties in interface ChangedProperties

getRepositoryItem

public MutableRepositoryItem getRepositoryItem()
Returns the repositoryItem

Specified by:
getRepositoryItem in interface ChangedProperties

setRepositoryItem

public void setRepositoryItem(MutableRepositoryItem pRepositoryItem)
Sets the repositoryItem and calls updateVersion()

Specified by:
setRepositoryItem in interface ChangedProperties

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String pPropertyName)
Returns a property value

Specified by:
getPropertyValue in interface ChangedProperties
Returns:
returns a property value

setPropertyValue

public void setPropertyValue(java.lang.String pPropertyName,
                             java.lang.Object pPropertyValue)
Sets a property value

Specified by:
setPropertyValue in interface ChangedProperties
Parameters:
pPropertyValue - the value to set for the given property value

equals

public boolean equals(java.lang.Object pOrder)
Returns true if pOrder is the same as this Order. Equality is determined by comparing the ids of the Orders, the lastModifiedTime and transient properties.

Specified by:
equals in interface Order
Overrides:
equals in class java.lang.Object
Parameters:
pOrder - the Order to compare
Returns:
true if the Orders are equal, false otherwise

toString

public java.lang.String toString()
Method that renders the general order information in a readable string format

Overrides:
toString in class java.lang.Object