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

public class QuoteFactory
extends `Object`

A factory for creating objects from the Quote package.

Related Topics

``Quote``
``LineItem``
``LineAdjustment``
``OrderAdjustment``
``AdjustmentDetail``
``Line``

Hierarchy
  `Object`
  `QuoteFactory`

## Field Summary

`public static final `String`` | `NO_CURRENCY` String
`public static final double` | `ZERO` double

## Constructor Summary

QuoteFactory() Construct a new QuoteFactory.

## Method Summary

`public `DiscountPresentation`` | `createDescription`(`LineAdjustment` adjustment) Create a DiscountPresentation object corresponding to the LineAdjusment object passed into the method.
`public `List`` | `createDescriptions`(`List` adjustments) Create a List of DiscountPresentation objects corresponding to the List of LineAdjustment objects passed into the method.
`public `AdjustmentDetail`` | `getDetail`(`AdjustmentType` type, `Money` initialPrice, `Money` endPrice, `String` computation, `String` reason, `Object` discountID) Obtain a fresh AdjustmentDetail with the specified values.
`public `AdjustmentDetail`` | `getDetail`(`AdjustmentDetail` detail) Obtain a fresh AdjustmentDetail based on the detail specified
`public int` | `getInt`(double value) Obtain the integer portion of a double by casting it to an int.
`public `LineAdjustment`` | `getLineAdjustment`(`Money` basePrice, `LineItem` parent) Obtain a fresh LineAdjustment object.
`public `List`` | `getLineItems`(`Quote` quote, `Line`[] lines) Produce a List of LineItems for the given Quote and array of Lines.
`public `Line`[]` | `getLines`(`Quote` quote, `Line`[] lines) Populate the array of Lines specified with the data supplied in the Quote.
`public `OrderAdjustment`` | `getOrderAdjustment`(`Money` basePrice, `Quote` parent) Obtain a fresh LineAdjustment object based on the specified values and add the specified detail to the adjustment.
`public `Quote`` | `getQuote`(`Line`[] lines) Create a new Quote object based on the array of Lines specified.

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

## Field Detail

### NO_CURRENCY

    public static final String NO_CURRENCY

### ZERO

    public static final double ZERO

## Constructor Detail

### QuoteFactory

    public QuoteFactory()

  Construct a new QuoteFactory.

## Method Detail

### createDescription(LineAdjustment) Method

    public DiscountPresentation createDescription(LineAdjustment adjustment)

Create a DiscountPresentation object corresponding to the LineAdjusment object passed into the method.

#### Parameters

adjustment
  the LineAdjustments to build the presentation from

Related Topics

``LineAdjustment``
``DiscountPresentation``

### createDescriptions(List) Method

    public List createDescriptions(List adjustments)

Create a List of DiscountPresentation objects corresponding to the List of LineAdjustment objects passed into the method.

#### Parameters

adjustments
  List of LineAdjustments.

Related Topics

``LineAdjustment``
``DiscountPresentation``

### getDetail(AdjustmentType, Money, Money, String, String, Object) Method

    public AdjustmentDetail getDetail(AdjustmentType type,
                                      Money initialPrice,
                                      Money endPrice,
                                      String computation,
                                      String reason,
                                      Object discountID)
         throws QuoteException

Obtain a fresh AdjustmentDetail with the specified values.

#### Parameters

type
  the AdjustmentType of this detail

initialPrice
  the price of the object before adjustment.

endPrice
  the price of the object after adjustment.

computation
  a string describing the computation used to compute the end price from the initial price.

reason
  the reason for the adjustment

discountID
  the identifier associated with this adjustment.

#### Exceptions

``QuoteException``

Related Topics

``AdjustmentDetail``
``AdjustmentType``
``Money``

### getDetail(AdjustmentDetail) Method

    public AdjustmentDetail getDetail(AdjustmentDetail detail)
         throws QuoteException

Obtain a fresh AdjustmentDetail based on the detail specified

#### Parameters

detail
  the detail to copy.

#### Exceptions

``QuoteException``

Related Topics

``AdjustmentDetail``

### getInt(double) Method

    public int getInt(double value)

Obtain the integer portion of a double by casting it to an int.

#### Parameters

value
  double value to cast to int.

### getLineAdjustment(Money, LineItem) Method

    public LineAdjustment getLineAdjustment(Money basePrice,
                                            LineItem parent)
         throws QuoteException

Obtain a fresh LineAdjustment object.

#### Parameters

basePrice
  the base price for the new LineAdjustment.

parent
  the LineItem to set as the parent of the adjustment.

#### Returns

a LineAdjustment

#### Exceptions

``QuoteException``

### getLineItems(Quote, Line[]) Method

    public List getLineItems(Quote quote,
                             Line[] lines)
         throws QuoteException

Produce a List of LineItems for the given Quote and array of Lines. The List of LineItems is in the same natural order as the array of Lines specified.

#### Parameters

quote
  the Quote to use as the parent of the LineItems

lines
  array of Lines to base the new LineItems on.

#### Returns

List of LineItems

#### Exceptions

``QuoteException``

Related Topics

``LineItem``
``Quote``
``Line``

### getLines(Quote, Line[]) Method

    public Line[] getLines(Quote quote,
                         Line[] lines)

Populate the array of Lines specified with the data supplied in the Quote. The Lines returned will be in the same order as the LineItems in the Quote.

#### Parameters

quote
  the Quote to obtain the data from for the Lines

lines
  array of Lines to populate from the Quote.

#### Returns

array of Lines

Related Topics

``LineItem``
``Quote``
``Line``

### getOrderAdjustment(Money, Quote) Method

    public OrderAdjustment getOrderAdjustment(Money basePrice,
                                              Quote parent)

Obtain a fresh LineAdjustment object based on the specified values and add the specified detail to the adjustment.

#### Parameters

basePrice
  the price of the adjustment

parent
  the parent Quote for this adjustment

Related Topics

``Quote``
``OrderAdjustment``

### getQuote(Line[]) Method

    public Quote getQuote(Line[] lines)
         throws QuoteException

Create a new Quote object based on the array of Lines specified.

#### Exceptions

``QuoteException``