001: /*
002: * Speedo: an implementation of JDO compliant personality on top of JORM generic
003: * I/O sub-system.
004: * Copyright (C) 2001-2004 France Telecom R&D
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2 of the License, or (at your option) any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * Release: 1.0
021: *
022: * Created on 27 feb. 2004
023: * @author fmillevi@yahoo.com
024: *
025: */
026: package org.objectweb.speedo.j2eedo.database;
027:
028: /**
029: * This class define the Java class to access to the employee's address entities
030: *
031: * @author fmillevi@yahoo.com
032: */
033: public class Address implements DatabaseObjectInterface {
034: private String street;
035:
036: private String city;
037:
038: private String state;
039:
040: private String zipcode;
041:
042: public String getAsString() {
043: StringBuffer sb = new StringBuffer();
044: sb.append(street).append(" ");
045: sb.append(zipcode).append(" ");
046: sb.append(city).append(" ");
047: sb.append(state);
048: return sb.toString();
049: }
050:
051: /**
052: * @see org.objectweb.speedo.j2eedo.database.DatabaseObjectInterface#getId()
053: */
054: public long getId() {
055: return -1;
056: }
057:
058: /**
059: * @return Returns the city.
060: */
061: public String getCity() {
062: return city;
063: }
064:
065: /**
066: * @param city
067: * The city to set.
068: */
069: public void setCity(String city) {
070: this .city = city;
071: }
072:
073: /**
074: * @return Returns the state.
075: */
076: public String getState() {
077: return state;
078: }
079:
080: /**
081: * @param state
082: * The state to set.
083: */
084: public void setState(String state) {
085: this .state = state;
086: }
087:
088: /**
089: * @return Returns the street.
090: */
091: public String getStreet() {
092: return street;
093: }
094:
095: /**
096: * @param street
097: * The street to set.
098: */
099: public void setStreet(String street) {
100: this .street = street;
101: }
102:
103: /**
104: * @return Returns the zipcode.
105: */
106: public String getZipcode() {
107: return zipcode;
108: }
109:
110: /**
111: * @param zipcode
112: * The zipcode to set.
113: */
114: public void setZipcode(String zipcode) {
115: this.zipcode = zipcode;
116: }
117:
118: }
|