WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb20.relationships.many2many
Interface Customer

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

public interface Customer
extends javax.ejb.EJBObject

Interface for a customer bean. Demonstrates many 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 getAllAccounts()
          Returns serializable Collection of Accounts.
 double getBalance()
          Returns balance of associated accounts.
 java.lang.String getName()
          Returns name of customer.
 void removeAccount(Account acct)
          Removes Account.
 
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

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

getBalance

public double getBalance()
                  throws java.rmi.RemoteException
Returns balance of associated accounts.
Returns:
balance
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

removeAccount

public void removeAccount(Account acct)
                   throws java.rmi.RemoteException
Removes Account.
Throws:
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.