From: Roland Häder Date: Wed, 19 Apr 2017 17:23:21 +0000 (+0200) Subject: initial implementation, not much X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=67c2feef7dfcb90cdb1305937b8d87e10df1c586;p=pizzaservice-ejb.git initial implementation, not much Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/model/basket/BasketSessionBean.java b/src/java/org/mxchange/pizzaapplication/model/basket/BasketSessionBean.java index 16b5ded..9fc9eb8 100644 --- a/src/java/org/mxchange/pizzaapplication/model/basket/BasketSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/model/basket/BasketSessionBean.java @@ -24,7 +24,9 @@ import javax.persistence.EntityExistsException; import org.mxchange.jcoreee.database.BaseDatabaseBean; import org.mxchange.jcustomercore.model.customer.Customer; import org.mxchange.jshopcore.model.basket.AddableBasketItem; +import org.mxchange.jshopcore.model.basket.Basket; import org.mxchange.jshopcore.model.basket.BasketSessionBeanRemote; +import org.mxchange.jshopcore.model.basket.ShopBasket; import org.mxchange.jshopcore.model.customer.CustomerUtils; import org.mxchange.jshopcore.model.order.Orderable; import org.mxchange.jshopcore.model.order.ShopOrder; @@ -53,6 +55,21 @@ public class BasketSessionBean extends BaseDatabaseBean implements BasketSession // @TODO Nothing done so far } + @Override + public Basket getCurrentBasket () { + // Trace message + this.getLoggerBeanLocal().logTrace("getCurrentBasket: CALLED!!"); //NOI18N + + // @TODO For now this method returns only an empty basked until they are persitable + Basket basket = new ShopBasket(); + + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("getCurrentBasket: basket.size()={0} EXIT!!", basket.size())); //NOI18N + + // Return it + return basket; + } + @Override public String registerItems (final Customer customer, final List orderedItems) { // Trace message