From: Roland Haeder Date: Wed, 16 Sep 2015 08:20:54 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ec97411cf7e30f060718e37632deaa03437caee;p=jproduct-lib.git Continued: - added new methods for handling customer registration - updated jars Signed-off-by:Roland Häder --- diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar index ffdfed6..eda325a 100644 Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ diff --git a/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java b/src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java index cc83e88..2eb7d1f 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 aregisterItems (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..633bbf0 100644 --- a/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java +++ b/src/org/mxchange/jshopcore/model/customer/CustomerSessionBeanRemote.java @@ -26,4 +26,27 @@ import javax.ejb.Remote; */ @Remote public interface CustomerSessionBeanRemote extends Serializable { + + /** + * Fills given customer instance with all available data + * + * @param customer Customer instance + */ + public void 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 + */ + public boolean isReqistered (final Customer customer); + + /** + * Registers the customer and creates a customer number after succesful + * persisting. + * + * @param customer Customer instance + */ + public void registerCustomer (final Customer customer); }