© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.order
Class OrderLineImpl

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

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
 java.util.ArrayList adjustmentPresentations
          the list of OrderAdjustmentPresentation objects relating to a particular line.
 java.lang.String description
           Containment: By Value Multiplicity: 1:1
 Money msrp
           Containment: By Value Multiplicity: 1:1
 java.lang.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(java.lang.Object o)
          Compare this belonging to another
protected  void freezeId()
          Once this method is called, any calls to setId() will fail.
 java.util.ArrayList getAdjustmentPresentations()
          Get the list of OrderAdjustmentPresentation objects
 java.lang.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
 java.lang.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
 java.lang.String interfaceName()
          interfaceName() returns the unqualified name of the interface from the UML model
 void setAdjustmentPresentations(java.util.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(java.lang.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(java.lang.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
 

Field Detail

quantity

public double quantity

totalLineAmount

public double totalLineAmount
The total for the line

tax

public Money tax

unitPrice

public Money unitPrice

shipping

public Money shipping

msrp

public Money msrp

productIdentifier

public java.lang.String productIdentifier

description

public java.lang.String description

adjustmentPresentations

public java.util.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.
Constructor Detail

OrderLineImpl

public OrderLineImpl()
Method Detail

getQuantity

public double getQuantity()
Get the value of quantity
Specified by:
getQuantity in interface OrderLine

Returns:
quantity.

setQuantity

public void setQuantity(double quantity)
Set the value of quantity
Specified by:
setQuantity in interface OrderLine

Parameters:
quantity - quantity to be added

getTotalLineAmount

public double getTotalLineAmount()
Get the value of totalLineAmount
Specified by:
getTotalLineAmount in interface OrderLine

Returns:
totalLineAmount.

setTotalLineAmount

public void setTotalLineAmount(double totalLineAmount)
Set the value of subTotalAmount
Specified by:
setTotalLineAmount in interface OrderLine

Parameters:
subTotalAmount - subTotalAmount to be added

getTax

public Money getTax()
Get the value of tax
Specified by:
getTax in interface OrderLine

Returns:
tax.

setTax

public void setTax(Money tax)
Set the value of tax
Specified by:
setTax in interface OrderLine

Parameters:
tax - tax to be added

getUnitPrice

public Money getUnitPrice()
Get the value of unitPrice
Specified by:
getUnitPrice in interface OrderLine

Returns:
unitPrice.

setUnitPrice

public void setUnitPrice(Money unitPrice)
Set the value of unitPrice
Specified by:
setUnitPrice in interface OrderLine

Parameters:
unitPrice - unitPrice to be added

getShipping

public Money getShipping()
Get the value of shipping
Specified by:
getShipping in interface OrderLine

Returns:
shipping.

setShipping

public void setShipping(Money shipping)
Set the value of shipping
Specified by:
setShipping in interface OrderLine

Parameters:
shipping - shipping to be added

getProductIdentifier

public java.lang.String getProductIdentifier()
Get the value of productIdentifier
Specified by:
getProductIdentifier in interface OrderLine

Returns:
productIdentifier.

setProductIdentifier

public void setProductIdentifier(java.lang.String productIdentifier)
Set the value of productIdentifier
Specified by:
setProductIdentifier in interface OrderLine

Parameters:
productIdentifier - productIdentifier to be added

getMsrp

public Money getMsrp()
Get the value of Msrp
Specified by:
getMsrp in interface OrderLine

Returns:
Msrp.

setMsrp

public void setMsrp(Money msrp)
Set the value of Msrp
Specified by:
setMsrp in interface OrderLine

Parameters:
Msrp - Msrp to be added

getDescription

public java.lang.String getDescription()
Get the value of description
Specified by:
getDescription in interface OrderLine

Returns:
description.

setDescription

public void setDescription(java.lang.String description)
Set the value of description
Specified by:
setDescription in interface OrderLine

Parameters:
description - description to be added

getAdjustmentPresentations

public java.util.ArrayList getAdjustmentPresentations()
Get the list of OrderAdjustmentPresentation objects
Specified by:
getAdjustmentPresentations in interface OrderLine

Returns:
an array list

setAdjustmentPresentations

public void setAdjustmentPresentations(java.util.ArrayList adjustmentPresentations)
Set the list of OrderAdjustmentPresentation object
Specified by:
setAdjustmentPresentations in interface OrderLine

Parameters:
adjustments, - the list of OrderDiscountPresentations

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

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.

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.


value

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

Returns:
a clone of this instance

interfaceName

public java.lang.String interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model

Returns:
the unqualified name of the belonging interface from the UML model

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.

Overrides:
setByValue in class BelongingImpl

compareTo

public int compareTo(java.lang.Object o)
Compare this belonging to another

Parameters:
o - target object for comparision
Returns:
0 objects are equal
Overrides:
compareTo in class BelongingImpl

getLineTotal

public Money getLineTotal(int totalType)
                   throws InvalidArgumentException
Gets the line total for the given total type
Specified by:
getLineTotal in interface OrderLine

Parameters:
total - type
Throws:
InvalidArgumentException -  

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved