com.ivata.mask.web.demo.order
Class OrderDO

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

public final class OrderDO
extends DemoValueObject

Represents a single order 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
OrderDO()
           Construct a new order instance with no id.
OrderDO(int idParam)
           Construct a new order instance with the given unique identifier.
 
Method Summary
 CustomerDO getCustomer()
          Each order had to be ordered by someone! This is the customer who placed the order.
 java.lang.String getDisplayValue()
          For an order, this just returns toString().
 java.util.List getItems()
          An order ain't nothing without some items being purchased.
 void setCustomer(CustomerDO customerDO)
          Sets the customer who made this order.
 void setItems(java.util.List list)
          Set all of the items in the order as a list.
 
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

OrderDO

public OrderDO()

Construct a new order instance with no id.


OrderDO

public OrderDO(int idParam)

Construct a new order instance with the given unique identifier.

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

getCustomer

public CustomerDO getCustomer()
Each order had to be ordered by someone! This is the customer who placed the order.

Returns:
the customer who placed this order.

getItems

public java.util.List getItems()
An order ain't nothing without some items being purchased. This List contains instances of OrderItemDO.

Returns:
List containing instances of OrderItemDO.

setCustomer

public void setCustomer(CustomerDO customerDO)
Sets the customer who made this order.

Parameters:
customerDO - customer who made this order.

setItems

public void setItems(java.util.List list)
Set all of the items in the order as a list.

Parameters:
list - a List of OrderItemDO instances.

getDisplayValue

public java.lang.String getDisplayValue()
For an order, this just returns toString().

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


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