KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > stests > appli > CustomerHome


1 // CustomerHome.java
2

3 package org.objectweb.jonas.stests.appli;
4
5 import java.rmi.RemoteException JavaDoc;
6 import java.util.Enumeration JavaDoc;
7
8 import javax.ejb.CreateException JavaDoc;
9 import javax.ejb.EJBHome JavaDoc;
10 import javax.ejb.FinderException JavaDoc;
11
12
13 /**
14  * Home interface for the Customer. This will handle all lifecycle
15  * related operations for the class of Customers: creation, location,
16  * deletion.
17  * <p>
18  * Several finder methods are provided to locate customers according
19  * to various search criteria.
20  */

21
22 public interface CustomerHome extends EJBHome JavaDoc {
23
24
25     /**
26      * Create a new Customer with minimal information.
27      * <p>
28      * @param id Customer ID for the customer being created, must be unique
29      * @param fN First name of the customer
30      * @param lN Last name of the customer
31      * @param phone Phone number of the customer
32      * @return Customer
33      * @exception javax.ejb.CreateException Creation Exception
34      * @exception java.rmi.RemoteException Remote Exception
35      */

36  
37     public Customer create(Integer JavaDoc Id, String JavaDoc fN, String JavaDoc lN, String JavaDoc phone)
38         throws CreateException JavaDoc, RemoteException JavaDoc;
39  
40
41     /**
42      * Create a new Customer with all parameters, except balances which will automatically
43      * be initialized to zero
44      * <p>
45      * @param id Customer ID for the customer being created, must be unique
46      * @param fN First name of the customer
47      * @param lN Last name of the customer
48      * @param inits Middle initials of the customer
49      * @param phone Phone number of the customer
50      * @param addr1 First address line of the customer
51      * @param addr2 Second address line of the customer
52      * @param city City of the customer's mailing address
53      * @param state State of the customer's mailing address
54      * @param zip Zip code of the customer's mailing address
55      * @param creditLimit Credit limit allowed for this cusomter
56      * @return Customer
57      * @exception javax.ejb.CreateException Creation Exception
58      * @exception java.rmi.RemoteException Remote Exception
59      */

60
61     public Customer create(Integer JavaDoc Id, String JavaDoc fN, String JavaDoc lN, String JavaDoc inits,
62                            String JavaDoc addr1, String JavaDoc addr2,
63                            String JavaDoc city, String JavaDoc state, String JavaDoc zip,
64                            String JavaDoc phone,
65                            float creditLimit)
66         throws CreateException JavaDoc, RemoteException JavaDoc;
67
68
69     /**
70      * Retrieve an individual customer by their customer ID number.
71      * <p>
72      * @param primaryKey Primary key to find the customer with
73      * @return Customer
74      * @exception javax.ejb.FinderException Find Exception
75      * @exception java.rmi.RemoteException Remote Exception
76      */

77
78     public Customer findByPrimaryKey(Integer JavaDoc primaryKey)
79         throws FinderException JavaDoc, RemoteException JavaDoc;
80
81
82     /**
83      * Retrieve all of the customers with a given last name.
84      * <p>
85      * <strong>Note:</strong>This returns a list of 1 or more customers with the specified last name
86      * @param primaryKey Primary key to find the customer with
87      * @return Customer
88      * @exception javax.ejb.FinderException Find Exception
89      * @exception java.rmi.RemoteException Remote Exception
90      */

91
92     public Enumeration JavaDoc findCustomers(String JavaDoc lastName)
93         throws FinderException JavaDoc, RemoteException JavaDoc;
94
95
96     /**
97      * Retrieve all of the customers.
98      * <p>
99      * @return Enumeration
100      * @exception javax.ejb.FinderException Find Exception
101      * @exception java.rmi.RemoteException Remote Exception
102      */

103
104     public Enumeration JavaDoc findAllCustomers()
105         throws FinderException JavaDoc, RemoteException JavaDoc;
106
107 }
108
109
Popular Tags