WebLogic Server 6.1 Code Examples, BEA Systems, Inc.

examples.ejb20.cascadeDelete.one2many
Interface AccountHome

All Superinterfaces:
javax.ejb.EJBLocalHome

public interface AccountHome
extends javax.ejb.EJBLocalHome

This interface is the home interface for the EJBean AccountBean, which in WebLogic is implemented by the code-generated container class AccountBeanC. A home interface may support one or more create methods, which must correspond to methods named "ejbCreate" in the EJBean.

Author:
Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.

Method Summary
 Account create(java.lang.String accountId, double initialBalance, java.lang.String type)
          This method corresponds to the ejbCreate method in the bean "AccountBean.java".
 Account findByPrimaryKey(java.lang.String primaryKey)
          Given a Primary Key, refreshes the EJBean from the persistent storage.
 
Methods inherited from interface javax.ejb.EJBLocalHome
remove
 

Method Detail

create

public Account create(java.lang.String accountId,
                      double initialBalance,
                      java.lang.String type)
               throws javax.ejb.CreateException
This method corresponds to the ejbCreate method in the bean "AccountBean.java". The parameter sets of the two methods are identical. When the client calls AccountHome.create(), the container (which in WebLogic EJB is also the factory) allocates an instance of the bean and calls AccountBean.ejbCreate() For container-managed persistence, ejbCreate() returns a null, unlike the case of bean-managed persistence, where it returns a primary key. See section 9.4.2
Parameters:
accountID - String Account ID
initialBalance - double Initial balance
type - String Account type
Returns:
Account
Throws:
javax.ejb.CreateException - if there is an error creating the bean
java.rmi.RemoteException - if there is a communications or systems failure
See Also:
examples.ejb.basic.cmp20_OneToOne.AccountBean

findByPrimaryKey

public Account findByPrimaryKey(java.lang.String primaryKey)
                         throws javax.ejb.FinderException
Given a Primary Key, refreshes the EJBean from the persistent storage.
Parameters:
primaryKey - Primary Key
Returns:
Account
Throws:
javax.ejb.FinderException - if there is an error finding the bean
java.rmi.RemoteException - if there is a communications or systems failure
See Also:
examples.ejb.basic.cmp20_OneToOne.AccountBean

Documentation is available at
http://e-docs.bea.com/wls/docs61

Copyright © 2001 BEA Systems, Inc. All Rights Reserved.