com.bea.commerce.ebusiness.price.quote
Class LineAdjustment

java.lang.Object
  extended by com.bea.commerce.ebusiness.price.quote.Adjustment
      extended by com.bea.commerce.ebusiness.price.quote.LineAdjustment
All Implemented Interfaces
Serializable

Deprecated See BEA Commerce product offering

@Deprecated
public class LineAdjustment
extends Adjustment
implements Serializable

A LineAdjustment is used to adjust the unit price of some quantity of a LineItem. One AdjustmentDetail is associated with a LineAdjustment and provides a description of the adjustment.

See Also
Adjustment, AdjustmentDetail, LineItem, AdjustmentType, Serialized Form

Field Summary
static int MAX_DETAILS
          Deprecated See BEA Commerce product offering
 
Fields inherited from class com.bea.commerce.ebusiness.price.quote.Adjustment
details, isSet, type
 
Constructor Summary
protected LineAdjustment()
          Deprecated See BEA Commerce product offering
  LineAdjustment(Money aBasePrice, LineItem parent)
          Deprecated See BEA Commerce product offering
 
Method Summary
protected  void addDetail(AdjustmentDetail aDetail)
          Deprecated See BEA Commerce product offering
protected  void addDetail(int seqNumber, int qty, AdjustmentDetail aDetail)
          Deprecated See BEA Commerce product offering
protected  void computeAdjustmentAmount()
          Deprecated See BEA Commerce product offering
 LineItem getParent()
          Deprecated See BEA Commerce product offering
 int getQuantity()
          Deprecated See BEA Commerce product offering
 Money getTotal()
          Deprecated See BEA Commerce product offering
protected  void init()
          Deprecated See BEA Commerce product offering
protected  void reset()
          Deprecated See BEA Commerce product offering
 void set(Money aBasePrice, LineItem parent)
          Deprecated See BEA Commerce product offering
 String toString()
          Deprecated See BEA Commerce product offering
static String toString(List adjustments)
          Deprecated See BEA Commerce product offering
 
Methods inherited from class com.bea.commerce.ebusiness.price.quote.Adjustment
checkCurrency, checkCurrency, checkCurrency, getActualPrice, getAdjustmentAmount, getBasePrice, getCurrency, getDetails, getType, markModified, roundBasePrice, set, set, setActualPrice, setAdjustmentAmount, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_DETAILS

public static final int MAX_DETAILS
Deprecated See BEA Commerce product offering
the maximum number of AdjustmentDetails per LineAdjustment

See Also
Constants Summary
Constructor Detail

LineAdjustment

protected LineAdjustment()
Deprecated See BEA Commerce product offering


LineAdjustment

public LineAdjustment(Money aBasePrice,
                      LineItem parent)
               throws QuoteException
Deprecated See BEA Commerce product offering

AdjustmentType defaults to BASE_PRICE

Throws
QuoteException
See Also
AdjustmentType
Method Detail

set

public void set(Money aBasePrice,
                LineItem parent)
         throws QuoteException
Deprecated See BEA Commerce product offering

Sets the adjusment object values, clearing any old values

Throws
QuoteException

init

protected void init()
Deprecated See BEA Commerce product offering

allocate permanent objects, called by super constructor

Overrides:
init in class Adjustment

reset

protected void reset()
Deprecated See BEA Commerce product offering

reset created values, called by super set()

Overrides:
reset in class Adjustment

computeAdjustmentAmount

protected void computeAdjustmentAmount()
Deprecated See BEA Commerce product offering

Computes the change in overall price represented by this LineAdjustment object. This method is overridden to handle quantity when calculating the adjustment amount. The adjusment amount is calculated as follows: (basePrice - actualPrice) * qty. This method is called everytime the setActualPrice() method is called and indirectly everytime the addDetail() method is invoked.

Overrides:
computeAdjustmentAmount in class Adjustment

addDetail

protected void addDetail(int seqNumber,
                         int qty,
                         AdjustmentDetail aDetail)
                  throws QuoteException
Deprecated See BEA Commerce product offering

Throws
QuoteException

addDetail

protected void addDetail(AdjustmentDetail aDetail)
Deprecated See BEA Commerce product offering

Do not allow the use of the superclass' addDetail( detail ) method.

Overrides:
addDetail in class Adjustment

getParent

public final LineItem getParent()
Deprecated See BEA Commerce product offering

Returns the parent LineItem of this adjustment

See Also
LineItem

getQuantity

public final int getQuantity()
Deprecated See BEA Commerce product offering

Returns the quantity of items for this adjustment.


getTotal

public final Money getTotal()
Deprecated See BEA Commerce product offering

Returns the total value for this adjustment. More specifically, the total is actual unit price * quantity.


toString

public String toString()
Deprecated See BEA Commerce product offering

Provides a string representation of this object. This method is intended for debugging and may change at any time.

Overrides:
toString in class Adjustment

toString

public static String toString(List adjustments)
Deprecated See BEA Commerce product offering

Provides a string representation for a List of LineAdjustments. This method is intended for debugging and may change at any time.



Copyright © 2006 BEA Systems, Inc. All Rights Reserved