From: Roland Haeder Date: Thu, 17 Sep 2015 14:08:29 +0000 (+0200) Subject: Merge branch 'master' of file:///media/quix0r/INTENSO/Java Project/jshop-ee-lib X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=09e4497392918491fce053031144e06368d7fe5c;hp=b5cfa0b2aeae5c9aa3319fbdce4a4d3d811a6f90;p=jcustomer-lib.git Merge branch 'master' of file:///media/quix0r/INTENSO/Java Project/jshop-ee-lib Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcore/model/contact/gender/GenderStatefulBeanRemote.java b/src/org/mxchange/jcore/model/contact/gender/GenderStatefulBeanRemote.java deleted file mode 100644 index a4ace43..0000000 --- a/src/org/mxchange/jcore/model/contact/gender/GenderStatefulBeanRemote.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2015 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 . - */ -package org.mxchange.jcore.model.contact.gender; - -import java.io.Serializable; -import java.util.List; -import javax.ejb.Remote; - -/** - * A remote interface for static shop data - * - * @author Roland Haeder - */ -@Remote -public interface GenderStatefulBeanRemote extends Serializable { - - /** - * Getter for all genders as array - * - * @return All genders as array - */ - public Gender[] allGenders (); - - /** - * All selectable genders. This excludes UNKNOWN - * - * @return Selectable gender for the user - */ - public List selectableGenders (); -} diff --git a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java index cc83e88..54bbf59 100644 --- a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java @@ -17,7 +17,9 @@ package org.mxchange.jshopcore.model.basket; import java.io.Serializable; +import java.util.List; import javax.ejb.Remote; +import org.mxchange.jshopcore.model.customer.Customer; /** * An interface for a basket bean @@ -26,4 +28,12 @@ import javax.ejb.Remote; */ @Remote public interface BasketSessionBeanRemote extends Serializable { + + /** + * Registers the order list of tems with the customer + * + * @param customer Customer instance + * @param itemList Ordered items list + */ + public void registerItems (final Customer customer, final List itemList); } diff --git a/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java index f07443e..0ee29d2 100644 --- a/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java @@ -18,6 +18,8 @@ package org.mxchange.jshopcore.model.customer; import java.io.Serializable; import javax.ejb.Remote; +import org.mxchange.jshopcore.exceptions.CustomerAlreadyRegisteredException; +import org.mxchange.jshopcore.exceptions.QueryNotExecutedException; /** * An interface for customer beans @@ -26,4 +28,31 @@ import javax.ejb.Remote; */ @Remote public interface CustomerSessionBeanRemote extends Serializable { + + /** + * Fills given customer instance with all available data + * + * @param customer Initial Customer instance + * @return Prepared Customer instance + */ + public Customer fillCustomerData (final Customer customer); + + /** + * Checks if the the given customer instance is already registered + * + * @param customer Customer instance + * @return Whether the customer is already registered + * @throws org.mxchange.jshopcore.exceptions.QueryNotExecutedException If the SQL query did not execute + */ + public boolean isReqistered (final Customer customer) throws QueryNotExecutedException; + + /** + * Registers the customer and creates a customer number after succesful + * persisting. + * + * @param customer Initial customer instance + * @return Prepared Customer instance + * @throws org.mxchange.jshopcore.exceptions.CustomerAlreadyRegisteredException If the customer is already registered. + */ + public Customer registerCustomer (final Customer customer) throws CustomerAlreadyRegisteredException; }