Examples of Inventory


Examples of com.aqpproject.worldmodel.data.Inventory

        Singleton.getVisualisation().createTextActorPerso(m_textActorName, m_playerName, 64, m_position.x - 32, m_position.y + 64, "ar15whi", false);

//        Singleton.getVisualisation().createLineActor(m_lineActorName, 500,500,1000,1000, false);

        try {
            m_inventory = new Inventory(1, "config/items.xml", m_state, this);
        } catch (ParserConfigurationException | SAXException | IOException ex) {
            Logger.getLogger(RaceGameState.class.getName()).log(Level.SEVERE, null, ex);
        }

        //Sparkles
View Full Code Here

Examples of com.arjuna.ats.arjuna.gandiva.inventory.Inventory

     * Create a new NameService using the specific implementation.
     */

public NameService (ClassName nameServiceImpleName)
    {
  Inventory invent = Inventory.inventory();

  if (invent != null)
  {
      Object ptr = invent.createVoid(nameServiceImpleName);
     
      if (ptr instanceof NameServiceImple)
    _imple = (NameServiceImple) ptr;
      else
    _imple = null;
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

  }

  @Test
  public void testGetItemInventory() {
    String inventoryID = "F0003";
    Inventory inventory = catalog.getItemInventory(inventoryID);
    assertEquals("Result", "Black-eyed Susan", inventory.getName());
  }
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

        Util.debug("BackOrderStockBean.createBackOrder() - Creating BackOrder for InventoryID: " + inventoryID);
        // Order enough stock from the supplier to reach the maximum threshold and to
        // satisfy the back order.
        amountToOrder = maximumItems + amountToOrder;
        // backOrder = getBackOrderLocalHome().create(inventoryID, amountToOrder);
        Inventory inv = em.find(Inventory.class, inventoryID);
        BackOrder b = new BackOrder(inv, amountToOrder);
        em.persist(b);
      }
    }
    catch (Exception e)
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

                Util.debug(fields[7]);
                Util.debug(fields[8]);
                Util.debug(fields[9]);
                Util.debug(fields[10]);
                Util.debug(fields[11]);
                Inventory storeItem = new Inventory(id, name, heading, descr, pkginfo, image, price, cost, quantity, category, notes, isPublic);
                catalog.addItem(storeItem);
                addImage(id, image, catalog);
            }
            Util.debug("INVENTORY table populated with text...");
            // catalog.remove();
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

                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

Examples of com.emc.plants.persistence.Inventory

   * @param id of inventory item.
   * @return an inventory bean.
   */
  private Inventory getInventoryItem(String inventoryID)
  {
    Inventory inv = null;
    /*      // Get the Inventory home.
     InventoryHome inventoryHome = (InventoryHome) Util.getEJBLocalHome("java:comp/env/ejb/Inventory", InventoryHome.class);
     try
     {
     inv = inventoryHome.findByPrimaryKeyUpdate(inventoryID);
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

    logger.debug("setCartContents() started execution .. ");
    items = new ArrayList<ShoppingCartItem>();
    int qty;
    String inventoryID;
    ShoppingCartItem si;
    Inventory inv;
    for (int i = 0; i < cartContents.size(); i++)
    {
      inventoryID = cartContents.getInventoryID(i);
      qty = cartContents.getQuantity(inventoryID);
      // Get the Inventory home.
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

   * @param si - Store item
   */
  public void checkInventory(ShoppingCartItem si)
  {
    Util.debug("ShoppingCart.checkInventory() - checking Inventory quantity of item: " + si.getID());
    Inventory inv = getInventoryItem(si.getID());
   
    /**
     * Decrease the quantity of this inventory item.
     * @param quantity The number to decrease the inventory by.
     * @return The number of inventory items removed.
     */
    int quantity=si.getQuantity();
    int minimumItems = inv.getMinThreshold();
     
    int amountToOrder = 0;
    Util.debug("ShoppingCartBean:checkInventory() - Decreasing inventory item " +inv.getInventoryId());
    int quantityNotFilled = 0;
    if (inv.getQuantity() < 1)
    {
      quantityNotFilled = quantity;
    }
    else if (inv.getQuantity() < quantity)
    {
      quantityNotFilled = quantity - inv.getQuantity();
    }
     
    // When quantity becomes < 0, this will be to determine the
    // quantity of unfilled orders due to insufficient stock.
    inv.setQuantity(inv.getQuantity() - quantity);
     
    //  Check to see if more inventory needs to be ordered from the supplier
    //  based on a set minimum Threshold
    if (inv.getQuantity() < minimumItems)
    {
      // Calculate the amount of stock to order from the supplier
      // to get the inventory up to the maximum.
      amountToOrder = quantityNotFilled;
      backOrder(inv, amountToOrder);
View Full Code Here

Examples of com.emc.plants.persistence.Inventory

     */
    Collection<OrderItem> orderitems = new ArrayList<OrderItem>();
    //EntityManager em = entityManagerFactory.createEntityManager();
    for (Object o : items) {
      ShoppingCartItem si = (ShoppingCartItem) o;
      Inventory inv = em.find(Inventory.class, si.getID());
      OrderItem oi = new OrderItem(inv);
      oi.setQuantity(si.getQuantity());
      orderitems.add(oi);
    }
    Customer c = em.find(Customer.class, customerID);
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.