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

All Superinterfaces:
javax.ejb.EJBLocalHome

public interface LocalAccountHome
extends javax.ejb.EJBLocalHome

The Home Local Interfe for Application Profile Account Management Sample

Since:
04/15/2002

Method Summary
 LocalAccount create(java.lang.String accountid)
          This Local Home Interface Method is responsible for the creation of an Account entry.
 LocalAccount create(java.lang.String accountid, int type, double balance, double apr)
          This Local 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.
 LocalAccount findByAccountId(java.lang.String accountid)
          This Home Interface Method is responsible for finding an Account entry based on the account id.
 LocalAccount 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.EJBLocalHome
remove
 

Method Detail

create

LocalAccount create(java.lang.String accountid)
                    throws javax.ejb.CreateException
This Local 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.

create

LocalAccount create(java.lang.String accountid,
                    int type,
                    double balance,
                    double apr)
                    throws javax.ejb.CreateException
This Local 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 - int used to set type attribute
balance - double used to set balance attribute
apr - double 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.

findByAccountId

LocalAccount findByAccountId(java.lang.String accountid)
                             throws javax.ejb.FinderException
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.

findLargeAccounts

java.util.Collection findLargeAccounts(double balance)
                                       throws javax.ejb.FinderException
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

findAllAccounts

java.util.Collection findAllAccounts()
                                     throws javax.ejb.FinderException
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.

findByPrimaryKey

LocalAccount findByPrimaryKey(java.lang.String accountid)
                              throws javax.ejb.FinderException
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.