com.ibm.websphere.samples.appprofile.accountmanagementejb
Interface AccountHome

All Superinterfaces:
javax.ejb.EJBHome, java.rmi.Remote

public interface AccountHome
extends javax.ejb.EJBHome

The Home Interfe for Application Profile Account Management Sample

Since:
04/15/2002

Method Summary
 Account create(java.lang.String accountid)
          This Home Interface Method is responsible for the creation of an Account entry.
 Account create(java.lang.String accountid, int type, double balance, double apr)
          This Home Interface Method is responsible for the creation of an Account entry.
 java.util.Collection findAllAccounts()
          This Home Interface Method is responsible for finding a collection of all Accounts.
 Account findByAccountId(java.lang.String accountid)
          This Home Interface Method is responsible for finding an Account entry based on the account id.
 Account findByPrimaryKey(java.lang.String accountid)
          This Home Interface Method is responsible for finding an Account entry based on the accountid.
 java.util.Collection findLargeAccounts(double balance)
          This Home Interface Method is responsible for finding a collection of Accounts with balance greater than the balance parameter.
 
Methods inherited from interface javax.ejb.EJBHome
getEJBMetaData, getHomeHandle, remove, remove
 

Method Detail

create

Account create(java.lang.String accountid)
               throws javax.ejb.CreateException,
                      java.rmi.RemoteException
This Home Interface Method is responsible for the creation of an Account entry. Except for the accountid field, the other fields will be filled with default value. Default type is 1, default balance is 100.0, and default APR is 4.0.

Parameters:
accountid - String object used as the primary key of the Account object, and used to set accountid attribute
Returns:
Account object created by this method
Throws:
javax.ejb.CreateException - This exception is thrown to indicate a failure to create the entity EJB.
java.rmi.RemoteException - Signals that a Remote exception of some sort has occurred.

create

Account create(java.lang.String accountid,
               int type,
               double balance,
               double apr)
               throws javax.ejb.CreateException,
                      java.rmi.RemoteException
This Home Interface Method is responsible for the creation of an Account entry.

Parameters:
accountid - String object used as the primary key of the Account object, and used to set accountid attribute
type - used to set type attribute
balance - used to set balance attribute
apr - used to set APR attribute
Returns:
Account object created by this method
Throws:
javax.ejb.CreateException - This exception is thrown to indicate a failure to create the entity EJB.
java.rmi.RemoteException - Signals that a Remote exception of some sort has occurred.

findByAccountId

Account findByAccountId(java.lang.String accountid)
                        throws javax.ejb.FinderException,
                               java.rmi.RemoteException
This Home Interface Method is responsible for finding an Account entry based on the account id.

Parameters:
accountid - String object used as the primary key of Account object.
Returns:
Account object found by this method.
Throws:
javax.ejb.FinderException - This exception is thrown to indicate a failure to find the entity EJB.
java.rmi.RemoteException - Signals that a Remote exception of some sort has occurred.

findLargeAccounts

java.util.Collection findLargeAccounts(double balance)
                                       throws javax.ejb.FinderException,
                                              java.rmi.RemoteException
This Home Interface Method is responsible for finding a collection of Accounts with balance greater than the balance parameter.

Parameters:
balance - the minimum value of balance attribute.
Returns:
Collection of Account objects found by this method.
Throws:
javax.ejb.FinderException - This exception is thrown to indicate a failure to find the entity EJB.
java.rmi.RemoteException - Signals that a Remote exception of some sort has occurred.

findAllAccounts

java.util.Collection findAllAccounts()
                                     throws javax.ejb.FinderException,
                                            java.rmi.RemoteException
This Home Interface Method is responsible for finding a collection of all Accounts.

Returns:
Collection of Account objects found by this method.
Throws:
javax.ejb.FinderException - This exception is thrown to indicate a failure to find the entity EJB.
java.rmi.RemoteException - Signals that a Remote exception of some sort has occurred.

findByPrimaryKey

Account findByPrimaryKey(java.lang.String accountid)
                         throws javax.ejb.FinderException,
                                java.rmi.RemoteException
This Home Interface Method is responsible for finding an Account entry based on the accountid.

Parameters:
accountid - String object used as the primary key of Account object.
Returns:
Account object found by this method.
Throws:
javax.ejb.FinderException - This exception is thrown to indicate a failure to find the entity EJB.
java.rmi.RemoteException - Signals that a Remote exception of some sort has occurred.