KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > titan > address > AddressBean


1 package com.titan.address;
2
3 import java.util.Collection;
4 import java.util.Set;
5
6 import javax.ejb.EntityContext;
7 import javax.ejb.FinderException;
8
9 import com.titan.customer.CustomerLocal;
10
11 public abstract class AddressBean implements javax.ejb.EntityBean {
12
13     public Integer ejbCreateAddress(String street, String city, String state, String zip)
14         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, String state, String zip) {
23
24     }
25
26     // select methods
27
public abstract Set ejbSelectZipCodes(String state) throws FinderException;
28
29     public abstract Collection ejbSelectAll() throws FinderException;
30
31     public abstract CustomerLocal ejbSelectCustomer(AddressLocal addr) throws FinderException;
32
33     // Public Home method required to test the private ejbSelectZipCodes method
34
public Collection ejbHomeSelectZipCodes(String state) throws FinderException {
35         return this.ejbSelectZipCodes(state);
36     }
37
38     // Public Home method required to test the private ejbSelectCustomer method
39
public CustomerLocal ejbHomeSelectCustomer(AddressLocal addr) throws FinderException {
40         return (CustomerLocal) (this.ejbSelectCustomer(addr));
41     }
42
43     // persistent fields
44
public abstract String getStreet();
45
46     public abstract void setStreet(String street);
47
48     public abstract String getCity();
49
50     public abstract void setCity(String city);
51
52     public abstract String getState();
53
54     public abstract void setState(String state);
55
56     public abstract String getZip();
57
58     public abstract void setZip(String zip);
59
60     // standard call back methods
61

62     public void setEntityContext(EntityContext ec) {
63     }
64
65     public void unsetEntityContext() {
66     }
67
68     public void ejbLoad() {
69     }
70
71     public void ejbStore() {
72     }
73
74     public void ejbActivate() {
75     }
76
77     public void ejbPassivate() {
78     }
79
80     public void ejbRemove() throws javax.ejb.RemoveException {
81     }
82
83 }
84
Popular Tags