]> git.mxchange.org Git - jcustomer-lib.git/blob - src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java
... ???
[jcustomer-lib.git] / src / org / mxchange / jcustomercore / model / customer / CustomerSessionBeanRemote.java
1 /*\r
2  * Copyright (C) 2016 Roland Haeder\r
3  *\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
8  *\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
13  *\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
16  */\r
17 package org.mxchange.jcustomercore.model.customer;\r
18 \r
19 import java.io.Serializable;\r
20 import javax.ejb.Remote;\r
21 import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;\r
22 \r
23 /**\r
24  * An interface for customer beans\r
25  * <p>\r
26  * @author Roland Haeder<roland@mxchange.org>\r
27  */\r
28 @Remote\r
29 public interface CustomerSessionBeanRemote extends Serializable {\r
30 \r
31         /**\r
32          * Fills given customer instance with all available data\r
33          * <p>\r
34          * @param customer Initial Customer instance\r
35          * <p>\r
36          * @return Prepared Customer instance\r
37          */\r
38         Customer fillCustomerData (final Customer customer);\r
39 \r
40         /**\r
41          * Checks if the the given customer instance is already registered\r
42          * <p>\r
43          * @param customer Customer instance\r
44          * <p>\r
45          * @return Whether the customer is already registered\r
46          */\r
47         boolean isReqistered (final Customer customer);\r
48 \r
49         /**\r
50          * Registers the customer and creates a customer number after succesful\r
51          * persisting.\r
52          * <p>\r
53          * @param customer Initial customer instance\r
54          * <p>\r
55          * @return Prepared Customer instance\r
56          * <p>\r
57          * @throws\r
58          * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException If\r
59          * the customer is already registered.\r
60          */\r
61         Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException;\r
62 }\r