Examples of OrderLine


Examples of org.openbravo.model.common.order.OrderLine

    for (final Order o : orders.list()) {
      log.debug("Order: " + o.get(Order.PROPERTY_DOCUMENTNO) + " - no. lines: "
          + o.getOrderLineList().size());

      if (o.getOrderLineList().size() > 0) {
        final OrderLine l = o.getOrderLineList().get(0);
        // copy the orderline
        final OrderLine copy = (OrderLine) DalUtil.copy(l);
        copy.setId(null);
        o.getOrderLineList().add(copy);
        commitTransaction();
        lineId = copy.getId();
        break;
      }
    }
    // we did copy a line
    assertTrue(lineId != null);
View Full Code Here

Examples of org.radargun.stages.tpcc.domain.OrderLine

         } else {
            amount = 0.0;
            delivery_date = aDate;
         }

         OrderLine newOrderLine = new OrderLine(id_order,
                                                id_district,
                                                id_wharehouse,
                                                i,
                                                TpccTools.nonUniformRandom(getOL_I_ID(), TpccTools.A_OL_I_ID, 1L, TpccTools.NB_MAX_ITEM),
                                                id_wharehouse,
                                                delivery_date,
                                                5,
                                                amount,
                                                TpccTools.aleaChainel(12, 24));

         boolean successful = false;
         while (!successful) {
            try {
               newOrderLine.store(basicCache);
               successful = true;
            } catch (Throwable e) {
               log.warn("Storing new order line failed", e);
            }
         }
View Full Code Here

Examples of simon.entities.OrderLine

    //add the object to the list
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    DVD dvd = fetchEjb.GetSingleDvd(dbUrl, dbUsername, dbPassword, rs.getInt("itemId"));
                    Integer quantity = rs.getInt("quantity");
                    dvdList.add(new OrderLine(dvd, quantity));
                }
            }
            return dvdList; //return the results
        }
    }
View Full Code Here

Examples of testsuite.clusterj.model.OrderLine

        Double orderValue = 0.0d;
        // now create some order lines
        int numberOfOrderLines = random.nextInt(maximumOrderLinesPerOrder);
        for (int i = 0; i < numberOfOrderLines; ++i) {
            int orderLineNumber = getNextOrderLineId();
            OrderLine orderLine = session.newInstance(OrderLine.class);
            orderLine.setId(orderLineNumber);
            orderLine.setOrderId(orderid);
            long quantity = random.nextInt(maximumQuantityPerOrderLine);
            orderLine.setQuantity(quantity);
            float unitPrice = ((float)random.nextInt(maximumUnitPrice)) / 4;
            orderLine.setUnitPrice(unitPrice);
            double orderLineValue = unitPrice * quantity;
            orderValue += orderLineValue;
            if (getDebug()) System.out.println("For order " + orderid + " orderline " + orderLineNumber +
                    " order line value " + orderLineValue + " order value " + orderValue);
            orderLine.setTotalValue(orderLineValue);
            addOrderLine(orderLine);
            session.persist(orderLine);
        }
        order.setValue(orderValue);
        session.persist(order);
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.