package examples.ejb.extensions.readMostly;

/**
 * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
 */

public class StockWriterBean extends StockBean {

  public String ejbCreate(String symbol, double price, long volume)
  {
    this.symbol      = symbol;
    this.price       = price;
    this.volume      = volume;

    yearHigh         = price;
    yearLow          = price;

    return null;
  }

  public void ejbPostCreate(String symbol, double price, long volume)
  {
  }
  
  public void updateStock(double price, long volume) {
    this.price = price;
    this.volume = volume;

    if (price < yearLow) yearLow = price;
    if (price > yearHigh) yearHigh = price;
  }

  

}
