public class OrderProduct extends java.lang.Object implements OrderProductIf
| Constructor and Description |
|---|
OrderProduct()
Constructor
|
OrderProduct(com.workingdogs.village.Record vr,
KKCriteria c)
Instantiates the attributes of the OrderProduct object from a Record object
|
| Modifier and Type | Method and Description |
|---|---|
void |
calculateTotals(int scale,
int taxQuantityRule)
We calculate finalPriceIncTax, finalPriceExTax and tax starting from price which is the price
of one product without options and without tax.
|
java.lang.String |
getCustom1() |
java.lang.String |
getCustom10() |
java.lang.String |
getCustom11() |
java.lang.String |
getCustom2() |
java.lang.String |
getCustom3() |
java.lang.String |
getCustom4() |
java.lang.String |
getCustom5() |
java.lang.String |
getCustom6() |
java.lang.String |
getCustom7() |
java.lang.String |
getCustom8() |
java.lang.String |
getCustom9() |
ProdCustAttrIf[] |
getCustomAttrArray()
The array form of the Custom Attributes
|
java.lang.String |
getCustomAttrs()
The XML form of the Custom Attributes
|
java.math.BigDecimal |
getDiscountPercent()
Used mainly with percentage tiered pricing discounts to store the percentage discount.
|
java.math.BigDecimal |
getFinalPriceExTax() |
java.math.BigDecimal |
getFinalPriceIncTax() |
int |
getId() |
java.lang.String |
getModel()
The product model.
|
java.lang.String |
getName()
The product name.
|
OptionIf[] |
getOpts()
An array of Option objects defining how the details of the product.
|
OrderIf |
getOrder() |
int |
getOrderId() |
java.math.BigDecimal |
getPrice()
The price of a single product without tax or options.
|
java.math.BigDecimal |
getPrice0() |
java.math.BigDecimal |
getPrice1() |
java.math.BigDecimal |
getPrice2() |
java.math.BigDecimal |
getPrice3() |
java.math.BigDecimal |
getPricePerUnit() |
ProductIf |
getProduct() |
int |
getProductId() |
int |
getQtyResrvdForResId()
When a reservation id is present, this attribute defines the number of products that have
been reserved connected with this reservationId.
|
int |
getQuantity() |
int |
getRefundPoints()
The number of points allocated for a single product.
|
java.math.BigDecimal |
getRefundValue()
The final unit price of a product having taken into account all discounts.
|
int |
getReservationId()
Used when products are reserved during checkout to allow a customer to checkout without
risking the product going out of stock.
|
java.lang.String |
getSku()
The SKU of the product
|
int |
getState()
The state of the product when added to the order.
|
java.math.BigDecimal |
getTax()
The amount of tax added.
|
java.lang.String |
getTaxCode()
tax code used when looking up tax from an external service
|
java.math.BigDecimal |
getTaxRate()
The tax rate applied.
|
java.lang.String |
getTaxRateCode()
The code of the tax rate
|
int |
getType()
product type.
|
java.math.BigDecimal |
getWeight()
The weight of the product
|
int |
getWishListId()
Set to the id of the wish list (gift registry) to keep track that it has been added from a
gift registry.
|
int |
getWishListItemId()
Set to the id of the wish list item (gift registry item) to keep track that it has been added
from a gift registry and which item it corresponds to.
|
void |
setCustom1(java.lang.String custom1) |
void |
setCustom10(java.lang.String custom10) |
void |
setCustom11(java.lang.String custom11) |
void |
setCustom2(java.lang.String custom2) |
void |
setCustom3(java.lang.String custom3) |
void |
setCustom4(java.lang.String custom4) |
void |
setCustom5(java.lang.String custom5) |
void |
setCustom6(java.lang.String custom6) |
void |
setCustom7(java.lang.String custom7) |
void |
setCustom8(java.lang.String custom8) |
void |
setCustom9(java.lang.String custom9) |
void |
setCustomAttrArray(ProdCustAttrIf[] customAttrArray)
Set the array form of the Custom Attributes
|
void |
setCustomAttrs(java.lang.String customAttrs)
Set the XML form of the Custom Attributes
|
void |
setDiscountPercent(java.math.BigDecimal discountPercent)
Used mainly with percentage tiered pricing discounts to store the percentage discount.
|
void |
setFinalPriceExTax(java.math.BigDecimal finalPriceExTax) |
void |
setFinalPriceIncTax(java.math.BigDecimal finalPriceIncTax) |
void |
setId(int id) |
void |
setModel(java.lang.String model)
The product model.
|
void |
setName(java.lang.String name)
The product name.
|
void |
setOpts(OptionIf[] opts)
An array of Option objects defining how the details of the product.
|
void |
setOrder(OrderIf order) |
void |
setOrderId(int orderId) |
void |
setPrice(java.math.BigDecimal price)
The price of a single product without tax or options.
|
void |
setPrice0(java.math.BigDecimal price0) |
void |
setPrice1(java.math.BigDecimal price1) |
void |
setPrice2(java.math.BigDecimal price2) |
void |
setPrice3(java.math.BigDecimal price3) |
void |
setProduct(ProductIf product) |
void |
setProductId(int productId) |
void |
setQtyResrvdForResId(int qtyResrvdForResId)
When a reservation id is present, this attribute defines the number of products that have
been reserved connected with this reservationId.
|
void |
setQuantity(int quantity) |
void |
setRefundPoints(int refundPoints)
The number of points allocated for a single product.
|
void |
setRefundValue(java.math.BigDecimal refundValue)
The final unit price of a product having taken into account all discounts.
|
void |
setReservationId(int reservationId)
Used when products are reserved during checkout to allow a customer to checkout without
risking the product going out of stock.
|
void |
setSku(java.lang.String sku)
The SKU of the product
|
void |
setState(int state)
The state of the product when added to the order.
|
void |
setTax(java.math.BigDecimal tax)
The amount of tax added.
|
void |
setTaxCode(java.lang.String taxCode)
tax code used when looking up tax from an external service
|
void |
setTaxRate(java.math.BigDecimal taxRate)
The tax rate applied.
|
void |
setTaxRateCode(java.lang.String taxRateCode)
The code of the tax rate
|
void |
setType(int type)
product type.
|
void |
setWeight(java.math.BigDecimal weight)
The weight of the product
|
void |
setWishListId(int wishListId)
Set to the id of the wish list (gift registry) to keep track that it has been added from a
gift registry.
|
void |
setWishListItemId(int wishListItemId)
Set to the id of the wish list item (gift registry item) to keep track that it has been added
from a gift registry and which item it corresponds to.
|
java.lang.String |
toString() |
public OrderProduct()
public OrderProduct(com.workingdogs.village.Record vr,
KKCriteria c)
throws com.workingdogs.village.DataSetException
vr - Record containing datac - Criteria containing column namescom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public java.lang.String toString()
toString in class java.lang.Objectpublic void calculateTotals(int scale,
int taxQuantityRule)
scale - The scale used in the calculationstaxQuantityRule - The tax calculation rule to usepublic int getId()
getId in interface OrderProductIfpublic void setId(int id)
setId in interface OrderProductIfid - The id to set.public java.lang.String getModel()
OrderProductIfgetModel in interface OrderProductIfpublic void setModel(java.lang.String model)
OrderProductIfsetModel in interface OrderProductIfmodel - The model to set.public java.lang.String getName()
OrderProductIfgetName in interface OrderProductIfpublic void setName(java.lang.String name)
OrderProductIfsetName in interface OrderProductIfname - The name to set.public OptionIf[] getOpts()
OrderProductIfgetOpts in interface OrderProductIfpublic void setOpts(OptionIf[] opts)
OrderProductIfsetOpts in interface OrderProductIfopts - The opts to set.public OrderIf getOrder()
getOrder in interface OrderProductIfpublic void setOrder(OrderIf order)
setOrder in interface OrderProductIforder - The order to set.public int getOrderId()
getOrderId in interface OrderProductIfpublic void setOrderId(int orderId)
setOrderId in interface OrderProductIforderId - The orderId to set.public java.math.BigDecimal getPrice()
OrderProductIfgetPrice in interface OrderProductIfpublic java.math.BigDecimal getPricePerUnit()
public void setPrice(java.math.BigDecimal price)
OrderProductIfsetPrice in interface OrderProductIfprice - The price to set.public ProductIf getProduct()
getProduct in interface OrderProductIfpublic void setProduct(ProductIf product)
setProduct in interface OrderProductIfproduct - The product to set.public int getProductId()
getProductId in interface OrderProductIfpublic void setProductId(int productId)
setProductId in interface OrderProductIfproductId - The productId to set.public int getQuantity()
getQuantity in interface OrderProductIfpublic void setQuantity(int quantity)
setQuantity in interface OrderProductIfquantity - The quantity to set.public java.math.BigDecimal getFinalPriceExTax()
getFinalPriceExTax in interface OrderProductIfpublic void setFinalPriceExTax(java.math.BigDecimal finalPriceExTax)
setFinalPriceExTax in interface OrderProductIffinalPriceExTax - The finalPriceExTax to set.public java.math.BigDecimal getFinalPriceIncTax()
getFinalPriceIncTax in interface OrderProductIfpublic void setFinalPriceIncTax(java.math.BigDecimal finalPriceIncTax)
setFinalPriceIncTax in interface OrderProductIffinalPriceIncTax - The finalPriceIncTax to set.public java.math.BigDecimal getTaxRate()
OrderProductIfgetTaxRate in interface OrderProductIfpublic void setTaxRate(java.math.BigDecimal taxRate)
OrderProductIfsetTaxRate in interface OrderProductIftaxRate - The taxRate to set.public java.math.BigDecimal getTax()
OrderProductIfgetTax in interface OrderProductIfpublic void setTax(java.math.BigDecimal tax)
OrderProductIfsetTax in interface OrderProductIftax - The tax to set.public int getType()
OrderProductIfgetType in interface OrderProductIfpublic void setType(int type)
OrderProductIfsetType in interface OrderProductIftype - The type to set.public java.lang.String getCustom1()
getCustom1 in interface OrderProductIfpublic void setCustom1(java.lang.String custom1)
setCustom1 in interface OrderProductIfcustom1 - The custom1 to set.public java.lang.String getCustom2()
getCustom2 in interface OrderProductIfpublic void setCustom2(java.lang.String custom2)
setCustom2 in interface OrderProductIfcustom2 - The custom2 to set.public java.lang.String getCustom3()
getCustom3 in interface OrderProductIfpublic void setCustom3(java.lang.String custom3)
setCustom3 in interface OrderProductIfcustom3 - The custom3 to set.public java.lang.String getCustom4()
getCustom4 in interface OrderProductIfpublic void setCustom4(java.lang.String custom4)
setCustom4 in interface OrderProductIfcustom4 - The custom4 to set.public java.lang.String getCustom5()
getCustom5 in interface OrderProductIfpublic void setCustom5(java.lang.String custom5)
setCustom5 in interface OrderProductIfcustom5 - The custom5 to set.public java.lang.String getCustom6()
getCustom6 in interface OrderProductIfpublic void setCustom6(java.lang.String custom6)
setCustom6 in interface OrderProductIfcustom6 - the custom6 to setpublic java.lang.String getCustom7()
getCustom7 in interface OrderProductIfpublic void setCustom7(java.lang.String custom7)
setCustom7 in interface OrderProductIfcustom7 - the custom7 to setpublic java.lang.String getCustom8()
getCustom8 in interface OrderProductIfpublic void setCustom8(java.lang.String custom8)
setCustom8 in interface OrderProductIfcustom8 - the custom8 to setpublic java.lang.String getCustom9()
getCustom9 in interface OrderProductIfpublic void setCustom9(java.lang.String custom9)
setCustom9 in interface OrderProductIfcustom9 - the custom9 to setpublic java.lang.String getCustom10()
getCustom10 in interface OrderProductIfpublic void setCustom10(java.lang.String custom10)
setCustom10 in interface OrderProductIfcustom10 - the custom10 to setpublic java.lang.String getCustom11()
getCustom11 in interface OrderProductIfpublic void setCustom11(java.lang.String custom11)
setCustom11 in interface OrderProductIfcustom11 - the custom11 to setpublic java.math.BigDecimal getPrice0()
getPrice0 in interface OrderProductIfpublic void setPrice0(java.math.BigDecimal price0)
setPrice0 in interface OrderProductIfprice0 - The price0 to set.public java.math.BigDecimal getPrice1()
getPrice1 in interface OrderProductIfpublic void setPrice1(java.math.BigDecimal price1)
setPrice1 in interface OrderProductIfprice1 - The price1 to set.public java.math.BigDecimal getPrice2()
getPrice2 in interface OrderProductIfpublic void setPrice2(java.math.BigDecimal price2)
setPrice2 in interface OrderProductIfprice2 - The price2 to set.public java.math.BigDecimal getPrice3()
getPrice3 in interface OrderProductIfpublic void setPrice3(java.math.BigDecimal price3)
setPrice3 in interface OrderProductIfprice3 - The price3 to set.public java.lang.String getSku()
OrderProductIfgetSku in interface OrderProductIfpublic void setSku(java.lang.String sku)
OrderProductIfsetSku in interface OrderProductIfsku - the sku to setpublic int getState()
OrderProductIfgetState in interface OrderProductIfpublic void setState(int state)
OrderProductIfsetState in interface OrderProductIfstate - the state to setpublic int getWishListId()
OrderProductIfgetWishListId in interface OrderProductIfpublic void setWishListId(int wishListId)
OrderProductIfsetWishListId in interface OrderProductIfwishListId - the wishListId to setpublic int getWishListItemId()
OrderProductIfgetWishListItemId in interface OrderProductIfpublic void setWishListItemId(int wishListItemId)
OrderProductIfsetWishListItemId in interface OrderProductIfwishListItemId - the wishListItemId to setpublic java.math.BigDecimal getDiscountPercent()
OrderProductIfgetDiscountPercent in interface OrderProductIfpublic void setDiscountPercent(java.math.BigDecimal discountPercent)
OrderProductIfsetDiscountPercent in interface OrderProductIfdiscountPercent - the discountPercent to setpublic java.math.BigDecimal getWeight()
OrderProductIfgetWeight in interface OrderProductIfpublic void setWeight(java.math.BigDecimal weight)
OrderProductIfsetWeight in interface OrderProductIfweight - the weight to setpublic java.lang.String getTaxCode()
OrderProductIfgetTaxCode in interface OrderProductIfpublic void setTaxCode(java.lang.String taxCode)
OrderProductIfsetTaxCode in interface OrderProductIftaxCode - the taxCode to setpublic int getReservationId()
OrderProductIfgetReservationId in interface OrderProductIfpublic void setReservationId(int reservationId)
OrderProductIfsetReservationId in interface OrderProductIfreservationId - the reservationId to setpublic int getQtyResrvdForResId()
OrderProductIfgetQtyResrvdForResId in interface OrderProductIfpublic void setQtyResrvdForResId(int qtyResrvdForResId)
OrderProductIfsetQtyResrvdForResId in interface OrderProductIfqtyResrvdForResId - the qtyResrvdForResId to setpublic java.math.BigDecimal getRefundValue()
getRefundValue in interface OrderProductIfpublic void setRefundValue(java.math.BigDecimal refundValue)
setRefundValue in interface OrderProductIfrefundValue - the refundValue to setpublic int getRefundPoints()
getRefundPoints in interface OrderProductIfpublic void setRefundPoints(int refundPoints)
setRefundPoints in interface OrderProductIfrefundPoints - the refundPoints to setpublic java.lang.String getCustomAttrs()
OrderProductIfgetCustomAttrs in interface OrderProductIfpublic void setCustomAttrs(java.lang.String customAttrs)
OrderProductIfsetCustomAttrs in interface OrderProductIfcustomAttrs - the customAttrs to setpublic ProdCustAttrIf[] getCustomAttrArray()
OrderProductIfgetCustomAttrArray in interface OrderProductIfpublic void setCustomAttrArray(ProdCustAttrIf[] customAttrArray)
OrderProductIfsetCustomAttrArray in interface OrderProductIfcustomAttrArray - the customAttrArray to setpublic java.lang.String getTaxRateCode()
OrderProductIfgetTaxRateCode in interface OrderProductIfpublic void setTaxRateCode(java.lang.String taxRateCode)
OrderProductIfsetTaxRateCode in interface OrderProductIftaxRateCode - the taxRateCode to setCopyright © 2018 DS Data Systems UK Ltd.