KickJava   Java API By Example, From Geeks To Geeks.

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


1 // ItemHome.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  * Home interface for the Item. This will handle all lifecycle
14  * related operations for the class of Items: creation, location,
15  * deletion.
16  * <p>
17  * Several finder methods are provided to locate items according
18  * to various search criteria.
19  */

20
21 public interface ItemHome extends EJBHome JavaDoc {
22
23 /**
24  * Creates an item bean
25  * <p>
26  * @param id an Integer which represents the item id
27  * @param name a String which represents the item name
28  * @param price a float which represents the price
29  * @param data a String which contains additional information about the item
30  * @return the Item bean created
31  * @exception javax.ejb.CreateException Creation Exception
32  * @exception java.rmi.RemoteException Remote Exception
33  */

34
35   public Item create(Integer JavaDoc id, String JavaDoc name, float price, String JavaDoc data)
36     throws RemoteException JavaDoc, CreateException JavaDoc;
37     
38  /**
39   * Finds an item using the primary key
40   * <p>
41   * @param primaryKey an Integer which is the key for the desired item
42   * @return the Item bean that matches the key
43   * @exception javax.ejb.FinderException Find Exception
44   * @exception java.rmi.RemoteException Remote Exception
45   */

46   public Item findByPrimaryKey(Integer JavaDoc primaryKey)
47     throws FinderException JavaDoc, RemoteException JavaDoc;
48     
49
50  /**
51   * Finds all items
52   * <p>
53   * @exception javax.ejb.FinderException Find Exception
54   * @exception java.rmi.RemoteException Remote Exception
55   * @return an Enumeration of Item beans
56   */

57
58   public Enumeration JavaDoc findAllItems( )
59     throws FinderException JavaDoc, RemoteException JavaDoc;
60     
61
62  /**
63   * Finds items by name
64   * <p>
65   * @param name a String which is the name of the desired items
66   * @return an Enumeration of Item beans that match the name
67   * @exception javax.ejb.FinderException Find Exception
68   * @exception java.rmi.RemoteException Remote Exception
69   */

70
71   public Enumeration JavaDoc findByName(String JavaDoc name)
72     throws FinderException JavaDoc, RemoteException JavaDoc;
73     
74
75  /**
76   * Finds items by price
77   * <p>
78   * @param name a float which is the price of the desired items
79   * @return an Enumeration of Item beans that match the price
80   * @exception javax.ejb.FinderException Find Exception
81   * @exception java.rmi.RemoteException Remote Exception
82   */

83
84   public Enumeration JavaDoc findByPrice(Float JavaDoc price)
85     throws FinderException JavaDoc, RemoteException JavaDoc;
86     
87
88
89
90 }
91
Popular Tags