Package com.emc.plants.persistence

Examples of com.emc.plants.persistence.Inventory


   * @param cost The inventory item's new cost.
   */
  @Transactional
  public void setItemCost(String inventoryID, float cost)
  {
    Inventory inv = getInvUpdate(inventoryID);
    if (inv != null)
    {
      inv.setCost(cost);
    }
  }
View Full Code Here


   * @param quantity The inventory item's new quantity.
   */
  @Transactional
  public void setItemQuantity(String inventoryID, int quantity)
  {
    Inventory inv = getInvUpdate(inventoryID);
    if (inv != null)
    {
      inv.setQuantity(quantity);
    }
  }
View Full Code Here

   * @param notes The inventory item's new notes.
   */
  @Transactional
  public void setItemNotes(String inventoryID, String notes)
  {
    Inventory inv = getInvUpdate(inventoryID);
    if (inv != null)
    {
      inv.setNotes(notes);
    }
  }
View Full Code Here

   * @param isPublic True, if this item can be viewed by the public.
   */
  @Transactional
  public void setItemPrivacy(String inventoryID, boolean isPublic)
  {
    Inventory inv = getInvUpdate(inventoryID);
    if (inv != null)
    {
      inv.setPrivacy(isPublic);
    }
  }
View Full Code Here

   * @param inventoryID The id of the inventory item wanted.
   * @return Reference to the remote Inventory object.
   */
  private Inventory getInvUpdate(String inventoryID)
  {
    Inventory inv = null;
    /*
     InventoryHome invHome = (InventoryHome) Util.getEJBLocalHome("java:comp/env/ejb/Inventory",
     com.ibm.websphere.samples.pbwjpa.InventoryHome.class);
     inv = invHome.findByPrimaryKeyUpdate(inventoryID);
     */
 
View Full Code Here

      if (shoppingCart != null)
      {
        String invID = req.getParameter("itemID");

        // Gets detached instance
        Inventory inv = catalog.getItemInventory(invID);
        ShoppingCartItem si = new ShoppingCartItem(inv);
        si.setQuantity(Integer.parseInt(req.getParameter("qty").trim()));
        shoppingCart.addItem(si);
        session.setAttribute(Util.ATTR_CART, shoppingCart);
        session.setAttribute(Util.ATTR_CART_CONTENTS, shoppingCart.getCartContents());
View Full Code Here

      if (shoppingCart != null)
      {
        String invID = req.getParameter("itemID");

        // Gets detached instance
        Inventory inv = catalog.getItemInventory(invID);
        ShoppingCartItem si = new ShoppingCartItem(inv);
        si.setQuantity(Integer.parseInt(req.getParameter("qty").trim()));
        shoppingCart.addItem(si);
        session.setAttribute(Util.ATTR_CART, shoppingCart);
        session.setAttribute(Util.ATTR_CART_CONTENTS, shoppingCart.getCartContents());
View Full Code Here

                while (i.hasNext()) {
                    BackOrderItem backOrderItem = (BackOrderItem) i.next();
                    long backOrderID = backOrderItem.getBackOrderID();
                    String inventoryID = backOrderItem.getInventory().getInventoryId();
                    // Get the inventory quantity and name for the back order item information.
                    Inventory item = catalog.getItemInventory(inventoryID);
                    int quantity = item.getQuantity();
                    backOrderItem.setInventoryQuantity(quantity);
                    String name = item.getName();
                    // catalog.remove();
                    backOrderItem.setName(name);
                    // Don't include backorders that have been completed.
                    if (!(backOrderItem.getStatus().equals(Util.STATUS_ADDEDSTOCK))) {
                        String invID = backOrderItem.getInventory().getInventoryId();
View Full Code Here

TOP

Related Classes of com.emc.plants.persistence.Inventory

Copyright © 2018 www.massapicom. 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.