public class PricingCommerceItem extends java.lang.Object implements CommerceItem
These CommerceItems cannot be used in the default Order management system. If you need to add a CommerceItem to an order one should use the OrderManager APIs.
OrderManager
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
PricingCommerceItem()
Constructs an instanceof PricingCommerceItem
|
Modifier and Type | Method and Description |
---|---|
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 |
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 |
addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship)
Add the ShippingGroupRelationship to the container.
|
void |
addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship,
int pIndex)
Add the ShippingGroupRelationship to the container at the given index.
|
void |
clear()
Clears the instance as if it was just constructed
|
AuxiliaryData |
getAuxiliaryData()
returns the AuxiliaryData.
|
java.lang.String |
getCatalogId()
Returns property CatalogId
|
java.lang.String |
getCatalogKey()
Returns property CatalogKey
|
java.lang.String |
getCatalogRefId()
Returns property CatalogRefId
|
java.lang.String |
getCommerceItemClassType()
Returns the commerceItemClassType
|
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.lang.String |
getExternalId()
Returns property externalId.
|
java.lang.String |
getId()
Returns property Id
|
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
|
ItemPriceInfo |
getPriceInfo()
Returns property PriceInfo
|
long |
getQuantity()
Returns property Quantity
|
double |
getQuantityDerivedAsFloatingPoint()
This method will return a derived quantity value which this CommerceItem object represents.
|
double |
getQuantityWithFraction()
Returns the quantity with fraction to add for a new commerce item
|
long |
getReturnedQuantity()
Returns the returnedQuantity
|
double |
getReturnedQuantityDerivedAsFloatingPoint()
This method will return a derived returned quantity value which this CommerceItem object represents.
|
double |
getReturnedQuantityWithFraction()
Returns the returned quantity (with fraction)
|
ShippingGroupRelationship |
getShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId)
Returns the ShippingGroupRelationship whose id is pShippingGroupRelationshipId.
|
int |
getShippingGroupRelationshipCount()
Returns the number of ShippingGroupRelationships in the container.
|
java.util.List |
getShippingGroupRelationships()
Returns a List of ShippingGroupRelationships
|
int |
getState()
Returns property State
|
java.lang.String |
getStateDetail()
Returns property StateDetail
|
boolean |
isFractional()
This returns
true if fractional quantity is set (i.e. |
void |
removeAllCostCenterRelationships()
Removes all the CostCenterRelationships
|
void |
removeAllPaymentGroupRelationships()
Removes all the PaymentGroupRelationships
|
void |
removeAllShippingGroupRelationships()
Removes all the ShippingGroupRelationships
|
CostCenterRelationship |
removeCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
Removes a CostCenterRelationship whose id is passed in.
|
PaymentGroupRelationship |
removePaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
Removes a PaymentGroupRelationship whose id is passed in.
|
ShippingGroupRelationship |
removeShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId)
Removes a ShippingGroupRelationship whose id is passed in.
|
void |
setCatalogId(java.lang.String pCatalogId)
Sets property CatalogId
|
void |
setCatalogKey(java.lang.String pCatalogKey)
Sets property CatalogKey
|
void |
setCatalogRefId(java.lang.String pCatalogRefId)
Sets property CatalogRefId
|
void |
setCommerceItemClassType(java.lang.String pCommerceItemClassType)
Sets the commerceItemClassType
|
void |
setExternalId(java.lang.String pExternalId)
Sets property externalId.
|
void |
setId(java.lang.String pId)
Sets property Id
|
void |
setPriceInfo(ItemPriceInfo pPriceInfo)
Sets property PriceInfo
|
void |
setQuantity(long pQuantity)
Sets property Quantity
|
void |
setQuantityWithFraction(double pQuantityWithFraction)
Sets the quantity with fraction to add for a new commerce item
|
void |
setReturnedQuantity(long pReturnedQuantity)
Sets the returnedQuantity
|
void |
setReturnedQuantityWithFraction(double pReturnedQuantityWithFraction)
Sets the returned quantity (with fraction)
|
void |
setState(int pState)
Sets property State
|
void |
setStateDetail(java.lang.String pStateDetail)
Sets property StateDetail
|
public PricingCommerceItem()
public void setId(java.lang.String pId)
public java.lang.String getId()
getId
in interface CommerceIdentifier
public void setExternalId(java.lang.String pExternalId)
setExternalId
in interface CommerceItem
public java.lang.String getExternalId()
getExternalId
in interface CommerceItem
public void setCommerceItemClassType(java.lang.String pCommerceItemClassType)
setCommerceItemClassType
in interface CommerceItem
public java.lang.String getCommerceItemClassType()
getCommerceItemClassType
in interface CommerceItem
public void setCatalogKey(java.lang.String pCatalogKey)
setCatalogKey
in interface CommerceItem
public java.lang.String getCatalogKey()
getCatalogKey
in interface CommerceItem
public void setCatalogId(java.lang.String pCatalogId)
setCatalogId
in interface CommerceItem
public java.lang.String getCatalogId()
getCatalogId
in interface CommerceItem
public void setCatalogRefId(java.lang.String pCatalogRefId)
setCatalogRefId
in interface CommerceItem
public java.lang.String getCatalogRefId()
getCatalogRefId
in interface CommerceItem
public void setQuantity(long pQuantity)
setQuantity
in interface CommerceItem
pQuantity
- the new value for the quantitypublic long getQuantity()
getQuantity
in interface CommerceItem
public void setQuantityWithFraction(double pQuantityWithFraction)
setQuantityWithFraction
in interface CommerceItem
pQuantityWithFraction
- represents the fractional quantity.public double getQuantityWithFraction()
getQuantityWithFraction
in interface CommerceItem
double
value.public double getQuantityDerivedAsFloatingPoint()
It will decide upon the correct quantity value to return, returning the first non null
value from the properties, quantityWithFraction
, quantity
, in that order.
The method should be used where there is a need to know the quantity of an item
but it is unknown to the caller as to which property (quantityWithFraction
or
quantity
holds the value.
getQuantityDerivedAsFloatingPoint
in interface CommerceItem
public boolean isFractional()
true
if fractional quantity is set (i.e. it has the
fractional value which is greater than zero) for the item for which this relationship
represents, otherwise false
is returned.isFractional
in interface CommerceItem
boolean
value.public long getReturnedQuantity()
getReturnedQuantity
in interface CommerceItem
public void setReturnedQuantity(long pReturnedQuantity)
public double getReturnedQuantityWithFraction()
getReturnedQuantityWithFraction
in interface CommerceItem
public void setReturnedQuantityWithFraction(double pReturnedQuantityWithFraction)
ReturnedQuantityWithFraction
- the returned quantity (with fraction)public double getReturnedQuantityDerivedAsFloatingPoint()
It will decide upon the correct returned quantity value to return, returning the first non zero
value from the properties, returnedQuantityWithFraction
, returnedQuantity
, in that order.
The method should be used where there is a need to know the returned quantity of an item
but it is unknown to the caller as to which property (returnedQuantityWithFraction
or
returnedQuantity
holds the value.
getReturnedQuantityDerivedAsFloatingPoint
in interface CommerceItem
public void setState(int pState)
setState
in interface CommerceItem
public int getState()
getState
in interface CommerceItem
public void setStateDetail(java.lang.String pStateDetail)
setStateDetail
in interface CommerceItem
public java.lang.String getStateDetail()
getStateDetail
in interface CommerceItem
public void setPriceInfo(ItemPriceInfo pPriceInfo)
setPriceInfo
in interface CommerceItem
pPriceInfo
- the PriceInfo object to setpublic ItemPriceInfo getPriceInfo()
getPriceInfo
in interface CommerceItem
public AuxiliaryData getAuxiliaryData()
getAuxiliaryData
in interface CommerceItem
public java.util.List getShippingGroupRelationships()
getShippingGroupRelationships
in interface ShippingGroupRelationshipContainer
public void addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship) throws DuplicateRelationshipException, InvalidParameterException
addShippingGroupRelationship
in interface ShippingGroupRelationshipContainer
DuplicateRelationshipException
InvalidParameterException
public void addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship, int pIndex) throws DuplicateRelationshipException, InvalidParameterException
addShippingGroupRelationship
in interface ShippingGroupRelationshipContainer
DuplicateRelationshipException
InvalidParameterException
public ShippingGroupRelationship removeShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId) throws RelationshipNotFoundException, InvalidParameterException
removeShippingGroupRelationship
in interface ShippingGroupRelationshipContainer
RelationshipNotFoundException
InvalidParameterException
public void removeAllShippingGroupRelationships()
removeAllShippingGroupRelationships
in interface ShippingGroupRelationshipContainer
public ShippingGroupRelationship getShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId) throws RelationshipNotFoundException, InvalidParameterException
getShippingGroupRelationship
in interface ShippingGroupRelationshipContainer
RelationshipNotFoundException
InvalidParameterException
public int getShippingGroupRelationshipCount()
getShippingGroupRelationshipCount
in interface ShippingGroupRelationshipContainer
public java.util.List getPaymentGroupRelationships()
getPaymentGroupRelationships
in interface PaymentGroupRelationshipContainer
public void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship) throws DuplicateRelationshipException, InvalidParameterException
addPaymentGroupRelationship
in interface PaymentGroupRelationshipContainer
DuplicateRelationshipException
InvalidParameterException
public void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship, int pIndex) throws DuplicateRelationshipException, InvalidParameterException
addPaymentGroupRelationship
in interface PaymentGroupRelationshipContainer
DuplicateRelationshipException
InvalidParameterException
public PaymentGroupRelationship removePaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId) throws RelationshipNotFoundException, InvalidParameterException
removePaymentGroupRelationship
in interface PaymentGroupRelationshipContainer
RelationshipNotFoundException
InvalidParameterException
public void removeAllPaymentGroupRelationships()
removeAllPaymentGroupRelationships
in interface PaymentGroupRelationshipContainer
public PaymentGroupRelationship getPaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId) throws RelationshipNotFoundException, InvalidParameterException
getPaymentGroupRelationship
in interface PaymentGroupRelationshipContainer
RelationshipNotFoundException
InvalidParameterException
public int getPaymentGroupRelationshipCount()
getPaymentGroupRelationshipCount
in interface PaymentGroupRelationshipContainer
public java.util.List getCostCenterRelationships()
getCostCenterRelationships
in interface CostCenterRelationshipContainer
public void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship) throws DuplicateRelationshipException, InvalidParameterException
addCostCenterRelationship
in interface CostCenterRelationshipContainer
DuplicateRelationshipException
InvalidParameterException
public void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship, int pIndex) throws DuplicateRelationshipException, InvalidParameterException
addCostCenterRelationship
in interface CostCenterRelationshipContainer
DuplicateRelationshipException
InvalidParameterException
public CostCenterRelationship removeCostCenterRelationship(java.lang.String pCostCenterRelationshipId) throws RelationshipNotFoundException, InvalidParameterException
removeCostCenterRelationship
in interface CostCenterRelationshipContainer
RelationshipNotFoundException
InvalidParameterException
public void removeAllCostCenterRelationships()
removeAllCostCenterRelationships
in interface CostCenterRelationshipContainer
public CostCenterRelationship getCostCenterRelationship(java.lang.String pCostCenterRelationshipId) throws RelationshipNotFoundException, InvalidParameterException
getCostCenterRelationship
in interface CostCenterRelationshipContainer
RelationshipNotFoundException
InvalidParameterException
public int getCostCenterRelationshipCount()
getCostCenterRelationshipCount
in interface CostCenterRelationshipContainer
public void clear()