01: package com.titan.address;
02:
03: import java.util.Collection;
04: import java.util.Set;
05:
06: import javax.ejb.EntityContext;
07: import javax.ejb.FinderException;
08:
09: import com.titan.customer.CustomerLocal;
10:
11: public abstract class AddressBean implements javax.ejb.EntityBean {
12:
13: public Integer ejbCreateAddress(String street, String city,
14: String state, String zip) throws javax.ejb.CreateException {
15: setStreet(street);
16: setCity(city);
17: setState(state);
18: setZip(zip);
19: return null;
20: }
21:
22: public void ejbPostCreateAddress(String street, String city,
23: String state, String zip) {
24:
25: }
26:
27: // select methods
28: public abstract Set ejbSelectZipCodes(String state)
29: throws FinderException;
30:
31: public abstract Collection ejbSelectAll() throws FinderException;
32:
33: public abstract CustomerLocal ejbSelectCustomer(AddressLocal addr)
34: throws FinderException;
35:
36: // Public Home method required to test the private ejbSelectZipCodes method
37: public Collection ejbHomeSelectZipCodes(String state)
38: throws FinderException {
39: return this .ejbSelectZipCodes(state);
40: }
41:
42: // Public Home method required to test the private ejbSelectCustomer method
43: public CustomerLocal ejbHomeSelectCustomer(AddressLocal addr)
44: throws FinderException {
45: return (CustomerLocal) (this .ejbSelectCustomer(addr));
46: }
47:
48: // persistent fields
49: public abstract String getStreet();
50:
51: public abstract void setStreet(String street);
52:
53: public abstract String getCity();
54:
55: public abstract void setCity(String city);
56:
57: public abstract String getState();
58:
59: public abstract void setState(String state);
60:
61: public abstract String getZip();
62:
63: public abstract void setZip(String zip);
64:
65: // standard call back methods
66:
67: public void setEntityContext(EntityContext ec) {
68: }
69:
70: public void unsetEntityContext() {
71: }
72:
73: public void ejbLoad() {
74: }
75:
76: public void ejbStore() {
77: }
78:
79: public void ejbActivate() {
80: }
81:
82: public void ejbPassivate() {
83: }
84:
85: public void ejbRemove() throws javax.ejb.RemoveException {
86: }
87:
88: }
|