class Account extends TSOTransactorObject
{
  int value;

  Account (int value) { this.value = value; }

  Object getState () {
    return new Integer (value);
  }

  void setState (Object o) {
    value = ((Integer)o).intValue();
  }

  void delta (Transaction tx, int change) 
               throws Failure
  {
    enter (tx); value += change;
  }

  int read (Transaction tx) throws Failure 
  {
    enter (tx); return value;
  }
}
