com.retek.component.customerorder.impl
Class DiscountImpl
java.lang.Object
com.retek.commons.component.impl.BusinessObjectImpl
com.retek.commons.component.impl.DistributedObjectImpl
com.retek.component.customerorder.impl.DiscountImpl
- All Implemented Interfaces:
- BusinessObject, java.lang.Comparable, Discount, DistributedObject
- public class DiscountImpl
- extends DistributedObjectImpl
- implements Discount, java.lang.Comparable
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 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 |
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
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