OpMath

com.opmath.test.j2ee.contact
Interface ContactHome

All Superinterfaces:
EJBHome, Remote

public interface ContactHome
extends EJBHome

The (remote) Home interface of the Contact EJB. Specifies the functionality as avaliable to remote clients (and provided by the EJB container) with respect to creating and finding Contact EJBs.

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SDK 1.3.1, J2SDKEE 1.3.1, EJB 2.0
Version:
OpMath J2EE Example v1.0
Author:
Bruno Beloff bruno.beloff@opmath.com
See Also:
ContactBean

Method Summary
 Contact create(ContactPK key, ContactVO data)
          Requests that a new Contact EJB is created, with the given unique key and given data.
 Collection findAll()
          Finds all the Contact EJBs known to the container.
 Collection findByGivenNameOrFamilyName(String givenName, String familyName)
          Finds the Contact EJBs that match one or both parameters.
 Contact findByPrimaryKey(ContactPK key)
          Finds the Contact EJB with the given unique key.
 
Methods inherited from interface javax.ejb.EJBHome
getEJBMetaData, getHomeHandle, remove, remove
 

Method Detail

create

public Contact create(ContactPK key,
                      ContactVO data)
               throws RemoteException,
                      CreateException

Requests that a new Contact EJB is created, with the given unique key and given data. The method returns the (remote interface of) the new EJB.

Parameters:
key - a ContactPK specifying the key.
data - a ContactVO specifying the state.
Returns:
a Contact remote interface to the new EJB.
Throws:
RemoteException - if problems were encountered in communicating with the application server.
CreateException - if the request not be completed, for whatever reason (for example, because a Contact with the same key already exists).
See Also:
ContactBean.ejbCreate(ContactPK, ContactVO)

findByPrimaryKey

public Contact findByPrimaryKey(ContactPK key)
                         throws RemoteException,
                                FinderException

Finds the Contact EJB with the given unique key.

Parameters:
key - a ContactPK specifying the Contact EJB.
Returns:
a Contact remote interface to the found EJB.
Throws:
RemoteException - if problems were encountered in communicating with the application server.
FinderException - if the request not be completed, for whatever reason (for example, because no Contact EJB exists for the given key).

findByGivenNameOrFamilyName

public Collection findByGivenNameOrFamilyName(String givenName,
                                              String familyName)
                                       throws RemoteException,
                                              FinderException

Finds the Contact EJBs that match one or both parameters.

WARNING: As with other find services on CMP EJBs, this method is dependent on the QL implementation of the container and deploy tool. Problems have been encountered with the J2SDKEE 1.3.1 here. See: http://forum.java.sun.com/thread.jsp?forum=13&thread=263005 and: http://developer.java.sun.com/developer/bugParade/bugs/4517005.html.

Returns:
a Collection carrying all the found EJBs.
Throws:
RemoteException - if problems were encountered in communicating with the application server.
FinderException - if the request not be completed, for whatever reason (for example, because no matching Contact EJB exists).

findAll

public Collection findAll()
                   throws RemoteException,
                          FinderException

Finds all the Contact EJBs known to the container.

Returns:
a Collection carrying all the found EJBs.
Throws:
RemoteException - if problems were encountered in communicating with the application server.
FinderException - if the request not be completed, for whatever reason (for example, because no Contact EJB exists).

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK