com.ivata.mask.web.demo.product
Class ProductDO

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

public final class ProductDO
extends DemoValueObject

Represents a single product which can be ordered.

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

Constructor Summary
ProductDO()
           Construct a new product instance with no id.
ProductDO(int id)
           Construct a new product instance with the given unique identifier.
 
Method Summary
 java.lang.String getDescription()
          The product's description is a long text designed to make you desperate to own one immediately.
 java.lang.String getDisplayValue()
          For products, the value displayed is always the product's name.
 java.lang.String getName()
          The name of a product is unique among products - that short text which uniquely identifies it.
 java.math.BigDecimal getPrice()
          What price quality? This is the cost of a single unit of the product.
 void setDescription(java.lang.String descriptionParam)
          The product's description is a long text designed to make you desperate to own one immediately.
 void setName(java.lang.String nameParam)
          The name of a product is unique among products - that short text which uniquely identifies it.
 void setPrice(java.math.BigDecimal priceParam)
          Set the cost of one unit of this product.
 
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

ProductDO

public ProductDO()

Construct a new product instance with no id.


ProductDO

public ProductDO(int id)

Construct a new product instance with the given unique identifier.

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

getDescription

public java.lang.String getDescription()
The product's description is a long text designed to make you desperate to own one immediately.

Returns:
long text designed to make you drool.

getDisplayValue

public java.lang.String getDisplayValue()
For products, the value displayed is always the product's name.

Returns:
just returns the product's name.
See Also:
com.ivata.mask.valueobject.ValueObject#getStringValue()

getName

public java.lang.String getName()
The name of a product is unique among products - that short text which uniquely identifies it.

Returns:
unique name of this product.

getPrice

public java.math.BigDecimal getPrice()
What price quality? This is the cost of a single unit of the product.

Returns:
cost of a single unit of the product.

setDescription

public void setDescription(java.lang.String descriptionParam)
The product's description is a long text designed to make you desperate to own one immediately.

Parameters:
descriptionParam - long text designed to make you drool.

setName

public void setName(java.lang.String nameParam)
The name of a product is unique among products - that short text which uniquely identifies it.

Parameters:
nameParam - unique name of this product.

setPrice

public void setPrice(java.math.BigDecimal priceParam)
Set the cost of one unit of this product.

Parameters:
priceParam - cost of a single unit of this product.


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