com.retek.component.media.impl
Class ShippingRateTableImpl

java.lang.Object
  extended bycom.retek.commons.component.impl.BusinessObjectImpl
      extended bycom.retek.commons.component.impl.DistributedObjectImpl
          extended bycom.retek.component.media.impl.ShippingRateTableImpl
All Implemented Interfaces:
BusinessObject, DistributedObject, ShippingRateTable

public class ShippingRateTableImpl
extends DistributedObjectImpl
implements ShippingRateTable


Nested Class Summary
 
Nested classes inherited from class com.retek.commons.component.impl.DistributedObjectImpl
DistributedObjectImpl.DtoBurgular
 
Field Summary
static java.math.BigDecimal HUNDRED_PERCENT
           
static java.math.BigDecimal ZERO_PERCENT
           
 
Fields inherited from class com.retek.commons.component.impl.BusinessObjectImpl
context
 
Fields inherited from interface com.retek.component.media.ShippingRateTable
BANNER, CHANNEL_TYPE, END_DATE, NAME, SHIPPING_RATES, SOURCE_CODES, START_DATE, STATUS, TYPE
 
Constructor Summary
ShippingRateTableImpl(DistributedContext context, DistributedReference ref, boolean createHollow)
           
ShippingRateTableImpl(DistributedContext context, DistributedReference ref, ShippingRateTableType rateTableType, DistributedReference bannerRef, DistributedReference channelTypeRef)
           
ShippingRateTableImpl(DistributedContext context, DistributedReference ref, ShippingRateTableType rateTableType, DistributedReference mediaRef, DistributedReference bannerRef, DistributedReference channelTypeRef)
           
 
Method Summary
 void addSourceCode(SourceCode sourceCode)
           
 void clearShippingRates()
           
 void clearSourceCodes()
           
 void copyShippingRates(ShippingRateTable fromShippingRateTable)
           
 void delete()
           
 Banner getBanner()
           
 ChannelType getChannelType()
           
 Money getDeliveryCharge(Money shippingAmount)
           
 ShippingRateTableDto getDto()
           
 RDate getEndDate()
           
 Media getMedia()
          Return the media for the shipping rate table.
 java.lang.String getName()
           
 Money getRangeMaximum()
           
 Money getRangeMinimum()
           
 Money getRushDeliveryCharge()
           
 Money getRushDeliveryChargeNonContiguous()
           
 Money getShippingCharge(Money shippingAmount)
           
 ShippingRate getShippingRate(Money shippingTotal)
           
 java.util.List getShippingRates()
           
 java.util.Set getSourceCodes()
           
 RDate getStartDate()
           
 ShippingRateTableStatus getStatus()
           
 ShippingRateTableType getType()
           
 boolean hasShippingAndHandlingChargesDefined()
           
 boolean isInRange(Money shippingAmount)
           
 boolean isOverlappingDateRangeWithActiveSpan(RDate startDate, RDate endDate)
           
 boolean isShippingRatesAdjustable()
          Return boolean indicating if the shipping rate table's rates are adjustable.
 void persist(ShippingRateTableDto dto)
           
 void persistForDelete(ShippingRateTableDto dto)
           
protected  Dto readLatest()
           
 void setBanner(Banner banner)
           
 void setChannelType(ChannelType channelType)
           
 void setEndDate(RDate endDate)
           
 void setName(java.lang.String shippingRateTableName)
           
 void setRushDeliveryCharge(Money rushDeliveryCharge)
           
 void setRushDeliveryChargeNonContiguous(Money rushDeliveryChargeNonContiguous)
           
 void setStartDate(RDate startDate)
           
 void submit()
           
 
Methods inherited from class com.retek.commons.component.impl.DistributedObjectImpl
attributesToString, createEmptyDto, debugToString, discardChanges, discardChangesShallow, equals, getGenericDto, getId, getReference, getReference, getVersion, hashCode, isDeleted, isDirty, isDirtyDeep, isDirtyIgnoreFields, isHollow, isPersisted, markAllDeleted, refresh, 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.DistributedObject
debugToString, discardChanges, getContext, getId, getReference, isDeleted, isDirty, isDirtyDeep, isDirtyIgnoreFields, isPersisted, refresh
 
Methods inherited from interface com.retek.commons.component.BusinessObject
getBusinessInterface
 

Field Detail

ZERO_PERCENT

public static final java.math.BigDecimal ZERO_PERCENT

HUNDRED_PERCENT

public static final java.math.BigDecimal HUNDRED_PERCENT
Constructor Detail

ShippingRateTableImpl

public ShippingRateTableImpl(DistributedContext context,
                             DistributedReference ref,
                             boolean createHollow)
                      throws SystemException

ShippingRateTableImpl

public ShippingRateTableImpl(DistributedContext context,
                             DistributedReference ref,
                             ShippingRateTableType rateTableType,
                             DistributedReference bannerRef,
                             DistributedReference channelTypeRef)
                      throws SystemException

ShippingRateTableImpl

public ShippingRateTableImpl(DistributedContext context,
                             DistributedReference ref,
                             ShippingRateTableType rateTableType,
                             DistributedReference mediaRef,
                             DistributedReference bannerRef,
                             DistributedReference channelTypeRef)
                      throws SystemException
Method Detail

getDto

public ShippingRateTableDto getDto()
                            throws SystemException
Throws:
SystemException

getRangeMaximum

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

getRangeMinimum

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

getDeliveryCharge

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

isInRange

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

getShippingRates

public java.util.List getShippingRates()
                                throws SystemException
Specified by:
getShippingRates in interface ShippingRateTable
Throws:
SystemException

submit

public void submit()
            throws SystemException,
                   BusinessException
Specified by:
submit in interface ShippingRateTable
Throws:
SystemException
BusinessException

persist

public void persist(ShippingRateTableDto dto)
             throws SystemException,
                    BusinessException,
                    ConcurrentUpdateException
Throws:
SystemException
BusinessException
ConcurrentUpdateException

persistForDelete

public void persistForDelete(ShippingRateTableDto dto)
                      throws SystemException,
                             BusinessException,
                             ConcurrentUpdateException
Throws:
SystemException
BusinessException
ConcurrentUpdateException

delete

public void delete()
            throws SystemException,
                   BusinessException
Throws:
SystemException
BusinessException

copyShippingRates

public void copyShippingRates(ShippingRateTable fromShippingRateTable)
                       throws SystemException
Specified by:
copyShippingRates in interface ShippingRateTable
Throws:
SystemException

clearShippingRates

public void clearShippingRates()
                        throws SystemException
Specified by:
clearShippingRates in interface ShippingRateTable
Throws:
SystemException

readLatest

protected Dto readLatest()
                  throws SystemException
Overrides:
readLatest in class DistributedObjectImpl
Throws:
SystemException

getShippingRate

public ShippingRate getShippingRate(Money shippingTotal)
                             throws SystemException
Specified by:
getShippingRate in interface ShippingRateTable
Throws:
SystemException

addSourceCode

public void addSourceCode(SourceCode sourceCode)
                   throws SystemException
Specified by:
addSourceCode in interface ShippingRateTable
Throws:
SystemException

getMedia

public Media getMedia()
               throws SystemException
Return the media for the shipping rate table. Returns null if the shipping rate table type is not MEDIA.

Returns:
Media parent media
Throws:
SystemException

getBanner

public Banner getBanner()
                 throws SystemException
Specified by:
getBanner in interface ShippingRateTable
Throws:
SystemException

setBanner

public void setBanner(Banner banner)
               throws SystemException
Specified by:
setBanner in interface ShippingRateTable
Throws:
SystemException

getChannelType

public ChannelType getChannelType()
                           throws SystemException
Specified by:
getChannelType in interface ShippingRateTable
Throws:
SystemException

setChannelType

public void setChannelType(ChannelType channelType)
                    throws SystemException
Specified by:
setChannelType in interface ShippingRateTable
Throws:
SystemException

getStartDate

public RDate getStartDate()
                   throws SystemException
Specified by:
getStartDate in interface ShippingRateTable
Throws:
SystemException

setStartDate

public void setStartDate(RDate startDate)
                  throws SystemException
Specified by:
setStartDate in interface ShippingRateTable
Throws:
SystemException

getEndDate

public RDate getEndDate()
                 throws SystemException
Specified by:
getEndDate in interface ShippingRateTable
Throws:
SystemException

setEndDate

public void setEndDate(RDate endDate)
                throws SystemException
Specified by:
setEndDate in interface ShippingRateTable
Throws:
SystemException

getRushDeliveryCharge

public Money getRushDeliveryCharge()
                            throws SystemException
Specified by:
getRushDeliveryCharge in interface ShippingRateTable
Throws:
SystemException

setRushDeliveryCharge

public void setRushDeliveryCharge(Money rushDeliveryCharge)
                           throws SystemException
Specified by:
setRushDeliveryCharge in interface ShippingRateTable
Throws:
SystemException

getRushDeliveryChargeNonContiguous

public Money getRushDeliveryChargeNonContiguous()
                                         throws SystemException
Specified by:
getRushDeliveryChargeNonContiguous in interface ShippingRateTable
Throws:
SystemException

setRushDeliveryChargeNonContiguous

public void setRushDeliveryChargeNonContiguous(Money rushDeliveryChargeNonContiguous)
                                        throws SystemException
Specified by:
setRushDeliveryChargeNonContiguous in interface ShippingRateTable
Throws:
SystemException

getName

public java.lang.String getName()
                         throws SystemException
Specified by:
getName in interface ShippingRateTable
Throws:
SystemException

setName

public void setName(java.lang.String shippingRateTableName)
             throws SystemException
Specified by:
setName in interface ShippingRateTable
Throws:
SystemException

getStatus

public ShippingRateTableStatus getStatus()
                                  throws SystemException
Specified by:
getStatus in interface ShippingRateTable
Throws:
SystemException

getType

public ShippingRateTableType getType()
                              throws SystemException
Specified by:
getType in interface ShippingRateTable
Throws:
SystemException

isOverlappingDateRangeWithActiveSpan

public boolean isOverlappingDateRangeWithActiveSpan(RDate startDate,
                                                    RDate endDate)
                                             throws SystemException
Throws:
SystemException

getSourceCodes

public java.util.Set getSourceCodes()
                             throws SystemException
Specified by:
getSourceCodes in interface ShippingRateTable
Throws:
SystemException

clearSourceCodes

public void clearSourceCodes()
                      throws SystemException
Specified by:
clearSourceCodes in interface ShippingRateTable
Throws:
SystemException

isShippingRatesAdjustable

public boolean isShippingRatesAdjustable()
                                  throws SystemException
Description copied from interface: ShippingRateTable
Return boolean indicating if the shipping rate table's rates are adjustable. If the rate table is in WORKSHEET status is rates are adjustable.

Specified by:
isShippingRatesAdjustable in interface ShippingRateTable
Returns:
boolean true if rates are adjustable
Throws:
SystemException

hasShippingAndHandlingChargesDefined

public boolean hasShippingAndHandlingChargesDefined()
                                             throws SystemException
Specified by:
hasShippingAndHandlingChargesDefined in interface ShippingRateTable
Throws:
SystemException

getShippingCharge

public Money getShippingCharge(Money shippingAmount)
                        throws SystemException
Specified by:
getShippingCharge in interface ShippingRateTable
Throws:
SystemException


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