com.retek.component.media.impl
Class ShippingRateImpl

java.lang.Object
  extended bycom.retek.commons.component.impl.BusinessObjectImpl
      extended bycom.retek.commons.component.impl.SecondClassObjectImpl
          extended bycom.retek.component.media.impl.ShippingRateImpl
All Implemented Interfaces:
BusinessObject, SecondClassObject, ShippingRate

public class ShippingRateImpl
extends SecondClassObjectImpl
implements ShippingRate


Field Summary
 
Fields inherited from class com.retek.commons.component.impl.BusinessObjectImpl
context
 
Fields inherited from interface com.retek.component.media.ShippingRate
STD_DELIVERY_CHARGE_DOLLAR, STD_DELIVERY_CHARGE_MAX, STD_DELIVERY_CHARGE_MIN, STD_DELIVERY_CHARGE_PERCENT
 
Constructor Summary
ShippingRateImpl(DistributedContext context, ShippingRateDto dto)
           
 
Method Summary
 Money getDeliveryCharge(Money shippingAmount)
           
 Money getDeliveryChargeFlatRate()
           
 Percent getDeliveryChargePercent()
           
 ShippingRateDto getDto()
           
 ShippingRateImpl getNextRate()
           
 ShippingRateImpl getPrevRate()
           
 Money getRangeMaximum()
           
 Money getRangeMinimum()
           
 boolean isFlatRate()
           
 boolean isInRange(Money shippingAmount)
           
 boolean isPercentageRate()
           
 void remove()
           
 void setDeliveryChargeFlatRate(Money deliveryChargeFlatRate)
           
 void setDeliveryChargePercent(Percent deliveryChargePercent)
           
 void setRangeMaximum(Money rangeMaximum)
          If this is the last shipping rate in the ShippingRateTable (and therefore, its current max is infinity) then setting rangeMaximum to less than infinity has the side effect of creating a new shipping rate to uphold the invariant described above.
 void setRangeMinimum(Money rangeMinimum)
           
 
Methods inherited from class com.retek.commons.component.impl.SecondClassObjectImpl
equals, getGenericDto, hashCode, setGenericDto, toString, wrap, wrap, wrap, wrap
 
Methods inherited from class com.retek.commons.component.impl.BusinessObjectImpl
checkRelation, checkRelation, getBusinessInterface, getContext
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.retek.commons.component.BusinessObject
getBusinessInterface
 

Constructor Detail

ShippingRateImpl

public ShippingRateImpl(DistributedContext context,
                        ShippingRateDto dto)
                 throws SystemException
Method Detail

getDto

public ShippingRateDto getDto()

getRangeMaximum

public Money getRangeMaximum()
                      throws SystemException
Specified by:
getRangeMaximum in interface ShippingRate
Throws:
SystemException

getRangeMinimum

public Money getRangeMinimum()
Specified by:
getRangeMinimum in interface ShippingRate

getDeliveryChargeFlatRate

public Money getDeliveryChargeFlatRate()
Specified by:
getDeliveryChargeFlatRate in interface ShippingRate

getDeliveryChargePercent

public Percent getDeliveryChargePercent()
Specified by:
getDeliveryChargePercent in interface ShippingRate

setDeliveryChargeFlatRate

public void setDeliveryChargeFlatRate(Money deliveryChargeFlatRate)
Specified by:
setDeliveryChargeFlatRate in interface ShippingRate

setDeliveryChargePercent

public void setDeliveryChargePercent(Percent deliveryChargePercent)
                              throws MediaBusinessException
Specified by:
setDeliveryChargePercent in interface ShippingRate
Throws:
MediaBusinessException

remove

public void remove()
            throws SystemException,
                   MediaBusinessException
Specified by:
remove in interface ShippingRate
Throws:
SystemException
MediaBusinessException

setRangeMaximum

public void setRangeMaximum(Money rangeMaximum)
                     throws SystemException,
                            MediaBusinessException
Description copied from interface: ShippingRate
If this is the last shipping rate in the ShippingRateTable (and therefore, its current max is infinity) then setting rangeMaximum to less than infinity has the side effect of creating a new shipping rate to uphold the invariant described above.

Specified by:
setRangeMaximum in interface ShippingRate
Throws:
SystemException
MediaBusinessException

setRangeMinimum

public void setRangeMinimum(Money rangeMinimum)
                     throws SystemException,
                            MediaBusinessException
Specified by:
setRangeMinimum in interface ShippingRate
Throws:
SystemException
MediaBusinessException

isPercentageRate

public boolean isPercentageRate()
Specified by:
isPercentageRate in interface ShippingRate

isFlatRate

public boolean isFlatRate()
Specified by:
isFlatRate in interface ShippingRate

getNextRate

public ShippingRateImpl getNextRate()
                             throws SystemException
Throws:
SystemException

getPrevRate

public ShippingRateImpl getPrevRate()
                             throws SystemException
Throws:
SystemException

getDeliveryCharge

public Money getDeliveryCharge(Money shippingAmount)
                        throws SystemException
Specified by:
getDeliveryCharge in interface ShippingRate
Throws:
SystemException

isInRange

public boolean isInRange(Money shippingAmount)
                  throws SystemException
Specified by:
isInRange in interface ShippingRate
Throws:
SystemException


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28