]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
initial implementation, not much
authorRoland Häder <roland@mxchange.org>
Wed, 19 Apr 2017 17:23:21 +0000 (19:23 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 19 Apr 2017 17:23:21 +0000 (19:23 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/pizzaapplication/model/basket/BasketSessionBean.java

index 16b5ded5fa44c26db8267cb0bccf8f7c753338f2..9fc9eb8dec9f46b0126f92c9cdf56e4d32cf33f2 100644 (file)
@@ -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<AddableBasketItem> getCurrentBasket () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace("getCurrentBasket: CALLED!!"); //NOI18N
+
+               // @TODO For now this method returns only an empty basked until they are persitable
+               Basket<AddableBasketItem> 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<AddableBasketItem> orderedItems) {
                // Trace message