KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > merge > bean > Customer


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.tutorial.merge.bean;
8
9 import javax.persistence.Column;
10 import javax.persistence.Entity;
11 import javax.persistence.GeneratorType;
12 import javax.persistence.Id;
13 import javax.persistence.Table;
14 import javax.persistence.Table;
15 import javax.persistence.Column;
16 import javax.persistence.Id;
17
18 @Entity
19 @Table(name = "CUSTOMER")
20 public class Customer implements java.io.Serializable JavaDoc
21 {
22    private int id;
23    private String JavaDoc first;
24    private String JavaDoc last;
25    private String JavaDoc street;
26    private String JavaDoc city;
27    private String JavaDoc state;
28    private String JavaDoc zip;
29
30    public Customer()
31    {
32    }
33
34    public Customer(String JavaDoc first, String JavaDoc last, String JavaDoc street, String JavaDoc city, String JavaDoc state, String JavaDoc zip)
35    {
36       this.first = first;
37       this.last = last;
38       this.street = street;
39       this.city = city;
40       this.state = state;
41       this.zip = zip;
42    }
43
44    @Id(generate = GeneratorType.AUTO)
45    public int getId()
46    {
47       return id;
48    }
49
50    public void setId(int id)
51    {
52       this.id = id;
53    }
54
55    @Column(name = "FIRST")
56    public String JavaDoc getFirst()
57    {
58       return first;
59    }
60
61    public void setFirst(String JavaDoc first)
62    {
63       this.first = first;
64    }
65
66    @Column(name = "LAST")
67    public String JavaDoc getLast()
68    {
69       return last;
70    }
71
72    public void setLast(String JavaDoc last)
73    {
74       this.last = last;
75    }
76
77    @Column(name = "STREET")
78    public String JavaDoc getStreet()
79    {
80       return street;
81    }
82
83    public void setStreet(String JavaDoc street)
84    {
85       this.street = street;
86    }
87
88    @Column(name = "CITY")
89    public String JavaDoc getCity()
90    {
91       return city;
92    }
93
94    public void setCity(String JavaDoc city)
95    {
96       this.city = city;
97    }
98
99    @Column(name = "STATE")
100    public String JavaDoc getState()
101    {
102       return state;
103    }
104
105    public void setState(String JavaDoc state)
106    {
107       this.state = state;
108    }
109
110    @Column(name = "ZIP")
111    public String JavaDoc getZip()
112    {
113       return zip;
114    }
115
116    public void setZip(String JavaDoc zip)
117    {
118       this.zip = zip;
119    }
120 }
121
Popular Tags