WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb20.relationships.one2many
Interface CustomerHome

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

public interface CustomerHome
extends javax.ejb.EJBHome

This interface is the home interface for the EJBean CustomerBean. A home interface may support one or more create methods, which must correspond to methods named "ejbCreate" in the EJBean.

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

Method Summary
 Customer create(java.lang.String name, int age, java.lang.Integer level, java.sql.Date lastDate)
          This method corresponds to the ejbCreate method in the bean "CustomerBean.java".
 java.util.Collection findByImportance(int level)
           
 java.util.Collection findByName(java.lang.String start, java.lang.String end)
           
 Customer findByPrimaryKey(java.lang.String primaryKey)
          Given a Primary Key, refreshes the EJBean from the persistent storage.
 
Methods inherited from interface javax.ejb.EJBHome
getEJBMetaData, getHomeHandle, remove, remove
 

Method Detail

create

public Customer create(java.lang.String name,
                       int age,
                       java.lang.Integer level,
                       java.sql.Date lastDate)
                throws javax.ejb.CreateException,
                       java.rmi.RemoteException
This method corresponds to the ejbCreate method in the bean "CustomerBean.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 CustomerBean.ejbCreate()

findByImportance

public java.util.Collection findByImportance(int level)
                                      throws javax.ejb.FinderException,
                                             java.rmi.RemoteException

findByName

public java.util.Collection findByName(java.lang.String start,
                                       java.lang.String end)
                                throws javax.ejb.FinderException,
                                       java.rmi.RemoteException

findByPrimaryKey

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

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

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