001//@formatter:off
002/*
003 * Account - supplementary class
004 * Code-Beispiel zum Buch Patterns Kompakt, Verlag Springer Vieweg
005 * Copyright 2014 Karl Eilebrecht
006 * 
007 * Licensed under the Apache License, Version 2.0 (the "License"):
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 *
011 * http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019//@formatter:on
020package de.calamanari.pk.servicestub;
021
022/**
023 * Account - supplementary class
024 * 
025 * @author <a href="mailto:Karl.Eilebrecht(a/t)calamanari.de">Karl Eilebrecht</a>
026 */
027public class Account {
028
029    /**
030     * id of account
031     */
032    private String accountId = null;
033
034    /**
035     * first name
036     */
037    private String firstName = null;
038
039    /**
040     * last name
041     */
042    private String lastName = null;
043
044    /**
045     * Street
046     */
047    private String street = null;
048
049    /**
050     * zipCode
051     */
052    private String zipCode = null;
053
054    /**
055     * city
056     */
057    private String city = null;
058
059    /**
060     * Creates new address with the given attributes
061     * 
062     * @param accountId identifier
063     * @param firstName person's first name
064     * @param lastName person's last name
065     * @param street address field
066     * @param zipCode address field
067     * @param city address field
068     */
069    public Account(String accountId, String firstName, String lastName, String street, String zipCode, String city) {
070        this.accountId = accountId;
071        this.firstName = firstName;
072        this.lastName = lastName;
073        this.street = street;
074        this.zipCode = zipCode;
075        this.city = city;
076    }
077
078    /**
079     * Returns the account id
080     * 
081     * @return account id
082     */
083    public String getAccountId() {
084        return accountId;
085    }
086
087    /**
088     * Returns the first name
089     * 
090     * @return first name
091     */
092    public String getFirstName() {
093        return firstName;
094    }
095
096    /**
097     * Sets the first name
098     * 
099     * @param firstName person's first name
100     */
101    public void setFirstName(String firstName) {
102        this.firstName = firstName;
103    }
104
105    /**
106     * Returns the last name
107     * 
108     * @return last name
109     */
110    public String getLastName() {
111        return lastName;
112    }
113
114    /**
115     * Sets the last name
116     * 
117     * @param lastName person's last name
118     */
119    public void setLastName(String lastName) {
120        this.lastName = lastName;
121    }
122
123    /**
124     * Returns the street
125     * 
126     * @return street
127     */
128    public String getStreet() {
129        return street;
130    }
131
132    /**
133     * Sets the street
134     * 
135     * @param street address field
136     */
137    public void setStreet(String street) {
138        this.street = street;
139    }
140
141    /**
142     * Returns the zip code
143     * 
144     * @return zip code
145     */
146    public String getZipCode() {
147        return zipCode;
148    }
149
150    /**
151     * Sets the zip code
152     * 
153     * @param zipCode address field
154     */
155    public void setZipCode(String zipCode) {
156        this.zipCode = zipCode;
157    }
158
159    /**
160     * Returns the city
161     * 
162     * @return city
163     */
164    public String getCity() {
165        return city;
166    }
167
168    /**
169     * Sets the city
170     * 
171     * @param city address field
172     */
173    public void setCity(String city) {
174        this.city = city;
175    }
176
177    @Override
178    public String toString() {
179        return this.getClass().getSimpleName() + "({accountId='" + accountId + "', firstName='" + firstName + "', lastName='" + lastName + "', street='"
180                + street + "', zipCode='" + zipCode + "', city='" + city + "'})";
181    }
182
183}