KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > entity > customer > Address


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: Address.java 822 2006-07-04 14:35:35Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.entity.customer;
26
27 import java.io.Serializable JavaDoc;
28
29 import javax.persistence.Entity;
30 import javax.persistence.Id;
31
32 /**
33  * The customer address.
34  * @author Gisele Pinheiro Souza
35  * @author Eduardo Studzinski Estima de Castro
36  *
37  */

38 @Entity
39 public class Address implements Serializable JavaDoc {
40
41     /**
42      * The serial version.
43      */

44     private static final long serialVersionUID = -2074717414531301945L;
45
46     /**
47      * The address identifier.
48      */

49     private long id;
50
51     /**
52      * The street name.
53      */

54     private String JavaDoc street;
55
56     /**
57      * The country name.
58      */

59     private String JavaDoc country;
60
61     /**
62      * The house number.
63      */

64     private int number;
65
66     /**
67      * Creates a new instance od Address.
68      * @param id the identifier.
69      * @param street the street.
70      * @param country the country name.
71      * @param number the house number.
72      */

73     public Address(final long id, final String JavaDoc street, final String JavaDoc country, final int number) {
74         this.id = id;
75         this.street = street;
76         this.country = country;
77         this.number = number;
78     }
79
80     /**
81      * Creates a new instance of address.
82      */

83     public Address() {
84
85     }
86
87     /**
88      * Gets the country name.
89      * @return the country name.
90      */

91     public String JavaDoc getCountry() {
92         return country;
93     }
94
95     /**
96      * Sets the country name.
97      * @param country the country name.
98      */

99     public void setCountry(final String JavaDoc country) {
100         this.country = country;
101     }
102
103     /**
104      * Sets the address identifier.
105      * @return the identifier.
106      */

107     @Id
108     public long getId() {
109         return id;
110     }
111
112     /**
113      * Sets the address identifier.
114      * @param id the identifier.
115      */

116     public void setId(final long id) {
117         this.id = id;
118     }
119
120     /**
121      * Gets the house number.
122      * @return the number.
123      */

124     public int getNumber() {
125         return number;
126     }
127
128     /**
129      * Sets the house number.
130      * @param number the house number.
131      */

132     public void setNumber(final int number) {
133         this.number = number;
134     }
135
136     /**
137      * Gets the street name.
138      * @return the street name.
139      */

140     public String JavaDoc getStreet() {
141         return street;
142     }
143
144     /**
145      * Sets the street name.
146      * @param street the street name.
147      */

148     public void setStreet(final String JavaDoc street) {
149         this.street = street;
150     }
151
152 }
153
Popular Tags