# com.bea.commerce.ebusiness.price.quote
OrderAdjustment Class

public class OrderAdjustment
extends `Adjustment`

An OrderAdjustment is used in conjunction with the Quote class to adjust the total price of the Quote.

Related Topics

``Adjustment``
``Quote``
``AdjustmentDetail``
``Money``
``AdjustmentType``

Hierarchy
  `Object`
  `Adjustment`
  `OrderAdjustment`

All Implemented Interfaces
  `Serializable`

## Field Summary

Fields from com.bea.commerce.ebusiness.price.quote`.`Adjustment``
``details`, `isSet`, `type``

## Constructor Summary

OrderAdjustment()
OrderAdjustment(`Money` aBasePrice, `Quote` parent) Constructs a new OrderAdjustment with the specified values.

## Method Summary

`protected void` | `addDetail`(`AdjustmentDetail` aDetail) Adding a detail changes the adjustment type to match the detail.
`protected void` | `computeAdjustmentAmount`() Computes the amount of adjustment.
`public final `Quote`` | `getParent`() Returns the Quote that is the parent of this adjustment
`protected void` | `init`() allocate permanent objects, called by super constructor
`protected void` | `reset`() reset created values, called by super set()
`protected double` | `roundBasePrice`(double value) Provides a means to round the base price amount.
`public void` | `set`(`Money` aBasePrice, `Quote` parent) Sets the adjusment object values, clearing any old values
`protected void` | `setType`(`AdjustmentDetail` aDetail) called by addDetail() in the super class to set the type of this adjustment.
`public `String`` | `toString`() Provides a string representation of this object.
`public static `String`` | `toString`(`List` adjustments) Provides a string representation of a List of OrderAdjustments.

Methods from `com.bea.commerce.ebusiness.price.quote.`Adjustment``
``checkCurrency`, `checkCurrency`, `checkCurrency`, `getActualPrice`, `getAdjustmentAmount`, `getBasePrice`, `getCurrency`, `getDetails`, `getType`, `markModified`, `set`, `set`, `setActualPrice`, `setAdjustmentAmount`, `toString``

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Detail

### OrderAdjustment

    protected OrderAdjustment()

### OrderAdjustment

    public OrderAdjustment(Money aBasePrice,
                           Quote parent)

  Constructs a new OrderAdjustment with the specified values.

Related Topics

``Adjustment``
``Quote``

## Method Detail

### addDetail(AdjustmentDetail) Method

    protected void addDetail(AdjustmentDetail aDetail)

Description copied from `Adjustment.addDetail(AdjustmentDetail)`
Adding a detail changes the adjustment type to match the detail. Subclasses can override this behavior by modifying the setType() method.

Overrides
  `Adjustment.addDetail(AdjustmentDetail)`

### computeAdjustmentAmount() Method

    protected void computeAdjustmentAmount()

Computes the amount of adjustment. Adjustment value is positive for an adjustment that lowers the price of the item, thus a positive value indicates a discount while a negative value indicates an additional charge. we override this method in order to round the value to two decimal places. This method is called by the superclass anytime the actual price changes.

Overrides
  `Adjustment.computeAdjustmentAmount()`

### getParent() Method

    public final Quote getParent()

Returns the Quote that is the parent of this adjustment

### 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()`

### roundBasePrice(double) Method

    protected double roundBasePrice(double value)

Provides a means to round the base price amount. This method is called by the superclass prior to setting the base price.

Overrides
  `Adjustment.roundBasePrice(double)`

#### Parameters

value
  Money amount to be rounded

### set(Money, Quote) Method

    public void set(Money aBasePrice,
                    Quote parent)

Sets the adjusment object values, clearing any old values

### setType(AdjustmentDetail) Method

    protected void setType(AdjustmentDetail aDetail)

called by addDetail() in the super class to set the type of this adjustment. For shipping discounts leave the type of the adjustment set to AdjustmentType.SHIPPING

Overrides
  `Adjustment.setType(AdjustmentDetail)`

### 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 of a List of OrderAdjustments. This method is intended for debugging and may change at any time.