Constructor and Description |
---|
Basket()
Constructor
|
Basket(com.workingdogs.village.Record vr,
KKCriteria c)
Instantiates the attributes of the Basket object from a Record object
|
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
calculatePrice(int scale)
Calculate the price of the basket item
|
java.math.BigDecimal |
calculatePrice(int scale,
boolean enhancedVariantHandling)
Calculate the price of the basket item
|
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() |
int |
getCustomerId() |
java.util.Calendar |
getDateAdded() |
java.util.Calendar |
getDateAvailable()
The date when the product will become available
|
java.lang.String |
getEncodedProduct()
The encodedProduct is in the form 1{3}5{4}1 where the first number is the product id.
|
java.math.BigDecimal |
getFinalPriceExTax()
This is the price without including tax.
|
java.math.BigDecimal |
getFinalPriceIncTax()
This is the price including tax.
|
int |
getId() |
OptionIf[] |
getOpts()
An array of Option objects that further defines the product.
|
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 |
getQuantityAvailable() |
int |
getQuantityInStock() |
int |
getQuantityReserved()
This attribute defines the total number of products that are currently reserved.
|
java.util.Calendar |
getReservationExpiryDate()
The time when the stock reservation defined by the reservationId, expires.
|
int |
getReservationId()
Used when products are reserved during checkout to allow a customer to checkout without
risking the product going out of stock.
|
java.util.Calendar |
getReservationStartDate()
The start time for the stock reservation defined by the reservationId.
|
java.lang.String |
getSku()
The SKU 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.
|
boolean |
isReserved()
Method to determine whether a valid reservation exists
|
boolean |
isUseBasketPrice()
When set, the price of the basket object is used rather than getting the price from the
product object.
|
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 |
setCustomerId(int customerId) |
void |
setDateAdded(java.util.Calendar dateAdded) |
void |
setDateAvailable(java.util.Calendar dateAvailable)
The date when the product will become available
|
void |
setEncodedProduct(java.lang.String encodedProduct)
The encodedProduct is in the form 1{3}5{4}1 where the first number is the product id.
|
void |
setFinalPriceExTax(java.math.BigDecimal finalPriceExTax)
This is the price without including tax.
|
void |
setFinalPriceIncTax(java.math.BigDecimal finalPriceIncTax)
This is the price including tax.
|
void |
setId(int id) |
void |
setOpts(OptionIf[] opts)
An array of Option objects that further defines the product.
|
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 |
setQuantityInStock(int quantityInStock) |
void |
setQuantityReserved(int quantityReserved)
This attribute defines the total number of products that are currently reserved.
|
void |
setReservationExpiryDate(java.util.Calendar reservationExpiryDate)
The time when the stock reservation defined by the reservationId, expires.
|
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 |
setReservationStartDate(java.util.Calendar reservationStartDate)
The start time for the stock reservation defined by the reservationId.
|
void |
setSku(java.lang.String sku)
The SKU of the product
|
void |
setUseBasketPrice(boolean useBasketPrice)
When set, the price of the basket object is used rather than getting the price from the
product object.
|
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 Basket()
public Basket(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 java.math.BigDecimal calculatePrice(int scale) throws com.konakart.app.KKException
scale
- the scaleKKException
- an unexpected KKException exceptionpublic java.math.BigDecimal calculatePrice(int scale, boolean enhancedVariantHandling) throws com.konakart.app.KKException
scale
- the scaleenhancedVariantHandling
- true if MAGO like variant handling is activeKKException
- an unexpected KKException exceptionpublic java.util.Calendar getDateAdded()
getDateAdded
in interface BasketIf
public void setDateAdded(java.util.Calendar dateAdded)
setDateAdded
in interface BasketIf
dateAdded
- The dateAdded to set.public java.lang.String getEncodedProduct()
BasketIf
getEncodedProduct
in interface BasketIf
public void setEncodedProduct(java.lang.String encodedProduct)
BasketIf
setEncodedProduct
in interface BasketIf
encodedProduct
- The encodedProduct to set.public void setId(int id)
public OptionIf[] getOpts()
BasketIf
public void setOpts(OptionIf[] opts)
BasketIf
public ProductIf getProduct()
getProduct
in interface BasketIf
public void setProduct(ProductIf product)
setProduct
in interface BasketIf
product
- The product to set.public int getProductId()
getProductId
in interface BasketIf
public void setProductId(int productId)
setProductId
in interface BasketIf
productId
- The productId to set.public int getQuantity()
getQuantity
in interface BasketIf
public void setQuantity(int quantity)
setQuantity
in interface BasketIf
quantity
- The quantity to set.public java.math.BigDecimal getFinalPriceExTax()
BasketIf
getFinalPriceExTax
in interface BasketIf
public void setFinalPriceExTax(java.math.BigDecimal finalPriceExTax)
BasketIf
setFinalPriceExTax
in interface BasketIf
finalPriceExTax
- The finalPriceExTax to set.public java.math.BigDecimal getFinalPriceIncTax()
BasketIf
getFinalPriceIncTax
in interface BasketIf
public void setFinalPriceIncTax(java.math.BigDecimal finalPriceIncTax)
BasketIf
setFinalPriceIncTax
in interface BasketIf
finalPriceIncTax
- The finalPriceIncTax to set.public int getQuantityInStock()
getQuantityInStock
in interface BasketIf
public void setQuantityInStock(int quantityInStock)
setQuantityInStock
in interface BasketIf
quantityInStock
- The quantityInStock to set.public java.lang.String getCustom1()
getCustom1
in interface BasketIf
public void setCustom1(java.lang.String custom1)
setCustom1
in interface BasketIf
custom1
- The custom1 to set.public java.lang.String getCustom2()
getCustom2
in interface BasketIf
public void setCustom2(java.lang.String custom2)
setCustom2
in interface BasketIf
custom2
- The custom2 to set.public java.lang.String getCustom3()
getCustom3
in interface BasketIf
public void setCustom3(java.lang.String custom3)
setCustom3
in interface BasketIf
custom3
- The custom3 to set.public java.lang.String getCustom4()
getCustom4
in interface BasketIf
public void setCustom4(java.lang.String custom4)
setCustom4
in interface BasketIf
custom4
- The custom4 to set.public java.lang.String getCustom5()
getCustom5
in interface BasketIf
public void setCustom5(java.lang.String custom5)
setCustom5
in interface BasketIf
custom5
- The custom5 to set.public java.lang.String getCustom6()
getCustom6
in interface BasketIf
public void setCustom6(java.lang.String custom6)
setCustom6
in interface BasketIf
custom6
- the custom6 to setpublic java.lang.String getCustom7()
getCustom7
in interface BasketIf
public void setCustom7(java.lang.String custom7)
setCustom7
in interface BasketIf
custom7
- the custom7 to setpublic java.lang.String getCustom8()
getCustom8
in interface BasketIf
public void setCustom8(java.lang.String custom8)
setCustom8
in interface BasketIf
custom8
- the custom8 to setpublic java.lang.String getCustom9()
getCustom9
in interface BasketIf
public void setCustom9(java.lang.String custom9)
setCustom9
in interface BasketIf
custom9
- the custom9 to setpublic java.lang.String getCustom10()
getCustom10
in interface BasketIf
public void setCustom10(java.lang.String custom10)
setCustom10
in interface BasketIf
custom10
- the custom10 to setpublic java.lang.String getCustom11()
getCustom11
in interface BasketIf
public void setCustom11(java.lang.String custom11)
setCustom11
in interface BasketIf
custom11
- the custom11 to setpublic java.util.Calendar getDateAvailable()
BasketIf
getDateAvailable
in interface BasketIf
public void setDateAvailable(java.util.Calendar dateAvailable)
BasketIf
setDateAvailable
in interface BasketIf
dateAvailable
- the dateAvailable to setpublic java.lang.String getSku()
BasketIf
public void setSku(java.lang.String sku)
BasketIf
public int getWishListId()
BasketIf
getWishListId
in interface BasketIf
public void setWishListId(int wishListId)
BasketIf
setWishListId
in interface BasketIf
wishListId
- the wishListId to setpublic int getWishListItemId()
BasketIf
getWishListItemId
in interface BasketIf
public void setWishListItemId(int wishListItemId)
BasketIf
setWishListItemId
in interface BasketIf
wishListItemId
- the wishListItemId to setpublic boolean isUseBasketPrice()
BasketIf
isUseBasketPrice
in interface BasketIf
public void setUseBasketPrice(boolean useBasketPrice)
BasketIf
setUseBasketPrice
in interface BasketIf
useBasketPrice
- the useBasketPrice to setpublic int getReservationId()
BasketIf
getReservationId
in interface BasketIf
public void setReservationId(int reservationId)
BasketIf
setReservationId
in interface BasketIf
reservationId
- the reservationId to setpublic int getQtyResrvdForResId()
BasketIf
getQtyResrvdForResId
in interface BasketIf
public void setQtyResrvdForResId(int qtyResrvdForResId)
BasketIf
setQtyResrvdForResId
in interface BasketIf
qtyResrvdForResId
- the qtyResrvdForResId to setpublic int getQuantityReserved()
BasketIf
getQuantityReserved
in interface BasketIf
public void setQuantityReserved(int quantityReserved)
BasketIf
setQuantityReserved
in interface BasketIf
quantityReserved
- the quantityReserved to setpublic int getQuantityAvailable()
public java.util.Calendar getReservationExpiryDate()
BasketIf
getReservationExpiryDate
in interface BasketIf
public void setReservationExpiryDate(java.util.Calendar reservationExpiryDate)
BasketIf
setReservationExpiryDate
in interface BasketIf
reservationExpiryDate
- the reservationExpiryDate to setpublic boolean isReserved()
public int getCustomerId()
getCustomerId
in interface BasketIf
public void setCustomerId(int customerId)
setCustomerId
in interface BasketIf
customerId
- the customerId to setpublic java.util.Calendar getReservationStartDate()
BasketIf
getReservationStartDate
in interface BasketIf
public void setReservationStartDate(java.util.Calendar reservationStartDate)
BasketIf
setReservationStartDate
in interface BasketIf
reservationStartDate
- the reservationStartDate to setCopyright © 2018 DS Data Systems UK Ltd.