WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb20.relationships.one2many
Interface Customer

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

public interface Customer
extends javax.ejb.EJBObject

Interface for a customer bean. Demonstrates one to many releationship with AccountBean.

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

Method Summary
 void addAccount(Account acct)
          Adds Account.
 java.util.Collection getAccounts()
          Return accounts.
 java.util.Collection getAllAccounts()
          Returns serializable Collection of Accounts.
 java.lang.String getName()
          Returns name of customer.
 void setAccounts(java.util.Collection accts)
           
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

addAccount

public void addAccount(Account acct)
                throws java.rmi.RemoteException
Adds Account.
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

getAccounts

public java.util.Collection getAccounts()
                                 throws java.rmi.RemoteException
Return accounts.
Returns:
Collection
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

getAllAccounts

public java.util.Collection getAllAccounts()
                                    throws java.rmi.RemoteException
Returns serializable Collection of Accounts.
Returns:
Collection
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Returns name of customer.
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

setAccounts

public void setAccounts(java.util.Collection accts)
                 throws java.rmi.RemoteException

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

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