com.ivata.mask.web.demo.order.item
Class OrderItemDO

java.lang.Object
  extended bycom.ivata.mask.web.demo.valueobject.DemoValueObject
      extended bycom.ivata.mask.web.demo.order.item.OrderItemDO
All Implemented Interfaces:
java.io.Serializable, com.ivata.mask.valueobject.ValueObject

public final class OrderItemDO
extends DemoValueObject

Represents a single order item of this imaginary system.

Since:
ivata masks 0.2 (2004-05-20)
Version:
$Revision: 1.4 $
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
Serialized Form

Constructor Summary
OrderItemDO()
           Construct a new order item instance with no id.
OrderItemDO(int idParam)
           Construct a new order item instance with the given unique identifier.
 
Method Summary
 java.lang.String getDisplayValue()
          For an order item, the display value is given as "product x quantity".
 ProductDO getProduct()
          Identifies the product being ordered as this item.
 int getQuantity()
          Number of units of product being ordered.
 void setProduct(ProductDO productParam)
          Identifies the product being ordered as this item.
 void setQuantity(int quantityParam)
          Number of units of product being ordered.
 
Methods inherited from class com.ivata.mask.web.demo.valueobject.DemoValueObject
getId, getIdString, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderItemDO

public OrderItemDO()

Construct a new order item instance with no id.


OrderItemDO

public OrderItemDO(int idParam)

Construct a new order item instance with the given unique identifier.

Parameters:
idParam - unique identifier of this product.
Method Detail

getProduct

public ProductDO getProduct()
Identifies the product being ordered as this item.

Returns:
product instance for this order.

getQuantity

public int getQuantity()
Number of units of product being ordered.

Returns:
number of units of product being ordered.

setProduct

public void setProduct(ProductDO productParam)
Identifies the product being ordered as this item.

Parameters:
productParam - new product instance for this order.

setQuantity

public void setQuantity(int quantityParam)
Number of units of product being ordered.

Parameters:
quantityParam - number of units of product being ordered.

getDisplayValue

public java.lang.String getDisplayValue()
For an order item, the display value is given as "product x quantity".

See Also:
com.ivata.mask.valueobject.ValueObject#getStringValue()


Copyright © 2001-2005 ivata limited. All Rights Reserved.