01: package persist.gettingStarted;
02:
03: import com.sleepycat.persist.model.Entity;
04: import com.sleepycat.persist.model.PrimaryKey;
05:
06: @Entity
07: public class Vendor {
08:
09: private String repName;
10: private String address;
11: private String city;
12: private String state;
13: private String zipcode;
14: private String bizPhoneNumber;
15: private String repPhoneNumber;
16:
17: // Primary key is the vendor's name
18: // This assumes that the vendor's name is
19: // unique in the database.
20: @PrimaryKey
21: private String vendor;
22:
23: public void setRepName(String data) {
24: repName = data;
25: }
26:
27: public void setAddress(String data) {
28: address = data;
29: }
30:
31: public void setCity(String data) {
32: city = data;
33: }
34:
35: public void setState(String data) {
36: state = data;
37: }
38:
39: public void setZipcode(String data) {
40: zipcode = data;
41: }
42:
43: public void setBusinessPhoneNumber(String data) {
44: bizPhoneNumber = data;
45: }
46:
47: public void setRepPhoneNumber(String data) {
48: repPhoneNumber = data;
49: }
50:
51: public void setVendorName(String data) {
52: vendor = data;
53: }
54:
55: public String getRepName() {
56: return repName;
57: }
58:
59: public String getAddress() {
60: return address;
61: }
62:
63: public String getCity() {
64: return city;
65: }
66:
67: public String getState() {
68: return state;
69: }
70:
71: public String getZipcode() {
72: return zipcode;
73: }
74:
75: public String getBusinessPhoneNumber() {
76: return bizPhoneNumber;
77: }
78:
79: public String getRepPhoneNumber() {
80: return repPhoneNumber;
81: }
82:
83: public String getVendorName() {
84: return vendor;
85: }
86:
87: }
|