org.cocome.tradingsystem.inventory.data.store
Class StockItem

java.lang.Object
  extended by org.cocome.tradingsystem.inventory.data.store.StockItem

public class StockItem
extends java.lang.Object

A StockItem represents a concrete product in the store including sales price, amount, ...

Author:
Yannick Welsch

Constructor Summary
StockItem()
           
 
Method Summary
 long getAmount()
           
 long getId()
           
 long getIncomingAmount()
          Required for UC 8
 long getMaxStock()
          This method will be used while computing the low stock item list
 long getMinStock()
           
 Product getProduct()
           
 double getSalesPrice()
           
 Store getStore()
           
 void setAmount(long amount)
           
 void setId(long id)
           
 void setIncomingAmount(long incomingAmount)
          Set the amount of products that will be delivered in the near future.
 void setMaxStock(long maxStock)
          This method enables the definition of the maximum capacity of a product in a store
 void setMinStock(long minStock)
           
 void setProduct(Product product)
           
 void setSalesPrice(double salesPrice)
           
 void setStore(Store store)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockItem

public StockItem()
Method Detail

getId

public long getId()
Returns:
A unique identifier for StockItem objects

setId

public void setId(long id)
Parameters:
id - A unique identifier

getAmount

public long getAmount()
Returns:
The currently available amount of items of a product

setAmount

public void setAmount(long amount)
Parameters:
amount - The currently available amount of items of a product

getMaxStock

public long getMaxStock()
This method will be used while computing the low stock item list

Returns:
The maximum capacity of a product in a store

setMaxStock

public void setMaxStock(long maxStock)
This method enables the definition of the maximum capacity of a product in a store

Parameters:
maxStock - The maximum capacity of a product in a store

getMinStock

public long getMinStock()
Returns:
The minimum amount of products which has to be available in a store

setMinStock

public void setMinStock(long minStock)
Parameters:
minStock - The minimum amount of products which has to be available in a store

getProduct

public Product getProduct()
Returns:
The Product of a StockItem.

setProduct

public void setProduct(Product product)
Parameters:
product - The Product of a StockItem

getSalesPrice

public double getSalesPrice()
Returns:
The sales price of the StockItem

setSalesPrice

public void setSalesPrice(double salesPrice)
Parameters:
salesPrice - The sales price of the StockItem

getIncomingAmount

public long getIncomingAmount()
Required for UC 8

Returns:
incomingAmount An amount of products that will be delivered in the near future.

setIncomingAmount

public void setIncomingAmount(long incomingAmount)
Set the amount of products that will be delivered in the near future.

Required for UC 8

Parameters:
incomingAmount - The absolute amount (no delta) of incoming products.

getStore

public Store getStore()
Returns:
The store where the StockItem belongs to

setStore

public void setStore(Store store)
Parameters:
store - The store where the StockItem belongs to