org.cocome.tradingsystem.inventory.application.store
Class ProductTO

java.lang.Object
  extended by org.cocome.tradingsystem.inventory.application.store.ProductTO
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ProductWithStockItemTO, ProductWithSupplierTO

public class ProductTO
extends java.lang.Object
implements java.io.Serializable

ProductTO is used as transfer object class for transferring basic product information between client and the service-oriented application layer. It contains either copies of persisted data which are transferred to the client, or data which is transferred from the client to the application layer for being processed and persisted.

Author:
herold
See Also:
Serialized Form

Field Summary
protected  long barcode
           
protected  long id
           
protected  java.lang.String name
           
protected  double purchasePrice
           
 
Constructor Summary
ProductTO()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks public attributes for equality required for UC 8 (class AmplStarter)
 long getBarcode()
          Gets barcode value.
 long getId()
          Gets id.
 java.lang.String getName()
          Gets name of the product.
 double getPurchasePrice()
          Gets purchase price of product.
 void setBarcode(long barcode)
          Sets barcode value.
 void setId(long id)
          sets the id.
 void setName(java.lang.String name)
          Sets name of product.
 void setPurchasePrice(double purchasePrice)
          Sets purchase price of product.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected long id

barcode

protected long barcode

purchasePrice

protected double purchasePrice

name

protected java.lang.String name
Constructor Detail

ProductTO

public ProductTO()
Method Detail

getId

public long getId()
Gets id.

Returns:
The identifier.

setId

public void setId(long id)
sets the id.


getBarcode

public long getBarcode()
Gets barcode value.

Returns:
Saved barcode value.

setBarcode

public void setBarcode(long barcode)
Sets barcode value.

Parameters:
barcode -

getName

public java.lang.String getName()
Gets name of the product.

Returns:
Name of product.

setName

public void setName(java.lang.String name)
Sets name of product.

Parameters:
name - New name.

getPurchasePrice

public double getPurchasePrice()
Gets purchase price of product.

Returns:
Saved purchase price.

setPurchasePrice

public void setPurchasePrice(double purchasePrice)
Sets purchase price of product.

Parameters:
purchasePrice - Purchase price to e set.

equals

public boolean equals(java.lang.Object obj)
Checks public attributes for equality

required for UC 8 (class AmplStarter)

Overrides:
equals in class java.lang.Object