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

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

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

public class LineItem
extends java.lang.Object
implements java.io.Serializable

The LineItem class represents some quantity of a ProductItem. The class obtains the base and msrp prices from the ProductItem. LineAdjustment objects may be added to the LineItem to adjust the unit price of some sub-quantity of the LineItem. Each LineAdjustment will have a single detail describing the adjustment.

See Also:
  `Quote`, `ProductItem`, `LineAdjustment`, `OrderAdjustment`, `AdjustmentDetail`, `AdjustmentType`, `QuoteFactory`, `Money`, Serialized Form

Constructor Summary
`protected` | `LineItem()` Constructs a new empty LineItem.
`` | `LineItem(Quote quote, ProductItem product, int qty)` Constructs a new LineItem for the Quote specified and representing a quantity of the ProductItem specified.

Method Summary
`protected void` | `addAdjustment(int qty, AdjustmentDetail detail)` Add a LineAdjustment to the LineItem with the specified AdjustmentDetail.
`protected void` | `addAdjustment(int seqNumber, int qty, AdjustmentDetail detail)` Add a LineAdjustment to the LineItem with the specified AdjustmentDetail.
`java.util.List` | `getAdjustments()` Returns the List of LineAdjustments for this LineItem.
`Money` | `getBasePrice()` Returns the base unit price for this item.
`java.lang.String` | `getCurrency()` Returns the currency for this adjustment.
`Money` | `getMsrp()` Returns the manufacturers suggested retail price unit price for this item.
`ProductItem` | `getProductItem()` Returns the ProductItem associated with this LineItem.
`int` | `getQty()` Returns the quantity of the ProductItem represented by this LineItem.
`Quote` | `getQuote()` returns the Quote object for this LineItem
`Money` | `getTotal()` Returns the total price for this LineItem.
`long` | `getUID()` returns the unique numeric identifier for the LineItem.
`protected static void` | `resetSeqNumber()` reset sequence number
`void` | `set(Quote quote, ProductItem product, int qty)` Initializes the LineItem for the Quote specified and representing a quantity of the ProductItem specified.
`java.lang.String` | `toString()` Provides a string representation for this LineItem.
`static java.lang.String` | `toString(java.util.List list)` Provides a string representation for a List of LineItems.

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

Constructor Detail

### LineItem

    protected LineItem()

  Constructs a new empty LineItem. The new LineItem will not represent a ProductItem and will have a quantity of zero and base and msrp prices of zero. To be used this LineItem must be set with the set() method.

### LineItem

    public LineItem(Quote quote,
                    ProductItem product,
                    int qty)
             throws QuoteException

  Constructs a new LineItem for the Quote specified and representing a quantity of the ProductItem specified.

  Parameters:
    `quote` - the Quote object this LineItem is part of.
    `product` - the ProductItem associated with this LineItem.
    `qty` - the quantity of the ProductItem represented by this LineItem.
  Throws:
    QuoteException -
  See Also:
    `ProductItem`

Method Detail

### resetSeqNumber

    protected static void resetSeqNumber()

  reset sequence number

### set

    public void set(Quote quote,
                    ProductItem product,
                    int qty)
             throws QuoteException

  Initializes the LineItem for the Quote specified and representing a quantity of the ProductItem specified.

  Parameters:
    `quote` - the Quote object this LineItem is part of.
    `product` - the ProductItem associated with this LineItem.
    `qty` - the quantity of the ProductItem represented by this LineItem.
  Throws:
    QuoteException -
  See Also:
    `ProductItem`

### getQty

    public final int getQty()

  Returns the quantity of the ProductItem represented by this LineItem.

### getProductItem

    public final ProductItem getProductItem()

  Returns the ProductItem associated with this LineItem.

  Returns:
    return the ProductItem for this LineItem, if the no argument constructor was used and the set() method was not called this method will return null.
  See Also:
    `ProductItem`

### getQuote

    public final Quote getQuote()

  returns the Quote object for this LineItem

  Returns:
    the Quote object for this LineItem
  See Also:
    `Quote`

### getAdjustments

    public java.util.List getAdjustments()

  Returns the List of LineAdjustments for this LineItem.

  Returns:
    List of LineAdjustments.
  See Also:
    `LineAdjustment`

### getBasePrice

    public final Money getBasePrice()

  Returns the base unit price for this item.

  Returns:
    Money object representing the base unit price for this item.
  See Also:
    `Money`, `ProductItem`

### getMsrp

    public final Money getMsrp()

  Returns the manufacturers suggested retail price unit price for this item.

  Returns:
    Money object representing the manufacturers suggested retail price unit price for this item.
  See Also:
    `Money`, `ProductItem`

### getTotal

    public Money getTotal()

  Returns the total price for this LineItem. The total is computed by adding the unit prices for each quantity of the LineItem.

  Returns:
    Money object representing the total price of the LineItem.
  See Also:
    `Money`

### getUID

    public final long getUID()

  returns the unique numeric identifier for the LineItem. When LineItems are generated through the QuoteFactory the idnetifiers are guarnteed to be unique.

### getCurrency

    public final java.lang.String getCurrency()

  Returns the currency for this adjustment. All money values for this adjustment are of this currency

### addAdjustment

    protected void addAdjustment(int qty,
                                 AdjustmentDetail detail)
                          throws QuoteException

  Add a LineAdjustment to the LineItem with the specified AdjustmentDetail. The sequence number is obtained through the quote object.

  Parameters:
    `qty` - the quantity of the item to adjust.
    `aDetail` - an AdjustmentDetail.
  Returns:
    void
  See Also:
    `LineAdjustment`, `AdjustmentDetail`, `Quote`

### addAdjustment

    protected void addAdjustment(int seqNumber,
                                 int qty,
                                 AdjustmentDetail detail)
                          throws QuoteException

  Add a LineAdjustment to the LineItem with the specified AdjustmentDetail. The sequence number is obtained through the quote object.

  Parameters:
    `seqNumber` - the sequence number for this adjustment.
    `qty` - the quantity of the item to adjust.
    `aDetail` - an AdjustmentDetail.
  Returns:
    void
  See Also:
    `LineAdjustment`, `AdjustmentDetail`, `Quote`

### toString

    public java.lang.String toString()

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

  Overrides:
    toString in class java.lang.Object

### toString

    public static final java.lang.String toString(java.util.List list)

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

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

Copyright © 2002 BEA Systems, Inc. All Rights Reserved