KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > entity > entitytest04 > 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 975 2006-07-28 11:14:14Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest04;
26
27 import java.io.Serializable JavaDoc;
28
29 import javax.persistence.Entity;
30 import javax.persistence.Id;
31
32 /**
33  * Contains the address reference.
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 = -4633350356479296752L;
45
46     /**
47      * Address identifier.
48      */

49     private Long JavaDoc id;
50
51     /**
52      * Street name.
53      */

54     private String JavaDoc street;
55
56     /**
57      * Home number.
58      */

59     private int number;
60
61     /**
62      * Country name.
63      */

64     private String JavaDoc country;
65
66     /**
67      * Gets the country name.
68      * @return the coutnry name.
69      */

70     public String JavaDoc getCountry() {
71         return country;
72     }
73
74     /**
75      * Sets the country name.
76      * @param country the country name.
77      */

78     public void setCountry(final String JavaDoc country) {
79         this.country = country;
80     }
81
82     /**
83      * Gets the address identifier.
84      * @return the identifier.
85      */

86     @Id
87     public Long JavaDoc getId() {
88         return id;
89     }
90
91     /**
92      * Sets the address identifier.
93      * @param id the identifier.
94      */

95     public void setId(final Long JavaDoc id) {
96         this.id = id;
97     }
98
99     /**
100      * Gets the house number.
101      * @return the number.
102      */

103     public int getNumber() {
104         return number;
105     }
106
107     /**
108      * Sets the house number.
109      * @param number the new number.
110      */

111     public void setNumber(final int number) {
112         this.number = number;
113     }
114
115     /**
116      * Gets the street name.
117      * @return the street name.
118      */

119     public String JavaDoc getStreet() {
120         return street;
121     }
122
123     /**
124      * Sets the street name.
125      * @param street the street name.
126      */

127     public void setStreet(final String JavaDoc street) {
128         this.street = street;
129     }
130 }
131
Popular Tags