]> git.mxchange.org Git - jcustomer-lib.git/blobdiff - src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java
added business method allCustomers() as this is generic
[jcustomer-lib.git] / src / org / mxchange / jcustomercore / model / customer / CustomerSessionBeanRemote.java
index 9188a56518596f2f7e231a64b49be277c21540da..09e02dcb984d5bd2b9d4bc00ca2f3cacd25ff115 100644 (file)
@@ -1,62 +1,72 @@
-/*\r
- * Copyright (C) 2016 Roland Haeder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.jcustomercore.model.customer;\r
-\r
-import java.io.Serializable;\r
-import javax.ejb.Remote;\r
-import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;\r
-\r
-/**\r
- * An interface for customer beans\r
- * <p>\r
- * @author Roland Haeder<roland@mxchange.org>\r
- */\r
-@Remote\r
-public interface CustomerSessionBeanRemote extends Serializable {\r
-\r
-       /**\r
-        * Fills given customer instance with all available data\r
-        * <p>\r
-        * @param customer Initial Customer instance\r
-        * <p>\r
-        * @return Prepared Customer instance\r
-        */\r
-       Customer fillCustomerData (final Customer customer);\r
-\r
-       /**\r
-        * Checks if the the given customer instance is already registered\r
-        * <p>\r
-        * @param customer Customer instance\r
-        * <p>\r
-        * @return Whether the customer is already registered\r
-        */\r
-       boolean isReqistered (final Customer customer);\r
-\r
-       /**\r
-        * Registers the customer and creates a customer number after succesful\r
-        * persisting.\r
-        * <p>\r
-        * @param customer Initial customer instance\r
-        * <p>\r
-        * @return Prepared Customer instance\r
-        * <p>\r
-        * @throws\r
-        * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException If\r
-        * the customer is already registered.\r
-        */\r
-       Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException;\r
-}\r
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcustomercore.model.customer;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;
+
+/**
+ * An interface for customer beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Remote
+public interface CustomerSessionBeanRemote extends Serializable {
+
+       /**
+        * Fills given customer instance with all available data
+        * <p>
+        * @param customer Initial Customer instance
+        * <p>
+        * @return Prepared Customer instance
+        */
+       Customer fillCustomerData (final Customer customer);
+
+       /**
+        * Checks if the the given customer instance is already registered
+        * <p>
+        * @param customer Customer instance
+        * <p>
+        * @return Whether the customer is already registered
+        */
+       boolean isReqistered (final Customer customer);
+
+       /**
+        * Registers the customer and creates a customer number after succesful
+        * persisting.
+        * <p>
+        * @param customer Initial customer instance
+        * <p>
+        * @return Prepared Customer instance
+        * <p>
+        * @throws
+        * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException
+        * If the customer is already registered.
+        */
+       Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException;
+
+       /**
+        * Returns a list of all customers. This method should be used from
+        * administrative beans.
+        * <p>
+        * @return A list of all customers
+        */
+       List<Customer> allCustomers ();
+
+}