Examples of Cart


Examples of com.sun.speech.freetts.cart.CART

  private ViterbiCandidate getCandidate(Item item) {
        // TODO: This should better be called getCandidates() (plural form),
        // because what it does is find all the candidates for the item
        // and return the head of the queue.
      String unitType = item.getFeatures().getString("clunit_name");
      CART cart = clunitDB.getTree(unitType);
        // Here, the unit candidates are selected.
      int[] clist = (int[]) cart.interpret(item);
        // Now, clist is an array of instance numbers for the units of type
        // unitType that belong to the best cluster according to the CART.
       
      ViterbiCandidate p;
      ViterbiCandidate all;
View Full Code Here

Examples of net.fqsc.inscriptions.model.inscriptions.Cart

    {
      try
      {
        watch.start();

        Cart cart = new Cart(context.getPersistentModel()
            .getDomainModel());
        cart.addToCart(new CartItem(this.getRandomTarification()
            .getOid(), context.getPersistentModel()
            .getDomainModel()));

        Club club = (Club) clubCtrl.getClubs().get(
            random.nextInt(clubCtrl.getClubs().size()));
        cart.setClubOid(club.getOid().getUniqueNumber().toString());
        cart.setCommenditaire(RandomStringUtils.randomAlphabetic(10));

        if (i % 10 == 0)
        {
          for (int j = 0; j < 5; j++)
          {
            cart.addToCart(new CartItem(this
                .getRandomTarification().getOid(), context
                .getPersistentModel().getDomainModel()));
          }
        }
View Full Code Here

Examples of org.apache.beehive.samples.petstore.model.Cart

                                                       required = false)
                                 }),
                    @Jpf.Forward(name="cart", path="cart.jsp")
                })
    protected Forward addItemToCart(CartForm form) throws InvalidIdentifierException {
        Cart cart = form.getCart();
        if (cart.containsItemId(form.getWorkingItemId()))
        {
            cart.incrementQuantityByItemId(form.getWorkingItemId());
        }
        else
        {
            Item toAddItem = _catalogControl.getItem(form.getWorkingItemId());
            if (toAddItem != null)
            {
                //toAddItem.setProduct(_currentProduct);
                cart.addItem(toAddItem);
            }
            /* todo: error handling path */
        }

        return new Forward("cart", "product", _currentProduct);
View Full Code Here

Examples of org.apache.jdo.tck.pc.shoppingcart.Cart

        BatchTestRunner.run(DetachAttach.class);
    }

    /** */
    public void testAttachDirty() {
        Cart detachedCart = createDetachedInstance(ASSERTION_FAILED);
        pm.currentTransaction().begin();
        cartEntry1.setQuantity(500);
        goldenCartEntry.setQuantity(500);
        Cart attachedCart = (Cart)pm.makePersistent(detachedCart);
        checkCartValues(ASSERTION_FAILED +
                "after attach," + NL, attachedCart, true);
        pm.currentTransaction().commit();
        pm.currentTransaction().begin();
        Cart persistentCart = (Cart)pm.getObjectById(cart1oid);
        checkCartValues(ASSERTION_FAILED +
                "after attach, commit, begin, getObjectById," + NL,
                persistentCart, true);
        pm.currentTransaction().commit();
        failOnError();
View Full Code Here

Examples of org.apache.taglibs.rdc.sampleapps.musicstore.ws.Cart

    HttpSession session = request.getSession();
    MusicStoreAppBean msBean = (MusicStoreAppBean) session.
      getAttribute(MusicStoreAppBean.SESSION_KEY);
    CheckoutForm coForm = (CheckoutForm) form;
    String action = coForm.getAction();
    Cart currentCart = msBean.getCart();
   
    if (currentCart == null && !action.equals("shopping")) {
      msBean.setErrorDescription("Shopping cart is empty or " +
        "cart not found.");
      return mapping.findForward("onerror");
    }

    // Voice specified calls
    if (msBean.getChannel() == MusicStoreAppBean.VOICE_APP ||
          msBean.getChannel() == MusicStoreAppBean.VOICE_DBG ) {
         
          //cleanup session from RDCs
      session.removeAttribute("dialogMap");
     
      if (action.equals("checkout")) {
        String hostURI = getHostAsPrompt(request.getServerName());
        int port = request.getServerPort();         
        if (80 != port && 0 != port && 443 != port) {
          hostURI += " colon " + Integer.toString(port, 10) ;
        }
        String prompt = createCartLink(session, currentCart, hostURI);
        msBean.setCheckoutPrompt(prompt);
      } else if (action.equals("viewcart")) {
        StringBuffer prompt = new StringBuffer("These following titles " +
          "are in your cart. ");
        CartItem[] items = currentCart.getCartItems();
        for (int i = 0; i < items.length; i++) {
          prompt.append(items[i].getTitle()).append(", ");
        }
        request.setAttribute("promptContent", prompt.toString());
      }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Cart

        Criteria criteria = createDefaultCriteria(Cart.class);
       
        FetchPlan fetchPlan = handleSpecificFetchMode(criteria);
       
        criteria.add(Restrictions.eq("id", cartId));
        Cart cart = (Cart) criteria.uniqueResult();
        if(cart != null){
            cart.setFetchPlan(fetchPlan);
        }
        return cart;
  }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Cart

        FetchPlan fetchPlan = handleSpecificFetchMode(criteria);
       
        criteria.add(Restrictions.eq("marketAreaId", marketAreaId));
        criteria.add(Restrictions.eq("customerId", customerId));

        Cart cart = (Cart) criteria.uniqueResult();
        if(cart != null){
            cart.setFetchPlan(fetchPlan);
        }
        return cart;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Cart

    cart.setDateUpdate(new Date());
        if (cart.getId() != null) {
            if(em.contains(cart)){
                em.refresh(cart);
            }
            Cart mergedCart = em.merge(cart);
            em.flush();
            return mergedCart;
        } else {
            em.persist(cart);
            return cart;
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Cart

                    customerPaymentInformation.setCustomerMarketAreaId(marketArea.getId());
                   
                    customerService.savePaymentInformation(customer, customerPaymentInformation);
                }

                Cart cart = cartService.getCartByMarketAreaIdAndCustomerId(marketArea.getId(), customer.getId());
               
                // Create and Save a new order
                checkoutService.checkout(customer, cart);
               
                // WebManagementService.buildAndSaveNewOrderConfirmationMail
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Cart

      return displaySearch(request, model);
    }
   
    loadRecentProducts(request, requestData, model, new FetchPlan(categoryVirtualFetchPlans), new FetchPlan(productMarketingFetchPlans), new FetchPlan(productSkuFetchPlans));
       
        final Cart currentCart = requestData.getCart();
        final CartViewBean cartViewBean = frontofficeViewBeanFactory.buildViewBeanCart(requestUtil.getRequestData(request), currentCart);
        modelAndView.addObject(ModelConstants.CART_VIEW_BEAN, cartViewBean);
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.CATALOG_SEARCH.getKey());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.