# com.bea.commerce.ebusiness.price.service
Line Class

public class Line
extends `Object`
implements `Serializable`

This class represents some quantity of a ProductItem. Instances of the class are used as input to the Price service. Each Line item may be adorned with a List of DiscountPresentation objects corresponding to adjustments applied to the price of the Line.

Related Topics

``PriceService``
``PricingReply``
``PricingRequest``
``PricingRequestImpl``
``DiscountPresentation``
``ProductItem``

Hierarchy
  `Object`
  `Line`

All Implemented Interfaces
  `Serializable`

## Constructor Summary

Line(`ProductItem` item, double quantity) Constructs a new Line with the speicified quantity and ProductItem.

## Method Summary

`public `List`` | `getDiscountDescriptions`() Retrieves a List of DiscountPresentation objects corresponding to price adjustments applied to the Line.
`public `ProductItem`` | `getProductItem`() Retrieves the ProductItem for the Line.
`public double` | `getQuantity`() Retrieves the quantity for the Line.
`public `Money`` | `getTotal`() Retrieves the total price for the Line.
`public void` | `set`(`ProductItem` item, double quantity) Intializes the Line with specified values.
`public void` | `setDiscountDescriptions`(`List` descriptions) Sets the List of DiscountPresentation objects for the Line.
`public void` | `setProductItem`(`ProductItem` item) Sets the ProductItem for the Line.
`public void` | `setQuantity`(double quantity) Sets the quantity for the Line.
`public void` | `setTotal`(`Money` lineTotal) Sets the total price for the Line.
`public `String`` | `toString`() Produces a string representing the data values for this Line.
`public static `String`` | `toString`(`Line`[] lines) Produces a string representation of an array of Line items.

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

## Constructor Detail

### Line

    public Line(ProductItem item,
                double quantity)

  Constructs a new Line with the speicified quantity and ProductItem.

Related Topics

``ProductItem``

## Method Detail

### getDiscountDescriptions() Method

    public List getDiscountDescriptions()

Retrieves a List of DiscountPresentation objects corresponding to price adjustments applied to the Line.

#### Returns

List of DiscountPresentation objects or null.

Related Topics

``DiscountPresentation``

### getProductItem() Method

    public ProductItem getProductItem()

Retrieves the ProductItem for the Line.

Related Topics

``ProductItem``

### getQuantity() Method

    public double getQuantity()

Retrieves the quantity for the Line.

### getTotal() Method

    public Money getTotal()

Retrieves the total price for the Line.

### set(ProductItem, double) Method

    public void set(ProductItem item,
                    double quantity)

Intializes the Line with specified values.

#### Parameters

item
  the ProductItem for the Line.

quantity
  the quantity of the ProductItem.

Related Topics

``ProductItem``

### setDiscountDescriptions(List) Method

    public void setDiscountDescriptions(List descriptions)

Sets the List of DiscountPresentation objects for the Line.

#### Parameters

descriptions
  a List of DiscountPresentation objects

Related Topics

``DiscountPresentation``

### setProductItem(ProductItem) Method

    public void setProductItem(ProductItem item)

Sets the ProductItem for the Line.

Related Topics

``ProductItem``

### setQuantity(double) Method

    public void setQuantity(double quantity)

Sets the quantity for the Line.

### setTotal(Money) Method

    public void setTotal(Money lineTotal)

Sets the total price for the Line.

### toString() Method

    public String toString()

Produces a string representing the data values for this Line. This method is intended for debugging purposes and may change at anytime.

Overrides
  `Object.toString()`

### toString(Line[]) Method

    public static String toString(Line[] lines)

Produces a string representation of an array of Line items. The string is produced by concatenating the results of the toString() method for each Line in the array.