LineAdjustment Class
- 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.
Related Topics
Adjustment
AdjustmentDetail
LineItem
AdjustmentType
-
Hierarchy
-
Object
Adjustment
LineAdjustment
-
All Implemented Interfaces
-
Serializable
public static final int |
-
MAX_DETAILS
- the maximum number of AdjustmentDetails per LineAdjustment
|
protected void |
-
addDetail (int seqNumber, int qty, AdjustmentDetail aDetail)
|
protected void |
-
addDetail (AdjustmentDetail aDetail)
- Do not allow the use of the superclass' addDetail( detail ) method.
|
protected void |
-
computeAdjustmentAmount ()
- Computes the change in overall price represented by this
LineAdjustment object.
|
public final LineItem |
-
getParent ()
- Returns the parent LineItem of this adjustment
|
public final int |
-
getQuantity ()
- Returns the quantity of items for this adjustment.
|
public final Money |
-
getTotal ()
- Returns the total value for this adjustment.
|
protected void |
-
init ()
- allocate permanent objects, called by super constructor
|
protected void |
-
reset ()
- reset created values, called by super set()
|
public void |
-
set (Money aBasePrice, LineItem parent)
- Sets the adjusment object values, clearing any old values
|
public String |
-
toString ()
- Provides a string representation of this object.
|
public static String |
-
toString (List adjustments)
- Provides a string representation for a List of LineAdjustments.
|
Methods from com.bea.commerce.ebusiness.price.quote.Adjustment |
checkCurrency , checkCurrency , checkCurrency , getActualPrice , getAdjustmentAmount , getBasePrice , getCurrency , getDetails , getType , markModified , roundBasePrice , set , set , setActualPrice , setAdjustmentAmount , setType , toString
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_DETAILS
public static final int MAX_DETAILS
- the maximum number of AdjustmentDetails per LineAdjustment
LineAdjustment
protected LineAdjustment()
LineAdjustment
public LineAdjustment(Money
aBasePrice,
LineItem
parent)
- AdjustmentType defaults to BASE_PRICE
Related Topics
AdjustmentType
addDetail(int, int, AdjustmentDetail) Method
protected void addDetail(int seqNumber,
int qty,
AdjustmentDetail
aDetail)
throws QuoteException
Exceptions
-
QuoteException
addDetail(AdjustmentDetail) Method
protected void addDetail(AdjustmentDetail
aDetail)
Do not allow the use of the superclass' addDetail( detail ) method.
-
Overrides
-
Adjustment.addDetail(AdjustmentDetail)
computeAdjustmentAmount() Method
protected void computeAdjustmentAmount()
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
-
Adjustment.computeAdjustmentAmount()
getParent() Method
public final LineItem
getParent()
Returns the parent LineItem of this adjustment
Related Topics
LineItem
getQuantity() Method
public final int getQuantity()
Returns the quantity of items for this adjustment.
getTotal() Method
public final Money
getTotal()
Returns the total value for this adjustment. More
specifically, the total is actual unit price * quantity.
init() Method
protected void init()
allocate permanent objects, called by super constructor
-
Overrides
-
Adjustment.init()
reset() Method
protected void reset()
reset created values, called by super set()
-
Overrides
-
Adjustment.reset()
set(Money, LineItem) Method
public void set(Money
aBasePrice,
LineItem
parent)
throws QuoteException
Sets the adjusment object values, clearing any old values
Exceptions
-
QuoteException
toString() Method
public String
toString()
Provides a string representation of this object.
This method is intended for debugging and may change at
any time.
-
Overrides
-
Adjustment.toString()
toString(List) Method
public static String
toString(List
adjustments)
Provides a string representation for a List of LineAdjustments.
This method is intended for debugging and may change at
any time.