package com.ejbhome.examples;

import java.rmi.RemoteException;
import javax.ejb.*;

public class BonusBean implements EntityBean {

  public int bonus = 0;
  public int socsec = 0;
  protected EntityContext ctx;

  public int getBonus() throws RemoteException { 
	return bonus; 
  }
  public int getSocSec() throws RemoteException {
        return socsec;
  }

  public void addBonus(int bonus) throws RemoteException {
 	this.bonus += bonus;	
  }

  public void ejbCreate(int socsec, int bonus) 
		throws CreateException, RemoteException {
    this.socsec=socsec;
    this.bonus=bonus;
  }

  // Other interface methods

  public void setEntityContext(javax.ejb.EntityContext ctx) throws RemoteException {
    this.ctx = ctx;
  }
  public void unsetEntityContext() throws RemoteException {   
    ctx = null;  
  } 

  public void ejbRemove() throws RemoteException, RemoveException { }
  public void ejbActivate() throws RemoteException { }
  public void ejbPassivate() throws RemoteException { }
  public void ejbLoad() throws RemoteException { }
  public void ejbStore() throws RemoteException { }
}
