com.retek.component.shipping.impl
Class ShippingMethodImpl

java.lang.Object
  extended bycom.retek.commons.component.impl.BusinessObjectImpl
      extended bycom.retek.commons.component.impl.DistributedObjectImpl
          extended bycom.retek.component.shipping.impl.ShippingMethodImpl
All Implemented Interfaces:
BusinessObject, com.retek.swing11.commons.type.Displayable, DistributedObject, ShippingMethod, ShippingMethodRib

public class ShippingMethodImpl
extends DistributedObjectImpl
implements ShippingMethod, ShippingMethodRib


Nested Class Summary
 
Nested classes inherited from class com.retek.commons.component.impl.DistributedObjectImpl
DistributedObjectImpl.DtoBurgular
 
Field Summary
 
Fields inherited from class com.retek.commons.component.impl.BusinessObjectImpl
context
 
Fields inherited from interface com.retek.component.shipping.ShippingMethod
DEFAULT_CARRIER, DEFAULT_DELIVERY_DAYS, DELIVERY_DAYS, DISPLAY_CODE, MAX_DELIVERY_DAYS
 
Constructor Summary
ShippingMethodImpl(DistributedContext context, DistributedReference reference, boolean createHollow)
           
ShippingMethodImpl(DistributedContext context, DistributedReference reference, java.lang.String displayCode, java.lang.String description)
           
 
Method Summary
 void addCarrier(Carrier carrier)
          Adds the specified carrier to the list of carriers that provide this shipping method.
 void addCarrierZone(Carrier carrier, CarrierShippingMethodZone carrierZone)
           
protected  java.lang.String attributesToString()
           
 java.util.Set getCarriers()
          Returns the list of carriers that provide this shipping method.
 int getCarrierTransitDays(Carrier carrier, java.lang.String shipFromZipCode, java.lang.String shipToZipCode)
           
 Carrier getDefaultCarrier()
          Returns the default carrier for this shipping method.
 int getDeliveryDays()
          Returns the number of days it takes to deliver an item via this shipping method.
 java.lang.String getDescription()
           
 java.lang.String getDisplayCode()
           
 boolean hasCarrier(Carrier carrier)
          Checks to see if this carrier is valid for this shipping method
 boolean isRushDeliveryForCarrier(Carrier carrier)
          Returns whether the specified carrier is rush delivery for this shipping method.
protected  Dto readLatest()
           
 void removeCarrier(Carrier carrier)
          Removes the specified carrier from the list of carriers that provide this shipping method.
 void setDefaultCarrier(Carrier carrier)
          Sets the default carrier for this shipping method.
 void setDeliveryDays(int deliveryDays)
          Sets the number of days it takes to deliver an item via this shipping method.
 void setDescription(java.lang.String description)
          Sets the description of this shipping method.
 void setRushDeliveryForCarrier(Carrier carrier, boolean isRushDelivery)
          Sets the rush delivery for the specified carrier for this shipping method.
 void submit()
          Saves (i.e., creates or updates) this shipping method.
 void submitFromRib()
           
 java.lang.String toDisplayString()
           
 
Methods inherited from class com.retek.commons.component.impl.DistributedObjectImpl
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
 

Constructor Detail

ShippingMethodImpl

public ShippingMethodImpl(DistributedContext context,
                          DistributedReference reference,
                          boolean createHollow)
                   throws SystemException

ShippingMethodImpl

public ShippingMethodImpl(DistributedContext context,
                          DistributedReference reference,
                          java.lang.String displayCode,
                          java.lang.String description)
                   throws SystemException
Method Detail

readLatest

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

getDisplayCode

public java.lang.String getDisplayCode()
                                throws SystemException
Specified by:
getDisplayCode in interface ShippingMethod
Throws:
SystemException

getDescription

public java.lang.String getDescription()
                                throws SystemException
Specified by:
getDescription in interface ShippingMethod
Throws:
SystemException

getCarriers

public java.util.Set getCarriers()
                          throws SystemException
Description copied from interface: ShippingMethod
Returns the list of carriers that provide this shipping method.

Specified by:
getCarriers in interface ShippingMethod
Returns:
a list of Carrier objects
Throws:
SystemException

addCarrier

public void addCarrier(Carrier carrier)
                throws SystemException
Description copied from interface: ShippingMethod
Adds the specified carrier to the list of carriers that provide this shipping method.

Specified by:
addCarrier in interface ShippingMethod
Throws:
SystemException

removeCarrier

public void removeCarrier(Carrier carrier)
                   throws SystemException
Description copied from interface: ShippingMethod
Removes the specified carrier from the list of carriers that provide this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Specified by:
removeCarrier in interface ShippingMethod
Throws:
SystemException

getDeliveryDays

public int getDeliveryDays()
                    throws SystemException
Deprecated. - no longer valid, ask shippingMethod for getCarrierTransitDays()

Description copied from interface: ShippingMethod
Returns the number of days it takes to deliver an item via this shipping method.

Specified by:
getDeliveryDays in interface ShippingMethod
Throws:
SystemException

setDeliveryDays

public void setDeliveryDays(int deliveryDays)
                     throws SystemException
Deprecated. - no longer valid, shippingMethod has carrier transit days instead

Description copied from interface: ShippingMethod
Sets the number of days it takes to deliver an item via this shipping method.

Specified by:
setDeliveryDays in interface ShippingMethod
Throws:
SystemException

getDefaultCarrier

public Carrier getDefaultCarrier()
                          throws SystemException
Description copied from interface: ShippingMethod
Returns the default carrier for this shipping method.

Specified by:
getDefaultCarrier in interface ShippingMethod
Throws:
SystemException

setDefaultCarrier

public void setDefaultCarrier(Carrier carrier)
                       throws SystemException
Description copied from interface: ShippingMethod
Sets the default carrier for this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Specified by:
setDefaultCarrier in interface ShippingMethod
Throws:
SystemException

setRushDeliveryForCarrier

public void setRushDeliveryForCarrier(Carrier carrier,
                                      boolean isRushDelivery)
                               throws SystemException
Description copied from interface: ShippingMethod
Sets the rush delivery for the specified carrier for this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Specified by:
setRushDeliveryForCarrier in interface ShippingMethod
Throws:
SystemException

isRushDeliveryForCarrier

public boolean isRushDeliveryForCarrier(Carrier carrier)
                                 throws SystemException
Description copied from interface: ShippingMethod
Returns whether the specified carrier is rush delivery for this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Specified by:
isRushDeliveryForCarrier in interface ShippingMethod
Throws:
SystemException

hasCarrier

public boolean hasCarrier(Carrier carrier)
                   throws SystemException
Description copied from interface: ShippingMethod
Checks to see if this carrier is valid for this shipping method

Specified by:
hasCarrier in interface ShippingMethod
Returns:
boolean True = shipping method valid for carrier
Throws:
SystemException

setDescription

public void setDescription(java.lang.String description)
                    throws SystemException
Description copied from interface: ShippingMethod
Sets the description of this shipping method.

Specified by:
setDescription in interface ShippingMethod
Throws:
SystemException

submit

public void submit()
            throws InvalidShippingMethodException,
                   SystemException,
                   BusinessException
Description copied from interface: ShippingMethod
Saves (i.e., creates or updates) this shipping method. Ensures that this shipping method is valid before saving it. In order to be valid, the delivery days must be greater than or equal to 0 and less than or equal to MAX_DELIVERY_DAYS, and the default carrier must be set.

Specified by:
submit in interface ShippingMethod
Throws:
InvalidShippingMethodException - if the delivery days are invalid, or the default carrier is not set
SystemException
BusinessException

submitFromRib

public void submitFromRib()
                   throws InvalidShippingMethodException,
                          SystemException,
                          BusinessException
Specified by:
submitFromRib in interface ShippingMethodRib
Throws:
InvalidShippingMethodException
SystemException
BusinessException

addCarrierZone

public void addCarrierZone(Carrier carrier,
                           CarrierShippingMethodZone carrierZone)
                    throws SystemException
Specified by:
addCarrierZone in interface ShippingMethod
Throws:
SystemException

getCarrierTransitDays

public int getCarrierTransitDays(Carrier carrier,
                                 java.lang.String shipFromZipCode,
                                 java.lang.String shipToZipCode)
                          throws SystemException,
                                 BusinessException
Specified by:
getCarrierTransitDays in interface ShippingMethod
Throws:
SystemException
BusinessException

toDisplayString

public java.lang.String toDisplayString()
Specified by:
toDisplayString in interface com.retek.swing11.commons.type.Displayable

attributesToString

protected java.lang.String attributesToString()
                                       throws SystemException
Overrides:
attributesToString in class DistributedObjectImpl
Throws:
SystemException


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