01: // ItemHome.java
02:
03: package org.objectweb.jonas.stests.appli;
04:
05: import java.rmi.RemoteException;
06: import java.util.Enumeration;
07:
08: import javax.ejb.CreateException;
09: import javax.ejb.EJBHome;
10: import javax.ejb.FinderException;
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 {
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 id, String name, float price, String data)
36: throws RemoteException, CreateException;
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 primaryKey)
47: throws FinderException, RemoteException;
48:
49: /**
50: * Finds all items
51: * <p>
52: * @exception javax.ejb.FinderException Find Exception
53: * @exception java.rmi.RemoteException Remote Exception
54: * @return an Enumeration of Item beans
55: */
56:
57: public Enumeration findAllItems() throws FinderException,
58: RemoteException;
59:
60: /**
61: * Finds items by name
62: * <p>
63: * @param name a String which is the name of the desired items
64: * @return an Enumeration of Item beans that match the name
65: * @exception javax.ejb.FinderException Find Exception
66: * @exception java.rmi.RemoteException Remote Exception
67: */
68:
69: public Enumeration findByName(String name) throws FinderException,
70: RemoteException;
71:
72: /**
73: * Finds items by price
74: * <p>
75: * @param name a float which is the price of the desired items
76: * @return an Enumeration of Item beans that match the price
77: * @exception javax.ejb.FinderException Find Exception
78: * @exception java.rmi.RemoteException Remote Exception
79: */
80:
81: public Enumeration findByPrice(Float price) throws FinderException,
82: RemoteException;
83:
84: }
|