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.Object
public void calculateTotals(int scale, int taxQuantityRule)
scale
- The scale used in the calculationstaxQuantityRule
- The tax calculation rule to usepublic int getId()
getId
in interface OrderProductIf
public void setId(int id)
setId
in interface OrderProductIf
id
- The id to set.public java.lang.String getModel()
OrderProductIf
getModel
in interface OrderProductIf
public void setModel(java.lang.String model)
OrderProductIf
setModel
in interface OrderProductIf
model
- The model to set.public java.lang.String getName()
OrderProductIf
getName
in interface OrderProductIf
public void setName(java.lang.String name)
OrderProductIf
setName
in interface OrderProductIf
name
- The name to set.public OptionIf[] getOpts()
OrderProductIf
getOpts
in interface OrderProductIf
public void setOpts(OptionIf[] opts)
OrderProductIf
setOpts
in interface OrderProductIf
opts
- The opts to set.public OrderIf getOrder()
getOrder
in interface OrderProductIf
public void setOrder(OrderIf order)
setOrder
in interface OrderProductIf
order
- The order to set.public int getOrderId()
getOrderId
in interface OrderProductIf
public void setOrderId(int orderId)
setOrderId
in interface OrderProductIf
orderId
- The orderId to set.public java.math.BigDecimal getPrice()
OrderProductIf
getPrice
in interface OrderProductIf
public java.math.BigDecimal getPricePerUnit()
public void setPrice(java.math.BigDecimal price)
OrderProductIf
setPrice
in interface OrderProductIf
price
- The price to set.public ProductIf getProduct()
getProduct
in interface OrderProductIf
public void setProduct(ProductIf product)
setProduct
in interface OrderProductIf
product
- The product to set.public int getProductId()
getProductId
in interface OrderProductIf
public void setProductId(int productId)
setProductId
in interface OrderProductIf
productId
- The productId to set.public int getQuantity()
getQuantity
in interface OrderProductIf
public void setQuantity(int quantity)
setQuantity
in interface OrderProductIf
quantity
- The quantity to set.public java.math.BigDecimal getFinalPriceExTax()
getFinalPriceExTax
in interface OrderProductIf
public void setFinalPriceExTax(java.math.BigDecimal finalPriceExTax)
setFinalPriceExTax
in interface OrderProductIf
finalPriceExTax
- The finalPriceExTax to set.public java.math.BigDecimal getFinalPriceIncTax()
getFinalPriceIncTax
in interface OrderProductIf
public void setFinalPriceIncTax(java.math.BigDecimal finalPriceIncTax)
setFinalPriceIncTax
in interface OrderProductIf
finalPriceIncTax
- The finalPriceIncTax to set.public java.math.BigDecimal getTaxRate()
OrderProductIf
getTaxRate
in interface OrderProductIf
public void setTaxRate(java.math.BigDecimal taxRate)
OrderProductIf
setTaxRate
in interface OrderProductIf
taxRate
- The taxRate to set.public java.math.BigDecimal getTax()
OrderProductIf
getTax
in interface OrderProductIf
public void setTax(java.math.BigDecimal tax)
OrderProductIf
setTax
in interface OrderProductIf
tax
- The tax to set.public int getType()
OrderProductIf
getType
in interface OrderProductIf
public void setType(int type)
OrderProductIf
setType
in interface OrderProductIf
type
- The type to set.public java.lang.String getCustom1()
getCustom1
in interface OrderProductIf
public void setCustom1(java.lang.String custom1)
setCustom1
in interface OrderProductIf
custom1
- The custom1 to set.public java.lang.String getCustom2()
getCustom2
in interface OrderProductIf
public void setCustom2(java.lang.String custom2)
setCustom2
in interface OrderProductIf
custom2
- The custom2 to set.public java.lang.String getCustom3()
getCustom3
in interface OrderProductIf
public void setCustom3(java.lang.String custom3)
setCustom3
in interface OrderProductIf
custom3
- The custom3 to set.public java.lang.String getCustom4()
getCustom4
in interface OrderProductIf
public void setCustom4(java.lang.String custom4)
setCustom4
in interface OrderProductIf
custom4
- The custom4 to set.public java.lang.String getCustom5()
getCustom5
in interface OrderProductIf
public void setCustom5(java.lang.String custom5)
setCustom5
in interface OrderProductIf
custom5
- The custom5 to set.public java.lang.String getCustom6()
getCustom6
in interface OrderProductIf
public void setCustom6(java.lang.String custom6)
setCustom6
in interface OrderProductIf
custom6
- the custom6 to setpublic java.lang.String getCustom7()
getCustom7
in interface OrderProductIf
public void setCustom7(java.lang.String custom7)
setCustom7
in interface OrderProductIf
custom7
- the custom7 to setpublic java.lang.String getCustom8()
getCustom8
in interface OrderProductIf
public void setCustom8(java.lang.String custom8)
setCustom8
in interface OrderProductIf
custom8
- the custom8 to setpublic java.lang.String getCustom9()
getCustom9
in interface OrderProductIf
public void setCustom9(java.lang.String custom9)
setCustom9
in interface OrderProductIf
custom9
- the custom9 to setpublic java.lang.String getCustom10()
getCustom10
in interface OrderProductIf
public void setCustom10(java.lang.String custom10)
setCustom10
in interface OrderProductIf
custom10
- the custom10 to setpublic java.lang.String getCustom11()
getCustom11
in interface OrderProductIf
public void setCustom11(java.lang.String custom11)
setCustom11
in interface OrderProductIf
custom11
- the custom11 to setpublic java.math.BigDecimal getPrice0()
getPrice0
in interface OrderProductIf
public void setPrice0(java.math.BigDecimal price0)
setPrice0
in interface OrderProductIf
price0
- The price0 to set.public java.math.BigDecimal getPrice1()
getPrice1
in interface OrderProductIf
public void setPrice1(java.math.BigDecimal price1)
setPrice1
in interface OrderProductIf
price1
- The price1 to set.public java.math.BigDecimal getPrice2()
getPrice2
in interface OrderProductIf
public void setPrice2(java.math.BigDecimal price2)
setPrice2
in interface OrderProductIf
price2
- The price2 to set.public java.math.BigDecimal getPrice3()
getPrice3
in interface OrderProductIf
public void setPrice3(java.math.BigDecimal price3)
setPrice3
in interface OrderProductIf
price3
- The price3 to set.public java.lang.String getSku()
OrderProductIf
getSku
in interface OrderProductIf
public void setSku(java.lang.String sku)
OrderProductIf
setSku
in interface OrderProductIf
sku
- the sku to setpublic int getState()
OrderProductIf
getState
in interface OrderProductIf
public void setState(int state)
OrderProductIf
setState
in interface OrderProductIf
state
- the state to setpublic int getWishListId()
OrderProductIf
getWishListId
in interface OrderProductIf
public void setWishListId(int wishListId)
OrderProductIf
setWishListId
in interface OrderProductIf
wishListId
- the wishListId to setpublic int getWishListItemId()
OrderProductIf
getWishListItemId
in interface OrderProductIf
public void setWishListItemId(int wishListItemId)
OrderProductIf
setWishListItemId
in interface OrderProductIf
wishListItemId
- the wishListItemId to setpublic java.math.BigDecimal getDiscountPercent()
OrderProductIf
getDiscountPercent
in interface OrderProductIf
public void setDiscountPercent(java.math.BigDecimal discountPercent)
OrderProductIf
setDiscountPercent
in interface OrderProductIf
discountPercent
- the discountPercent to setpublic java.math.BigDecimal getWeight()
OrderProductIf
getWeight
in interface OrderProductIf
public void setWeight(java.math.BigDecimal weight)
OrderProductIf
setWeight
in interface OrderProductIf
weight
- the weight to setpublic java.lang.String getTaxCode()
OrderProductIf
getTaxCode
in interface OrderProductIf
public void setTaxCode(java.lang.String taxCode)
OrderProductIf
setTaxCode
in interface OrderProductIf
taxCode
- the taxCode to setpublic int getReservationId()
OrderProductIf
getReservationId
in interface OrderProductIf
public void setReservationId(int reservationId)
OrderProductIf
setReservationId
in interface OrderProductIf
reservationId
- the reservationId to setpublic int getQtyResrvdForResId()
OrderProductIf
getQtyResrvdForResId
in interface OrderProductIf
public void setQtyResrvdForResId(int qtyResrvdForResId)
OrderProductIf
setQtyResrvdForResId
in interface OrderProductIf
qtyResrvdForResId
- the qtyResrvdForResId to setpublic java.math.BigDecimal getRefundValue()
getRefundValue
in interface OrderProductIf
public void setRefundValue(java.math.BigDecimal refundValue)
setRefundValue
in interface OrderProductIf
refundValue
- the refundValue to setpublic int getRefundPoints()
getRefundPoints
in interface OrderProductIf
public void setRefundPoints(int refundPoints)
setRefundPoints
in interface OrderProductIf
refundPoints
- the refundPoints to setpublic java.lang.String getCustomAttrs()
OrderProductIf
getCustomAttrs
in interface OrderProductIf
public void setCustomAttrs(java.lang.String customAttrs)
OrderProductIf
setCustomAttrs
in interface OrderProductIf
customAttrs
- the customAttrs to setpublic ProdCustAttrIf[] getCustomAttrArray()
OrderProductIf
getCustomAttrArray
in interface OrderProductIf
public void setCustomAttrArray(ProdCustAttrIf[] customAttrArray)
OrderProductIf
setCustomAttrArray
in interface OrderProductIf
customAttrArray
- the customAttrArray to setpublic java.lang.String getTaxRateCode()
OrderProductIf
getTaxRateCode
in interface OrderProductIf
public void setTaxRateCode(java.lang.String taxRateCode)
OrderProductIf
setTaxRateCode
in interface OrderProductIf
taxRateCode
- the taxRateCode to setCopyright © 2018 DS Data Systems UK Ltd.