com.konakart.app
Class WishListItem

java.lang.Object
  extended by com.konakart.app.WishListItem
All Implemented Interfaces:
WishListItemIf

public class WishListItem
extends java.lang.Object
implements WishListItemIf

WishListItem class


Constructor Summary
WishListItem()
          Constructor
WishListItem(com.workingdogs.village.Record vr, org.apache.torque.util.Criteria c)
          Instantiates the attributes of the WishList object from a Record object
 
Method Summary
 java.math.BigDecimal calculatePrice()
          Calculate the price of the WishList item
 java.lang.String getComments()
          Comments on the wish list item
 java.lang.String getCustom1()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 java.lang.String getCustom4()
           
 java.lang.String getCustom5()
           
 java.util.Calendar getDateAdded()
           
 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.
 int getPriority()
          The priority for the wish list item.
 ProductIf getProduct()
           
 int getProductId()
           
 int getQuantityDesired()
          Number of items desired in a list such as a wedding list
 int getQuantityInStock()
           
 int getQuantityReceived()
          Number of items received in a list such as a wedding list
 int getWishListId()
           
 void setComments(java.lang.String comments)
          Comments on the wish list item
 void setCustom1(java.lang.String custom1)
           
 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 setDateAdded(java.util.Calendar dateAdded)
           
 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 setPriority(int priority)
          The priority for the wish list item.
 void setProduct(ProductIf product)
           
 void setProductId(int productId)
           
 void setQuantityDesired(int quantityDesired)
          Number of items desired in a list such as a wedding list
 void setQuantityInStock(int quantityInStock)
           
 void setQuantityReceived(int quantityReceived)
          Number of items received in a list such as a wedding list
 void setWishListId(int wishListId)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WishListItem

public WishListItem()
Constructor


WishListItem

public WishListItem(com.workingdogs.village.Record vr,
                    org.apache.torque.util.Criteria c)
             throws com.workingdogs.village.DataSetException
Instantiates the attributes of the WishList object from a Record object

Parameters:
vr - Record containing data
c - Criteria containing column names
Throws:
com.workingdogs.village.DataSetException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the WishList object and those of its Options.

calculatePrice

public java.math.BigDecimal calculatePrice()
                                    throws KKException
Calculate the price of the WishList item

Returns:
Return the total price of this WishList item including the chosen options and any special price that may be available.
Throws:
KKException

getId

public int getId()
Specified by:
getId in interface WishListItemIf
Returns:
Returns the id.

setId

public void setId(int id)
Specified by:
setId in interface WishListItemIf
Parameters:
id - The id to set.

getDateAdded

public java.util.Calendar getDateAdded()
Specified by:
getDateAdded in interface WishListItemIf
Returns:
Returns the dateAdded.

setDateAdded

public void setDateAdded(java.util.Calendar dateAdded)
Specified by:
setDateAdded in interface WishListItemIf
Parameters:
dateAdded - The dateAdded to set.

getFinalPriceIncTax

public java.math.BigDecimal getFinalPriceIncTax()
Description copied from interface: WishListItemIf
This is the price including tax.

Specified by:
getFinalPriceIncTax in interface WishListItemIf
Returns:
Returns the finalPriceIncTax.

setFinalPriceIncTax

public void setFinalPriceIncTax(java.math.BigDecimal finalPriceIncTax)
Description copied from interface: WishListItemIf
This is the price including tax.

Specified by:
setFinalPriceIncTax in interface WishListItemIf
Parameters:
finalPriceIncTax - The finalPriceIncTax to set.

getFinalPriceExTax

public java.math.BigDecimal getFinalPriceExTax()
Description copied from interface: WishListItemIf
This is the price without including tax.

Specified by:
getFinalPriceExTax in interface WishListItemIf
Returns:
Returns the finalPriceExTax.

setFinalPriceExTax

public void setFinalPriceExTax(java.math.BigDecimal finalPriceExTax)
Description copied from interface: WishListItemIf
This is the price without including tax.

Specified by:
setFinalPriceExTax in interface WishListItemIf
Parameters:
finalPriceExTax - The finalPriceExTax to set.

getQuantityInStock

public int getQuantityInStock()
Specified by:
getQuantityInStock in interface WishListItemIf
Returns:
Returns the quantityInStock.

setQuantityInStock

public void setQuantityInStock(int quantityInStock)
Specified by:
setQuantityInStock in interface WishListItemIf
Parameters:
quantityInStock - The quantityInStock to set.

getProduct

public ProductIf getProduct()
Specified by:
getProduct in interface WishListItemIf
Returns:
Returns the product.

setProduct

public void setProduct(ProductIf product)
Specified by:
setProduct in interface WishListItemIf
Parameters:
product - The product to set.

getProductId

public int getProductId()
Specified by:
getProductId in interface WishListItemIf
Returns:
Returns the productId.

setProductId

public void setProductId(int productId)
Specified by:
setProductId in interface WishListItemIf
Parameters:
productId - The productId to set.

getEncodedProduct

public java.lang.String getEncodedProduct()
Description copied from interface: WishListItemIf
The encodedProduct is in the form 1{3}5{4}1 where the first number is the product id. The number pairs following the first number define the {OptionId}OptionValueId . For example this could be Model Type = Premium or Memory size = 1GB etc. If the WishList item has an encoded product, then it should have an array of Options that match the encoded product.

Specified by:
getEncodedProduct in interface WishListItemIf
Returns:
Returns the encodedProduct.

setEncodedProduct

public void setEncodedProduct(java.lang.String encodedProduct)
Description copied from interface: WishListItemIf
The encodedProduct is in the form 1{3}5{4}1 where the first number is the product id. The number pairs following the first number define the {OptionId}OptionValueId . For example this could be Model Type = Premium or Memory size = 1GB etc. If the WishList item has an encoded product, then it should have an array of Options that match the encoded product.

Specified by:
setEncodedProduct in interface WishListItemIf
Parameters:
encodedProduct - The encodedProduct to set.

getOpts

public OptionIf[] getOpts()
Description copied from interface: WishListItemIf
An array of Option objects that further defines the product. i.e. Size = small, color = blue. The encodedProductId should match this array of options.

Specified by:
getOpts in interface WishListItemIf
Returns:
Returns the opts.

setOpts

public void setOpts(OptionIf[] opts)
Description copied from interface: WishListItemIf
An array of Option objects that further defines the product. i.e. Size = small, color = blue. The encodedProductId should match this array of options.

Specified by:
setOpts in interface WishListItemIf
Parameters:
opts - The opts to set.

getCustom1

public java.lang.String getCustom1()
Specified by:
getCustom1 in interface WishListItemIf
Returns:
Returns the custom1.

setCustom1

public void setCustom1(java.lang.String custom1)
Specified by:
setCustom1 in interface WishListItemIf
Parameters:
custom1 - The custom1 to set.

getCustom2

public java.lang.String getCustom2()
Specified by:
getCustom2 in interface WishListItemIf
Returns:
Returns the custom2.

setCustom2

public void setCustom2(java.lang.String custom2)
Specified by:
setCustom2 in interface WishListItemIf
Parameters:
custom2 - The custom2 to set.

getCustom3

public java.lang.String getCustom3()
Specified by:
getCustom3 in interface WishListItemIf
Returns:
Returns the custom3.

setCustom3

public void setCustom3(java.lang.String custom3)
Specified by:
setCustom3 in interface WishListItemIf
Parameters:
custom3 - The custom3 to set.

getCustom4

public java.lang.String getCustom4()
Specified by:
getCustom4 in interface WishListItemIf
Returns:
Returns the custom4.

setCustom4

public void setCustom4(java.lang.String custom4)
Specified by:
setCustom4 in interface WishListItemIf
Parameters:
custom4 - The custom4 to set.

getCustom5

public java.lang.String getCustom5()
Specified by:
getCustom5 in interface WishListItemIf
Returns:
Returns the custom5.

setCustom5

public void setCustom5(java.lang.String custom5)
Specified by:
setCustom5 in interface WishListItemIf
Parameters:
custom5 - The custom5 to set.

getWishListId

public int getWishListId()
Specified by:
getWishListId in interface WishListItemIf
Returns:
Returns the wishListId.

setWishListId

public void setWishListId(int wishListId)
Specified by:
setWishListId in interface WishListItemIf
Parameters:
wishListId - The wishListId to set.

getPriority

public int getPriority()
Description copied from interface: WishListItemIf
The priority for the wish list item. i.e. It could be in the range from 1 to 5 (low priority, low-medium, medium, medium-high, high)

Specified by:
getPriority in interface WishListItemIf
Returns:
Returns the priority.

setPriority

public void setPriority(int priority)
Description copied from interface: WishListItemIf
The priority for the wish list item. i.e. It could be in the range from 1 to 5 (low priority, low-medium, medium, medium-high, high)

Specified by:
setPriority in interface WishListItemIf
Parameters:
priority - The priority to set.

getQuantityDesired

public int getQuantityDesired()
Description copied from interface: WishListItemIf
Number of items desired in a list such as a wedding list

Specified by:
getQuantityDesired in interface WishListItemIf
Returns:
the quantityDesired

setQuantityDesired

public void setQuantityDesired(int quantityDesired)
Description copied from interface: WishListItemIf
Number of items desired in a list such as a wedding list

Specified by:
setQuantityDesired in interface WishListItemIf
Parameters:
quantityDesired - the quantityDesired to set

getQuantityReceived

public int getQuantityReceived()
Description copied from interface: WishListItemIf
Number of items received in a list such as a wedding list

Specified by:
getQuantityReceived in interface WishListItemIf
Returns:
the quantityReceived

setQuantityReceived

public void setQuantityReceived(int quantityReceived)
Description copied from interface: WishListItemIf
Number of items received in a list such as a wedding list

Specified by:
setQuantityReceived in interface WishListItemIf
Parameters:
quantityReceived - the quantityReceived to set

getComments

public java.lang.String getComments()
Description copied from interface: WishListItemIf
Comments on the wish list item

Specified by:
getComments in interface WishListItemIf
Returns:
the comments

setComments

public void setComments(java.lang.String comments)
Description copied from interface: WishListItemIf
Comments on the wish list item

Specified by:
setComments in interface WishListItemIf
Parameters:
comments - the comments to set


Copyright © 2011 DS Data Systems UK Ltd.