atg.b2bcommerce.order
Class CostCenterCommerceItemRelationship

java.lang.Object
  extended by atg.commerce.order.CommerceIdentifierImpl
      extended by atg.b2bcommerce.order.CostCenterCommerceItemRelationship
All Implemented Interfaces:
B2BCommerceItemRelationship, CostCenterRelationship, ChangedProperties, CommerceIdentifier, CommerceItemRelationship, Relationship, java.io.Serializable, java.util.Observer

public class CostCenterCommerceItemRelationship
extends CommerceIdentifierImpl
implements B2BCommerceItemRelationship, CostCenterRelationship, ChangedProperties

An object which represents a relationship between a CommerceItem and a CostCenter. The valid relationship types are Quantity and QuantityRemaining. Quantity specifies that the quantity in this relationship represents the maximum that can be assigned to the CostCenter for purchasing this item. QuantityRemaining specifies the quantity of the CommerceItem which has not been assigned should be assigned to the CostCenter in this Relationship.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
CostCenterCommerceItemRelationship()
           
 
Method Summary
 void addChangedProperty(java.lang.String pPropertyName)
          Adds a changedProperty
 void clearChangedProperties()
          Clears the changedProperties List
 double getAmount()
          Returns the amount that this relationship represents
 B2BCommerceItem getB2BCommerceItem()
          Returns the CommerceItem reference.
 java.util.Set getChangedProperties()
          Returns the changedProperties
 CommerceItem getCommerceItem()
          Returns the CommerceItem reference.
 CostCenter getCostCenter()
          Returns the CostCenter reference.
 java.lang.Object getPropertyValue(java.lang.String pPropertyName)
          Returns a property value, if the property is not defined in the underlying item-descriptor null is returned.
 long getQuantity()
          Returns the quantity that this Relationship represents.
 java.lang.String getRelationshipClassType()
          Returns the relationshipClassType
 int getRelationshipType()
          Returns the Relationship type.
 java.lang.String getRelationshipTypeAsString()
          Returns the Relationship type as a String.
 MutableRepositoryItem getRepositoryItem()
          Returns the repositoryItem
 long getReturnedQuantity()
          This method is required by the interface but not used for this class
 boolean getSaveAllProperties()
          Returns the saveAllProperties
 int getState()
          This method is required by the interface but not used for this class
 java.lang.String getStateDetail()
          Returns the stateDetail
 boolean isChanged()
          Returns the isChanged flag
 void setAmount(double pAmount)
          Sets the amount that this relationship represents
 void setB2BCommerceItem(B2BCommerceItem pCommerceItem)
          Sets the CommerceItem reference.
 void setChanged(boolean pChanged)
          Marks this object as changed
 void setCommerceItem(CommerceItem pItem)
          Sets the CommerceItem reference.
 void setCostCenter(CostCenter pCostCenter)
          Sets the CostCenter reference.
 void setPropertyValue(java.lang.String pPropertyName, java.lang.Object pPropertyValue)
          Sets a property value
 void setQuantity(long pQuantity)
          Sets the quantity that this Relationship represents.
 void setRelationshipClassType(java.lang.String pRelationshipClassType)
          Sets the relationshipClassType
 void setRelationshipType(int pType)
          Set the Relationship type.
 void setRelationshipTypeAsString(java.lang.String pType)
          Set the Relationship type as a String.
 void setRepositoryItem(MutableRepositoryItem pRepositoryItem)
          Sets the repositoryItem
 void setReturnedQuantity(long pReturnedQuantity)
          This method is required by the interface but not used for this class
 void setSaveAllProperties(boolean pSaveAllProperties)
          Sets the saveAllProperties
 void setState(int pState)
          This method is required by the interface but not used for this class
 void setStateDetail(java.lang.String pStateDetail)
          Sets the stateDetail
 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.
 
Methods inherited from class atg.commerce.order.CommerceIdentifierImpl
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

Constructor Detail

CostCenterCommerceItemRelationship

public CostCenterCommerceItemRelationship()
Method Detail

getRelationshipClassType

public java.lang.String getRelationshipClassType()
Returns the relationshipClassType

Specified by:
getRelationshipClassType in interface Relationship

setRelationshipClassType

public void setRelationshipClassType(java.lang.String pRelationshipClassType)
Sets the relationshipClassType

Specified by:
setRelationshipClassType in interface Relationship

getRelationshipType

public int getRelationshipType()
Returns the Relationship type.

Specified by:
getRelationshipType in interface Relationship

setRelationshipType

public void setRelationshipType(int pType)
                         throws InvalidTypeException
Set the Relationship type.

Specified by:
setRelationshipType in interface Relationship
Throws:
InvalidTypeException

getRelationshipTypeAsString

public java.lang.String getRelationshipTypeAsString()
Returns the Relationship type as a String.


setRelationshipTypeAsString

public void setRelationshipTypeAsString(java.lang.String pType)
                                 throws InvalidTypeException
Set the Relationship type as a String.

Throws:
InvalidTypeException

getCostCenter

public CostCenter getCostCenter()
Returns the CostCenter reference.

Specified by:
getCostCenter in interface CostCenterRelationship

setCostCenter

public void setCostCenter(CostCenter pCostCenter)
Sets the CostCenter reference.

Specified by:
setCostCenter in interface CostCenterRelationship

getCommerceItem

public CommerceItem getCommerceItem()
Description copied from interface: CommerceItemRelationship
Returns the CommerceItem reference.

Specified by:
getCommerceItem in interface CommerceItemRelationship

setCommerceItem

public void setCommerceItem(CommerceItem pItem)
Description copied from interface: CommerceItemRelationship
Sets the CommerceItem reference.

Specified by:
setCommerceItem in interface CommerceItemRelationship

getB2BCommerceItem

public B2BCommerceItem getB2BCommerceItem()
Returns the CommerceItem reference.

Specified by:
getB2BCommerceItem in interface B2BCommerceItemRelationship

setB2BCommerceItem

public void setB2BCommerceItem(B2BCommerceItem pCommerceItem)
Sets the CommerceItem reference.

Specified by:
setB2BCommerceItem in interface B2BCommerceItemRelationship

getState

public int getState()
This method is required by the interface but not used for this class

Specified by:
getState in interface CommerceItemRelationship

setState

public void setState(int pState)
This method is required by the interface but not used for this class

Specified by:
setState in interface CommerceItemRelationship

getStateDetail

public java.lang.String getStateDetail()
Returns the stateDetail

Specified by:
getStateDetail in interface CommerceItemRelationship

setStateDetail

public void setStateDetail(java.lang.String pStateDetail)
Sets the stateDetail

Specified by:
setStateDetail in interface CommerceItemRelationship

getQuantity

public long getQuantity()
Returns the quantity that this Relationship represents.

Specified by:
getQuantity in interface CommerceItemRelationship

setQuantity

public void setQuantity(long pQuantity)
Sets the quantity that this Relationship represents.

Specified by:
setQuantity in interface CommerceItemRelationship

getReturnedQuantity

public long getReturnedQuantity()
This method is required by the interface but not used for this class

Specified by:
getReturnedQuantity in interface CommerceItemRelationship

setReturnedQuantity

public void setReturnedQuantity(long pReturnedQuantity)
This method is required by the interface but not used for this class

Specified by:
setReturnedQuantity in interface CommerceItemRelationship

getAmount

public double getAmount()
Returns the amount that this relationship represents

Specified by:
getAmount in interface CostCenterRelationship
Specified by:
getAmount in interface CommerceItemRelationship

setAmount

public void setAmount(double pAmount)
Sets the amount that this relationship represents

Specified by:
setAmount in interface CostCenterRelationship
Specified by:
setAmount in interface CommerceItemRelationship

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

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

Specified by:
setRepositoryItem in interface ChangedProperties

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String pPropertyName)
Returns a property value, if the property is not defined in the underlying item-descriptor null is returned.

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