CoCoME TestDriver for Reference Implementation

org.cocome.tradingsystem.testdriver
Class StorePC

java.lang.Object
  extended by org.cocome.tradingsystem.testdriver.StorePC
All Implemented Interfaces:
org.cocome.tradingsystem.systests.interfaces.IStorePC

public class StorePC
extends java.lang.Object
implements org.cocome.tradingsystem.systests.interfaces.IStorePC

Glue code for the store PC.

Version:
$Rev: 63 $
Author:
Benjamin Hummel, $Author: hummel $

Field Summary
private  org.cocome.tradingsystem.inventory.data.store.Store dbStore
          DB representation of this store.
private  int index
          The index of this stock PC.
 
Constructor Summary
StorePC(int index, Enterprise enterprise)
          Create a new stock PC.
 
Method Summary
 org.cocome.tradingsystem.systests.interfaces.IOrder createOrder()
          
 void executeOrder(org.cocome.tradingsystem.systests.interfaces.IOrder order)
          
 int getAmount(org.cocome.tradingsystem.systests.interfaces.IProduct product)
          
(package private)  int getIncomingAmount(org.cocome.tradingsystem.systests.interfaces.IProduct product)
          Returns the incoming amount for a product.
 int getIndex()
          Returns the index of this stock PC.
 void insertStockItem(org.cocome.tradingsystem.systests.interfaces.IProduct product, int salesPrice, int amount, int minAmount)
          
 void rollInOrder(org.cocome.tradingsystem.systests.interfaces.IOrder order)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

private final int index
The index of this stock PC.


dbStore

private final org.cocome.tradingsystem.inventory.data.store.Store dbStore
DB representation of this store.

Constructor Detail

StorePC

public StorePC(int index,
               Enterprise enterprise)
Create a new stock PC.

Method Detail

getAmount

public int getAmount(org.cocome.tradingsystem.systests.interfaces.IProduct product)

Specified by:
getAmount in interface org.cocome.tradingsystem.systests.interfaces.IStorePC

getIncomingAmount

int getIncomingAmount(org.cocome.tradingsystem.systests.interfaces.IProduct product)
Returns the incoming amount for a product.


insertStockItem

public void insertStockItem(org.cocome.tradingsystem.systests.interfaces.IProduct product,
                            int salesPrice,
                            int amount,
                            int minAmount)

Specified by:
insertStockItem in interface org.cocome.tradingsystem.systests.interfaces.IStorePC

getIndex

public int getIndex()
Returns the index of this stock PC.


createOrder

public org.cocome.tradingsystem.systests.interfaces.IOrder createOrder()

Specified by:
createOrder in interface org.cocome.tradingsystem.systests.interfaces.IStorePC

executeOrder

public void executeOrder(org.cocome.tradingsystem.systests.interfaces.IOrder order)
                  throws javax.naming.OperationNotSupportedException

Specified by:
executeOrder in interface org.cocome.tradingsystem.systests.interfaces.IStorePC
Throws:
javax.naming.OperationNotSupportedException

rollInOrder

public void rollInOrder(org.cocome.tradingsystem.systests.interfaces.IOrder order)
                 throws javax.naming.OperationNotSupportedException

Specified by:
rollInOrder in interface org.cocome.tradingsystem.systests.interfaces.IStorePC
Throws:
javax.naming.OperationNotSupportedException

CoCoME TestDriver for Reference Implementation

CoCoME TestDriver for Reference Implementation - 0.1