KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > relationships > bean > Address


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.relationships.bean;
8
9 import javax.persistence.Entity;
10 import javax.persistence.GeneratorType;
11 import javax.persistence.Id;
12 import javax.persistence.GeneratorType;
13
14 /**
15  * Comment
16  *
17  * @author <a HREF="mailto:bill@jboss.org">Bill Burke</a>
18  * @version $Revision: 1.3.2.3 $
19  */

20 @Entity
21 public class Address implements java.io.Serializable JavaDoc
22 {
23    private Long JavaDoc id;
24    private String JavaDoc street;
25    private String JavaDoc city;
26    private String JavaDoc state;
27    private String JavaDoc zip;
28
29    @Id(generate = GeneratorType.IDENTITY)
30    public Long JavaDoc getId()
31    {
32       return id;
33    }
34
35    public void setId(Long JavaDoc id)
36    {
37       this.id = id;
38    }
39
40    public String JavaDoc getStreet()
41    {
42       return street;
43    }
44
45    public void setStreet(String JavaDoc street)
46    {
47       this.street = street;
48    }
49
50    public String JavaDoc getCity()
51    {
52       return city;
53    }
54
55    public void setCity(String JavaDoc city)
56    {
57       this.city = city;
58    }
59
60    public String JavaDoc getState()
61    {
62       return state;
63    }
64
65    public void setState(String JavaDoc state)
66    {
67       this.state = state;
68    }
69
70    public String JavaDoc getZip()
71    {
72       return zip;
73    }
74
75    public void setZip(String JavaDoc zip)
76    {
77       this.zip = zip;
78    }
79
80 }
81
Popular Tags