com.konakart.app
Class PromotionResult

java.lang.Object
  extended by com.konakart.app.PromotionResult
All Implemented Interfaces:
PromotionResultIf

public class PromotionResult
extends java.lang.Object
implements PromotionResultIf

Promotion Result Object. It contains the result of a promotion applied to a product. A product may have an array of these objects. If the product has options then each productQuantity attribute of the product may contain an array of these since the promotion may only apply to a certain configuration of the product. i.e. For a blue shirt and not for a black shirt.


Constructor Summary
PromotionResult()
          Constructor
 
Method Summary
 java.lang.String getOrderTotalCode()
           
 int getPromotionId()
           
 java.math.BigDecimal getValue()
          The promotion discount
 boolean isApplyBeforeTax()
          When true, the discount should be applied before tax
 boolean isPercentageDiscount()
          When true, the value specifies a percentage
 void setApplyBeforeTax(boolean applyBeforeTax)
          When true, the discount should be applied before tax
 void setOrderTotalCode(java.lang.String orderTotalCode)
           
 void setPercentageDiscount(boolean percentageDiscount)
          When true, the value specifies a percentage
 void setPromotionId(int promotionId)
           
 void setValue(java.math.BigDecimal value)
          The promotion discount
 java.lang.String toString()
          Returns a string containing the attributes of the Promotion Result object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PromotionResult

public PromotionResult()
Constructor

Method Detail

toString

public java.lang.String toString()
Returns a string containing the attributes of the Promotion Result object

Overrides:
toString in class java.lang.Object

getPromotionId

public int getPromotionId()
Specified by:
getPromotionId in interface PromotionResultIf
Returns:
the promotionId

setPromotionId

public void setPromotionId(int promotionId)
Specified by:
setPromotionId in interface PromotionResultIf
Parameters:
promotionId - the promotionId to set

getOrderTotalCode

public java.lang.String getOrderTotalCode()
Specified by:
getOrderTotalCode in interface PromotionResultIf
Returns:
the orderTotalCode

setOrderTotalCode

public void setOrderTotalCode(java.lang.String orderTotalCode)
Specified by:
setOrderTotalCode in interface PromotionResultIf
Parameters:
orderTotalCode - the orderTotalCode to set

getValue

public java.math.BigDecimal getValue()
Description copied from interface: PromotionResultIf
The promotion discount

Specified by:
getValue in interface PromotionResultIf
Returns:
the value

setValue

public void setValue(java.math.BigDecimal value)
Description copied from interface: PromotionResultIf
The promotion discount

Specified by:
setValue in interface PromotionResultIf
Parameters:
value - the value to set

isPercentageDiscount

public boolean isPercentageDiscount()
Description copied from interface: PromotionResultIf
When true, the value specifies a percentage

Specified by:
isPercentageDiscount in interface PromotionResultIf
Returns:
the percentageDiscount

setPercentageDiscount

public void setPercentageDiscount(boolean percentageDiscount)
Description copied from interface: PromotionResultIf
When true, the value specifies a percentage

Specified by:
setPercentageDiscount in interface PromotionResultIf
Parameters:
percentageDiscount - the percentageDiscount to set

isApplyBeforeTax

public boolean isApplyBeforeTax()
When true, the discount should be applied before tax

Specified by:
isApplyBeforeTax in interface PromotionResultIf
Returns:
the applyBeforeTax

setApplyBeforeTax

public void setApplyBeforeTax(boolean applyBeforeTax)
When true, the discount should be applied before tax

Specified by:
setApplyBeforeTax in interface PromotionResultIf
Parameters:
applyBeforeTax - the applyBeforeTax to set


Copyright © 2011 DS Data Systems UK Ltd.