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

## com.beasys.commerce.ebusiness.order
Class OrderLineImpl

    java.lang.Object
      com.beasys.commerce.foundation.BelongingImpl
          com.beasys.commerce.ebusiness.order.OrderLineImpl

All Implemented Interfaces:
  Belonging, BusinessSmartComponent, Cloneable, Comparable, OrderLine, RelationalReference, Serializable

public class OrderLineImpl
extends BelongingImpl
implements OrderLine

OrderLine represents one line in an Order. It contains a reference to an Item, a Quantity, a unitPrice and a list of Adjustments to the total line price.

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

Field Summary
`ArrayList` | `adjustmentPresentations` the list of OrderAdjustmentPresentation objects relating to a particular line.
`String` | `description` Containment: By Value Multiplicity: 1:1
`Money` | `msrp` Containment: By Value Multiplicity: 1:1
`String` | `productIdentifier` Containment: By Value Multiplicity: 1:1
`double` | `quantity` Containment: By Value Multiplicity: 1:1
`Money` | `shipping` Containment: By Value Multiplicity: 1:1
`Money` | `tax` Containment: By Value Multiplicity: 1:1
`double` | `totalLineAmount` The total for the line
`Money` | `unitPrice` Containment: By Value Multiplicity: 1:1

Fields inherited from class com.beasys.commerce.foundation.BelongingImpl
`__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty`

Constructor Summary
`OrderLineImpl()`

Method Summary
`int` | `compareTo(Object o)` Compare this belonging to another
`protected void` | `freezeId()` Once this method is called, any calls to setId() will fail.
`ArrayList` | `getAdjustmentPresentations()` Get the list of OrderAdjustmentPresentation objects
`String` | `getDescription()` Get the value of description
`long` | `getId()` Get order line id.
`Money` | `getLineTotal(int totalType)` Gets the line total for the given total type
`Money` | `getMsrp()` Get the value of Msrp
`String` | `getProductIdentifier()` Get the value of productIdentifier
`double` | `getQuantity()` Get the value of quantity
`Money` | `getShipping()` Get the value of shipping
`Money` | `getTax()` Get the value of tax
`double` | `getTotalLineAmount()` Get the value of totalLineAmount
`Money` | `getUnitPrice()` Get the value of unitPrice
`String` | `interfaceName()` interfaceName() returns the unqualified name of the interface from the UML model
`void` | `setAdjustmentPresentations(ArrayList adjustmentPresentations)` Set the list of OrderAdjustmentPresentation object
`void` | `setByValue(Belonging value)` It is possible to call set-by-value with a superclass.
`void` | `setDescription(String description)` Set the value of description
`void` | `setId(long id)` Set the order line id.
`void` | `setMsrp(Money msrp)` Set the value of Msrp
`void` | `setProductIdentifier(String productIdentifier)` Set the value of productIdentifier
`void` | `setQuantity(double quantity)` Set the value of quantity
`void` | `setShipping(Money shipping)` Set the value of shipping
`void` | `setTax(Money tax)` Set the value of tax
`void` | `setTotalLineAmount(double totalLineAmount)` Set the value of subTotalAmount
`void` | `setUnitPrice(Money unitPrice)` Set the value of unitPrice
`Belonging` | `value()` value() is a more typesafe implementation of clone()

Methods inherited from class com.beasys.commerce.foundation.BelongingImpl
`clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clone, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, equals, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getPersistenceHelperPlugin, hashCode, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey, toString`

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

Methods inherited from interface com.beasys.commerce.foundation.Belonging
`clone, equals`

Field Detail

### adjustmentPresentations

    public ArrayList adjustmentPresentations

  the list of OrderAdjustmentPresentation objects relating to a particular line. This will only be filled if OrderAsjustmentPersistence select has been called on the parent order.

### description

    public String description

  - Containment: By Value
  - Multiplicity: 1:1

### msrp

    public Money msrp

  - Containment: By Value
  - Multiplicity: 1:1

### productIdentifier

    public String productIdentifier

  - Containment: By Value
  - Multiplicity: 1:1

### quantity

    public double quantity

  - Containment: By Value
  - Multiplicity: 1:1

### shipping

    public Money shipping

  - Containment: By Value
  - Multiplicity: 1:1

### tax

    public Money tax

  - Containment: By Value
  - Multiplicity: 1:1

### totalLineAmount

    public double totalLineAmount

  The total for the line

### unitPrice

    public Money unitPrice

  - Containment: By Value
  - Multiplicity: 1:1

Constructor Detail

### OrderLineImpl

    public OrderLineImpl()

Method Detail

### compareTo

    public int compareTo(Object o)

  Compare this belonging to another

  Specified by:
    `compareTo` in interface `Comparable`
  Specified by:
    `compareTo` in class `BelongingImpl`
  Parameters:
    `o` - target object for comparision
  Returns:
    0 objects are equal

### freezeId

    protected void freezeId()

  Once this method is called, any calls to setId() will fail. This causes id to be frozen after this OrderLine is first persisted in the database. It must be this way since the id is this OrderLine's primary key. This method is called by the WLCS internals.

### getAdjustmentPresentations

    public ArrayList getAdjustmentPresentations()

  Get the list of OrderAdjustmentPresentation objects

  Specified by:
    `getAdjustmentPresentations` in interface `OrderLine`
  Returns:
    an array list

### getDescription

    public String getDescription()

  Get the value of description

  Specified by:
    `getDescription` in interface `OrderLine`
  Returns:
    description.

### getId

    public long getId()

  Get order line id. This id matches the primary key in the database.

  Specified by:
    `getId` in interface `OrderLine`
  Returns:
    an array list

### getLineTotal

    public Money getLineTotal(int totalType)
                       throws InvalidArgumentException

  Gets the line total for the given total type

  Specified by:
    `getLineTotal` in interface `OrderLine`
  Throws:
    `InvalidArgumentException`

### getMsrp

    public Money getMsrp()

  Get the value of Msrp

  Specified by:
    `getMsrp` in interface `OrderLine`
  Returns:
    Msrp.

### getProductIdentifier

    public String getProductIdentifier()

  Get the value of productIdentifier

  Specified by:
    `getProductIdentifier` in interface `OrderLine`
  Returns:
    productIdentifier.

### getQuantity

    public double getQuantity()

  Get the value of quantity

  Specified by:
    `getQuantity` in interface `OrderLine`
  Returns:
    quantity.

### getShipping

    public Money getShipping()

  Get the value of shipping

  Specified by:
    `getShipping` in interface `OrderLine`
  Returns:
    shipping.

### getTax

    public Money getTax()

  Get the value of tax

  Specified by:
    `getTax` in interface `OrderLine`
  Returns:
    tax.

### getTotalLineAmount

    public double getTotalLineAmount()

  Get the value of totalLineAmount

  Specified by:
    `getTotalLineAmount` in interface `OrderLine`
  Returns:
    totalLineAmount.

### getUnitPrice

    public Money getUnitPrice()

  Get the value of unitPrice

  Specified by:
    `getUnitPrice` in interface `OrderLine`
  Returns:
    unitPrice.

### interfaceName

    public String interfaceName()

  interfaceName() returns the unqualified name of the interface from the UML model

  Specified by:
    `interfaceName` in interface `Belonging`
  Returns:
    the unqualified name of the belonging interface from the UML model

### setAdjustmentPresentations

    public void setAdjustmentPresentations(ArrayList adjustmentPresentations)

  Set the list of OrderAdjustmentPresentation object

  Specified by:
    `setAdjustmentPresentations` in interface `OrderLine`

### setByValue

    public void setByValue(Belonging value)

  It is possible to call set-by-value with a superclass. If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values.

  It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.

  Specified by:
    `setByValue` in interface `Belonging`
  Overrides:
    `setByValue` in class `BelongingImpl`
  Parameters:
    `value` - The `Belonging` to use for initialization.

### setDescription

    public void setDescription(String description)

  Set the value of description

  Specified by:
    `setDescription` in interface `OrderLine`
  Parameters:
    `description` - description to be added

### setId

    public void setId(long id)

  Set the order line id. This id is the primary key for this OrderLine in the database. Because of this, all calls to setId AFTER the OrderLine is first persisted will fail. A debug message will be sent to the log in in this case.

  Specified by:
    `setId` in interface `OrderLine`
  Parameters:
    `id` - the long order line id.

### setMsrp

    public void setMsrp(Money msrp)

  Set the value of Msrp

  Specified by:
    `setMsrp` in interface `OrderLine`
  Parameters:
    `msrp` - msrp to be added

### setProductIdentifier

    public void setProductIdentifier(String productIdentifier)

  Set the value of productIdentifier

  Specified by:
    `setProductIdentifier` in interface `OrderLine`
  Parameters:
    `productIdentifier` - productIdentifier to be added

### setQuantity

    public void setQuantity(double quantity)

  Set the value of quantity

  Specified by:
    `setQuantity` in interface `OrderLine`
  Parameters:
    `quantity` - quantity to be added

### setShipping

    public void setShipping(Money shipping)

  Set the value of shipping

  Specified by:
    `setShipping` in interface `OrderLine`
  Parameters:
    `shipping` - shipping to be added

### setTax

    public void setTax(Money tax)

  Set the value of tax

  Specified by:
    `setTax` in interface `OrderLine`
  Parameters:
    `tax` - tax to be added

### setTotalLineAmount

    public void setTotalLineAmount(double totalLineAmount)

  Set the value of subTotalAmount

  Specified by:
    `setTotalLineAmount` in interface `OrderLine`
  Parameters:
    `totalLineAmount` - quantity to be added

### setUnitPrice

    public void setUnitPrice(Money unitPrice)

  Set the value of unitPrice

  Specified by:
    `setUnitPrice` in interface `OrderLine`
  Parameters:
    `unitPrice` - unitPrice to be added

### value

    public Belonging value()

  value() is a more typesafe implementation of clone()

  Specified by:
    `value` in interface `Belonging`
  Returns:
    a clone of this instance

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

Copyright © 2004 BEA Systems, Inc. All Rights Reserved