WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb20.relationships.many2many
Interface Account

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

public interface Account
extends javax.ejb.EJBObject

The methods in this interface are the public face of AccountBean. The signatures of the methods are identical to those of the bean, except that these methods throw a java.rmi.RemoteException. Note that the EJBean does not implement this interface. The corresponding code-generated EJBObject implements this interface and delegates to the EJBean.

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

Method Summary
 java.lang.String accountType()
          Type of account.
 void addCustomer(Customer cust)
          Adds customer.
 double balance()
          Balance in account.
 double deposit(double amount)
          Deposits an amount.
 java.lang.String getAccountId()
          Returns account ID.
 java.util.Collection getAllCustomers()
          Returns a serializable collection of customers.
 double withdraw(double amount)
          Withdraws an amount.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

accountType

public java.lang.String accountType()
                             throws java.rmi.RemoteException
Type of account.
Returns:
String account Type
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

addCustomer

public void addCustomer(Customer cust)
                 throws java.rmi.RemoteException
Adds customer.
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

balance

public double balance()
               throws java.rmi.RemoteException
Balance in account.
Returns:
double Account Balance
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

deposit

public double deposit(double amount)
               throws java.rmi.RemoteException
Deposits an amount.
Parameters:
amount - double Amount to deposit
Returns:
double Account Balance
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

getAccountId

public java.lang.String getAccountId()
                              throws java.rmi.RemoteException
Returns account ID.
Returns:
String account ID
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

getAllCustomers

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

withdraw

public double withdraw(double amount)
                throws java.rmi.RemoteException
Withdraws an amount.
Parameters:
amount - double Amount to withdraw
Returns:
double Account Balance
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.