001//@formatter:off
002/*
003 * Customer - interface for customer representations
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.datatransferobject;
021
022import java.io.IOException;
023
024/**
025 * Customer - interface for customer representations, introduced in this example to allow transparently handling different representations (DATA TRANSFER OBJECT
026 * vs. entity remote interface) by the client - for demonstration purposes only.
027 * 
028 * @author <a href="mailto:Karl.Eilebrecht(a/t)calamanari.de">Karl Eilebrecht</a>
029 */
030public interface Customer {
031
032    /**
033     * Returns id of customer
034     * 
035     * @return customerId
036     * @throws IOException on data access error
037     */
038    public String getCustomerId() throws IOException;
039
040    /**
041     * Sets the id of customer
042     * 
043     * @param customerId identifier
044     * @throws IOException on data access error
045     */
046    public void setCustomerId(String customerId) throws IOException;
047
048    /**
049     * Returns the customer's last name
050     * 
051     * @return last name of customer
052     * @throws IOException on data access error
053     */
054    public String getLastName() throws IOException;
055
056    /**
057     * Sets the last name of customer
058     * 
059     * @param lastName person's last name
060     * @throws IOException on data access error
061     */
062    public void setLastName(String lastName) throws IOException;
063
064    /**
065     * Returns the first name of the customer
066     * 
067     * @return firstName
068     * @throws IOException on data access error
069     */
070    public String getFirstName() throws IOException;
071
072    /**
073     * Sets the first name of the customer
074     * 
075     * @param firstName person's first name
076     * @throws IOException on data access error
077     */
078    public void setFirstName(String firstName) throws IOException;
079
080    /**
081     * Returns the street address of customer
082     * 
083     * @return street
084     * @throws IOException on data access error
085     */
086    public String getStreet() throws IOException;
087
088    /**
089     * Sets the street of the customer
090     * 
091     * @param street address field
092     * @throws IOException on data access error
093     */
094    public void setStreet(String street) throws IOException;
095
096    /**
097     * Returns the zip-code of the customer
098     * 
099     * @return zipCode address field
100     * @throws IOException on data access error
101     */
102    public String getZipCode() throws IOException;
103
104    /**
105     * Sets the zip-code of the customer
106     * 
107     * @param zipCode address field
108     * @throws IOException on data access error
109     */
110    public void setZipCode(String zipCode) throws IOException;
111
112    /**
113     * Returns the city of the customer
114     * 
115     * @return city address field
116     * @throws IOException on data access error
117     */
118    public String getCity() throws IOException;
119
120    /**
121     * Sets the city of the customer
122     * 
123     * @param city address field
124     * @throws IOException on data access error
125     */
126    public void setCity(String city) throws IOException;
127
128}