com.ibm.websphere.samples.i18nctx.currencyexchangeejb
Class CustomerBean

java.lang.Object
  extended by com.ibm.websphere.samples.i18nctx.currencyexchangeejb.CustomerBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.EntityBean

public abstract class CustomerBean
extends java.lang.Object
implements javax.ejb.EntityBean

An Entity Bean class with CMP (2.0) fields.

See Also:
Serialized Form

Constructor Summary
CustomerBean()
           
 
Method Summary
 void deposit(double depositAmt)
          Add depositAmt to Customer balance in database
 void ejbActivate()
           
 void ejbLoad()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 void ejbStore()
           
abstract  java.lang.String getAccount()
           
abstract  double getBalance()
           
 javax.ejb.EntityContext getEntityContext()
          public void ejbPostCreate ( String account, String name, String password, double balance) throws CreateException {}
abstract  java.lang.String getName()
           
abstract  java.lang.String getPassword()
           
abstract  void setAccount(java.lang.String account)
           
abstract  void setBalance(double newValue)
           
 void setEntityContext(javax.ejb.EntityContext ctx)
           
abstract  void setName(java.lang.String newValue)
           
abstract  void setPassword(java.lang.String newValue)
           
 void unsetEntityContext()
           
 void withdraw(double withdrawAmt)
          Substract withdrawAmt from Customer balance in database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomerBean

public CustomerBean()
Method Detail

getAccount

public abstract java.lang.String getAccount()

setAccount

public abstract void setAccount(java.lang.String account)

getBalance

public abstract double getBalance()

setBalance

public abstract void setBalance(double newValue)

getName

public abstract java.lang.String getName()

setName

public abstract void setName(java.lang.String newValue)

getPassword

public abstract java.lang.String getPassword()

setPassword

public abstract void setPassword(java.lang.String newValue)

getEntityContext

public javax.ejb.EntityContext getEntityContext()
public void ejbPostCreate ( String account, String name, String password, double balance) throws CreateException {}


setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
Specified by:
setEntityContext in interface javax.ejb.EntityBean

unsetEntityContext

public void unsetEntityContext()
Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.EntityBean

ejbLoad

public void ejbLoad()
Specified by:
ejbLoad in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
Specified by:
ejbStore in interface javax.ejb.EntityBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.EntityBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.EntityBean

deposit

public void deposit(double depositAmt)
             throws javax.ejb.EJBException
Add depositAmt to Customer balance in database

Parameters:
depositAmt - double
Throws:
javax.ejb.EJBException

withdraw

public void withdraw(double withdrawAmt)
              throws javax.ejb.EJBException
Substract withdrawAmt from Customer balance in database

Parameters:
withdrawAmt - double
Throws:
javax.ejb.EJBException