2 * Copyright (C) 2016 Roland Haeder
\r
4 * This program is free software: you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation, either version 3 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License
\r
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
17 package org.mxchange.jcustomercore.model.customer;
\r
19 import java.io.Serializable;
\r
20 import javax.ejb.Remote;
\r
21 import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;
\r
24 * An interface for customer beans
\r
26 * @author Roland Haeder<roland@mxchange.org>
\r
29 public interface CustomerSessionBeanRemote extends Serializable {
\r
32 * Fills given customer instance with all available data
\r
34 * @param customer Initial Customer instance
\r
36 * @return Prepared Customer instance
\r
38 Customer fillCustomerData (final Customer customer);
\r
41 * Checks if the the given customer instance is already registered
\r
43 * @param customer Customer instance
\r
45 * @return Whether the customer is already registered
\r
47 boolean isReqistered (final Customer customer);
\r
50 * Registers the customer and creates a customer number after succesful
\r
53 * @param customer Initial customer instance
\r
55 * @return Prepared Customer instance
\r
58 * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException If
\r
59 * the customer is already registered.
\r
61 Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException;
\r