001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
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.1 of the License, or 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
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: Address.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.tests.common.ejbs.entity.customer;
025:
026: import java.io.Serializable;
027:
028: import javax.persistence.Entity;
029: import javax.persistence.Id;
030:
031: /**
032: * The customer address.
033: * @author Gisele Pinheiro Souza
034: * @author Eduardo Studzinski Estima de Castro
035: *
036: */
037: @Entity
038: public class Address implements Serializable {
039:
040: /**
041: * The serial version.
042: */
043: private static final long serialVersionUID = -2074717414531301945L;
044:
045: /**
046: * The address identifier.
047: */
048: private long id;
049:
050: /**
051: * The street name.
052: */
053: private String street;
054:
055: /**
056: * The country name.
057: */
058: private String country;
059:
060: /**
061: * The house number.
062: */
063: private int number;
064:
065: /**
066: * Creates a new instance od Address.
067: * @param id the identifier.
068: * @param street the street.
069: * @param country the country name.
070: * @param number the house number.
071: */
072: public Address(final long id, final String street,
073: final String country, final int number) {
074: this .id = id;
075: this .street = street;
076: this .country = country;
077: this .number = number;
078: }
079:
080: /**
081: * Creates a new instance of address.
082: */
083: public Address() {
084:
085: }
086:
087: /**
088: * Gets the country name.
089: * @return the country name.
090: */
091: public String getCountry() {
092: return country;
093: }
094:
095: /**
096: * Sets the country name.
097: * @param country the country name.
098: */
099: public void setCountry(final String 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 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 street) {
149: this.street = street;
150: }
151:
152: }
|