KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > speedo > j2eedo > database > Address


1 /*
2  * Speedo: an implementation of JDO compliant personality on top of JORM generic
3  * I/O sub-system.
4  * Copyright (C) 2001-2004 France Telecom R&D
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 of the License, or (at your option) 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 USA
19  *
20  * Release: 1.0
21  *
22  * Created on 27 f�vr. 2004
23  * @author fmillevi@yahoo.com
24  *
25  */

26 package org.objectweb.speedo.j2eedo.database;
27
28 /**
29  * This class define the Java class to access to the employee's address entities
30  *
31  * @author fmillevi@yahoo.com
32  */

33 public class Address implements DatabaseObjectInterface {
34     private String JavaDoc street;
35
36     private String JavaDoc city;
37
38     private String JavaDoc state;
39
40     private String JavaDoc zipcode;
41
42     public String JavaDoc getAsString() {
43         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
44         sb.append(street).append(" ");
45         sb.append(zipcode).append(" ");
46         sb.append(city).append(" ");
47         sb.append(state);
48         return sb.toString();
49     }
50
51     /**
52      * @see org.objectweb.speedo.j2eedo.database.DatabaseObjectInterface#getId()
53      */

54     public long getId() {
55         return -1;
56     }
57
58     /**
59      * @return Returns the city.
60      */

61     public String JavaDoc getCity() {
62         return city;
63     }
64
65     /**
66      * @param city
67      * The city to set.
68      */

69     public void setCity(String JavaDoc city) {
70         this.city = city;
71     }
72
73     /**
74      * @return Returns the state.
75      */

76     public String JavaDoc getState() {
77         return state;
78     }
79
80     /**
81      * @param state
82      * The state to set.
83      */

84     public void setState(String JavaDoc state) {
85         this.state = state;
86     }
87
88     /**
89      * @return Returns the street.
90      */

91     public String JavaDoc getStreet() {
92         return street;
93     }
94
95     /**
96      * @param street
97      * The street to set.
98      */

99     public void setStreet(String JavaDoc street) {
100         this.street = street;
101     }
102
103     /**
104      * @return Returns the zipcode.
105      */

106     public String JavaDoc getZipcode() {
107         return zipcode;
108     }
109
110     /**
111      * @param zipcode
112      * The zipcode to set.
113      */

114     public void setZipcode(String JavaDoc zipcode) {
115         this.zipcode = zipcode;
116     }
117
118 }
Popular Tags