Package org.radargun.stages.tpcc.domain

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


      for (int id_order = 1; id_order <= TpccTools.NB_MAX_ORDER; id_order++) {

         int o_ol_cnt = TpccTools.aleaNumber(5, 15);
         Date aDate = new Date((new java.util.Date()).getTime());

         Order newOrder = new Order(id_order,
                                    id_district,
                                    id_wharehouse,
                                    generateSeqAlea(0, TpccTools.NB_MAX_CUSTOMER - 1),
                                    aDate,
                                    (id_order < TpccTools.LIMIT_ORDER) ? TpccTools.aleaNumber(1, 10) : 0,
                                    o_ol_cnt,
                                    1);

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


            throw new ElementNotFoundException("C_ID=" + c_id + " C_D_ID=" + d_id + " C_W_ID=" + w_id + " not found!");

      }

      // clause 2.6.2.2 (dot 4)
      Order o = OrderDAC.loadByGreatestId(basicCache, w_id, d_id, c_id);

      // clause 2.6.2.2 (dot 5)
      List<OrderLine> o_lines = OrderLineDAC.loadByOrder(basicCache, o);

View Full Code Here

      d.setD_next_o_id(d.getD_next_o_id() + 1);

      d.store(basicCache);


      Order o = new Order(o_id, d_id, w_id, c_id, new Date(), -1, o_ol_cnt, o_all_local);

      o.store(basicCache);


      // see clause 2.4.2.2 (dot 8)
      for (int ol_number = 1; ol_number <= o_ol_cnt; ol_number++) {
         ol_supply_w_id = supplierWarehouseIDs[ol_number - 1];
View Full Code Here

   }

   public static Order loadByGreatestId(BasicOperations.Cache basicCache, long w_id, long d_id, long c_id) throws Throwable {
      List<Order> list = new ArrayList<Order>();
      boolean found = false;
      Order current = null;

      for (int id_order = 1; id_order <= TpccTools.NB_MAX_ORDER; id_order++) {
         current = new Order();
         current.setO_id(id_order);
         current.setO_w_id(w_id);
         current.setO_d_id(d_id);
         found = current.load(basicCache);
         if (found && current.getO_c_id() == c_id) {
            list.add(current);
         }
      }

      if (list.isEmpty()) return null;
View Full Code Here

TOP

Related Classes of org.radargun.stages.tpcc.domain.Order

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.