Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      |
      +--com.bea.commerce.ebusiness.price.quote.Adjustment
            |
            +--com.bea.commerce.ebusiness.price.quote.OrderAdjustment

All Implemented Interfaces:
  Serializable

public class OrderAdjustment
extends Adjustment

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

See Also:
  `Adjustment`, `Quote`, `AdjustmentDetail`, `Money`, `AdjustmentType`, Serialized Form

Field Summary

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

Constructor Summary
`protected` | `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.
`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.
`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.
`String` | `toString()` Provides a string representation of this object.
`static String` | `toString(List adjustments)` Provides a string representation of a List of OrderAdjustments.

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

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

Constructor Detail

### OrderAdjustment

    protected OrderAdjustment()

### OrderAdjustment

    public OrderAdjustment(Money aBasePrice,
                           Quote parent)

  Constructs a new OrderAdjustment with the specified values.

See Also:
  `Adjustment`, `Quote`

Method Detail

### set

    public void set(Money aBasePrice,
                    Quote parent)

  Sets the adjusment object values, clearing any old values

### init

    protected void init()

  allocate permanent objects, called by super constructor

  Overrides:
    `init` in class `Adjustment`

### reset

    protected void reset()

  reset created values, called by super set()

  Overrides:
    `reset` in class `Adjustment`

### getParent

    public final Quote getParent()

  Returns the Quote that is the parent of this adjustment

### addDetail

    protected void addDetail(AdjustmentDetail aDetail)

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

  Overrides:
    `addDetail` in class `Adjustment`

### setType

    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:
    `setType` in class `Adjustment`

### roundBasePrice

    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:
    `roundBasePrice` in class `Adjustment`
  Parameters:
    `value` - Money amount to be rounded

### computeAdjustmentAmount

    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:
    `computeAdjustmentAmount` in class `Adjustment`

### toString

    public String toString()

  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)

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 BEA Systems, Inc. All Rights Reserved