com.retek.component.customerorder.impl
Class DiscountImpl

java.lang.Object
  extended bycom.retek.commons.component.impl.BusinessObjectImpl
      extended bycom.retek.commons.component.impl.DistributedObjectImpl
          extended bycom.retek.component.customerorder.impl.DiscountImpl
All Implemented Interfaces:
BusinessObject, java.lang.Comparable, Discount, DistributedObject

public class DiscountImpl
extends DistributedObjectImpl
implements Discount, java.lang.Comparable


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
 
Constructor Summary
DiscountImpl(DistributedContext context, DistributedReference ref, boolean createHollow)
           
DiscountImpl(DistributedContext context, DistributedReference ref, DiscountType discountType, CustomerOrderLine orderLine, User user)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equalsType(Discount discount)
           
 User getCreatedByUser()
           
 RDate getCreatedDate()
           
 Quantity getDiscountPercent()
          Return the discount percent for the discount if the discount is a percent-based discount, ex.
 DiscountType getDiscountType()
           
protected  DiscountDto getDto()
           
 Money getExtendedDiscountAmount()
          Return an extended discount amount for the discount, based on the chargeable qty of the order line * unit discount amount.
 Money getExtendedDiscountAmount(Quantity quantity)
          Return an extended discount amount for the discount, based on the specified order line quantity.
 User getLastUpdatedByUser()
           
 RDate getLastUpdatedDate()
           
protected  int getSortRank()
           
 Money getUnitDiscountAmount()
           
 boolean isSaleDiscount()
           
 RDate setCreatedDate(RDate createdTimestamp)
           
 void setDiscountPercent(Quantity employeeDiscountPercent)
           
 RDate setLastUpdatedDate(RDate lastUpdatedTimestamp)
           
 void setOrderLine(CustomerOrderLine orderLine)
           
 void setSaleDiscount(boolean isSaleDiscount)
           
 void setUnitDiscountAmount(Money discountAmount)
           
 
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, readLatest, 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

DiscountImpl

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

DiscountImpl

public DiscountImpl(DistributedContext context,
                    DistributedReference ref,
                    DiscountType discountType,
                    CustomerOrderLine orderLine,
                    User user)
             throws SystemException
Method Detail

equalsType

public boolean equalsType(Discount discount)
                   throws SystemException
Specified by:
equalsType in interface Discount
Throws:
SystemException

getDiscountType

public DiscountType getDiscountType()
                             throws SystemException
Specified by:
getDiscountType in interface Discount
Throws:
SystemException

getCreatedByUser

public User getCreatedByUser()
                      throws SystemException
Specified by:
getCreatedByUser in interface Discount
Throws:
SystemException

getCreatedDate

public RDate getCreatedDate()
                     throws SystemException
Specified by:
getCreatedDate in interface Discount
Throws:
SystemException

setCreatedDate

public RDate setCreatedDate(RDate createdTimestamp)
                     throws SystemException
Throws:
SystemException

getDto

protected DiscountDto getDto()
                      throws SystemException
Throws:
SystemException

getLastUpdatedByUser

public User getLastUpdatedByUser()
                          throws SystemException
Specified by:
getLastUpdatedByUser in interface Discount
Throws:
SystemException

getLastUpdatedDate

public RDate getLastUpdatedDate()
                         throws SystemException
Specified by:
getLastUpdatedDate in interface Discount
Throws:
SystemException

setLastUpdatedDate

public RDate setLastUpdatedDate(RDate lastUpdatedTimestamp)
                         throws SystemException
Throws:
SystemException

getSortRank

protected int getSortRank()
                   throws SystemException
Throws:
SystemException

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

setOrderLine

public void setOrderLine(CustomerOrderLine orderLine)
                  throws SystemException
Throws:
SystemException

getDiscountPercent

public Quantity getDiscountPercent()
                            throws SystemException
Description copied from interface: Discount
Return the discount percent for the discount if the discount is a percent-based discount, ex. employee discount. May be zero/null if the discount is a dollar-off discount, ex. alternate selling discount.

Specified by:
getDiscountPercent in interface Discount
Returns:
double discount percent
Throws:
SystemException

isSaleDiscount

public boolean isSaleDiscount()
                       throws SystemException
Specified by:
isSaleDiscount in interface Discount
Throws:
SystemException

setDiscountPercent

public void setDiscountPercent(Quantity employeeDiscountPercent)
                        throws SystemException
Specified by:
setDiscountPercent in interface Discount
Throws:
SystemException

setSaleDiscount

public void setSaleDiscount(boolean isSaleDiscount)
                     throws SystemException
Specified by:
setSaleDiscount in interface Discount
Throws:
SystemException

setUnitDiscountAmount

public void setUnitDiscountAmount(Money discountAmount)
                           throws SystemException
Specified by:
setUnitDiscountAmount in interface Discount
Throws:
SystemException

getUnitDiscountAmount

public Money getUnitDiscountAmount()
                            throws SystemException
Specified by:
getUnitDiscountAmount in interface Discount
Throws:
SystemException

getExtendedDiscountAmount

public Money getExtendedDiscountAmount()
                                throws SystemException
Description copied from interface: Discount
Return an extended discount amount for the discount, based on the chargeable qty of the order line * unit discount amount.

Specified by:
getExtendedDiscountAmount in interface Discount
Returns:
Money extended discount amount
Throws:
SystemException

getExtendedDiscountAmount

public Money getExtendedDiscountAmount(Quantity quantity)
                                throws SystemException
Description copied from interface: Discount
Return an extended discount amount for the discount, based on the specified order line quantity.

Specified by:
getExtendedDiscountAmount in interface Discount
Parameters:
quantity - order line quantity
Returns:
Money unit discount amount * quantity
Throws:
SystemException


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