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

## theory.smart.ebusiness.order
Class OrderLineImpl

    java.lang.Object
      |
      +--theory.smart.foundation.BelongingImpl
            |
            +--theory.smart.ebusiness.order.OrderLineImpl

Direct Known Subclasses:
  PurchasedOrderLineImpl

public class OrderLineImpl
extends BelongingImpl
implements OrderLine

This class combines an item and a quantity. The item is a reference to an entity bean. This class is persisted inside an order.

See Also:
  `OrderLine`, `OrderLineHome`, Serialized Form

Field Summary
`SmartHandle` | `item` item [OrderLine] <>------> [`theory.smart.ebusiness.item.Item`]
`Price` | `price` price [OrderLine] <*>------> [`theory.smart.axiom.units.Price`]
`Quantity` | `quantity` quantity [OrderLine] <*>------> [`theory.smart.axiom.units.Quantity`]

Fields inherited from class theory.smart.foundation.BelongingImpl
`isDirty`

Constructor Summary
`OrderLineImpl()`

Method Summary
`int` | `compareTo(java.lang.Object o)`
`void` | `correctPrice(Price newPrice)` Forcibly correct a price once it has been locked in.
`Item` | `getItem()` Get the remote object reference of item
`Price` | `getItemPrice(Customer customer)` Get the price for a single unit using the Item's price calculation policy.
`Price` | `getLinePrice(Customer customer)` Get the value of the order by using the priceCalculationPolicy to determing the price and multiplying the price by the quantity.
`Price` | `getPrice()` Get the value of price
`Quantity` | `getQuantity()` Get the value of quantity
`void` | `lockinPrice(Customer customer)` Freeze the price of the item by getting the Item price and storing a local copy of the value.
`void` | `setItem(Item item)` Set the remote object reference of item
`void` | `setPrice(Price price)` Set the value of price
`void` | `setQuantity(Quantity quantity)` Set the value of quantity
`Belonging` | `value()`

Methods inherited from class theory.smart.foundation.BelongingImpl
`equals`

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

Field Detail

### item

    public SmartHandle item

                        item
       [OrderLine] <>------> [theory.smart.ebusiness.item.Item]

### quantity

    public Quantity quantity

                        quantity
       [OrderLine] <*>------> [theory.smart.axiom.units.Quantity]

### price

    public Price price

                        price
       [OrderLine] <*>------> [theory.smart.axiom.units.Price]

Constructor Detail

### OrderLineImpl

    public OrderLineImpl()

Method Detail

### getItem

    public Item getItem()
                 throws java.rmi.RemoteException

  Get the remote object reference of item
  Specified by:
    getItem in interface OrderLine
  Returns:
    item.

### setItem

    public void setItem(Item item)
                 throws java.rmi.RemoteException

  Set the remote object reference of item
  Specified by:
    setItem in interface OrderLine
  Parameters:
    `items` - item to be added

### getQuantity

    public Quantity getQuantity()

  Get the value of quantity
  Specified by:
    getQuantity in interface OrderLine
  Returns:
    quantity.

### setQuantity

    public void setQuantity(Quantity quantity)

  Set the value of quantity
  Specified by:
    setQuantity in interface OrderLine
  Parameters:
    `quantity` - quantity to be added

### getPrice

    public Price getPrice()

  Get the value of price
  Specified by:
    getPrice in interface OrderLine
  Returns:
    price.

### setPrice

    public void setPrice(Price price)

  Set the value of price
  Specified by:
    setPrice in interface OrderLine
  Parameters:
    `price` - price to be added

### value

    public Belonging value()

### compareTo

    public int compareTo(java.lang.Object o)

  Overrides:
    compareTo in class BelongingImpl

### getLinePrice

    public Price getLinePrice(Customer customer)
                       throws java.rmi.RemoteException

  Get the value of the order by using the priceCalculationPolicy to determing the price and multiplying the price by the quantity.
  Specified by:
    getLinePrice in interface OrderLine

### getItemPrice

    public Price getItemPrice(Customer customer)
                       throws java.rmi.RemoteException

  Get the price for a single unit using the Item's price calculation policy.
  Specified by:
    getItemPrice in interface OrderLine

### lockinPrice

    public void lockinPrice(Customer customer)
                     throws java.rmi.RemoteException

  Freeze the price of the item by getting the Item price and storing a local copy of the value.
  Specified by:
    lockinPrice in interface OrderLine

### correctPrice

    public void correctPrice(Price newPrice)

  Forcibly correct a price once it has been locked in.
  Specified by:
    correctPrice in interface OrderLine

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

© Copyright 2000 bea Systems, Inc. All rights reserved.