Package org.radargun.stages.tpcc.domain

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


               ol_dist_info = s.getS_dist_10();
               break;
         }
         // clause 2.4.2.2 (dot 8.5)

         OrderLine ol = new OrderLine(o_id, d_id, w_id, ol_number, ol_i_id, ol_supply_w_id, null, ol_quantity, ol_amount, ol_dist_info);
         ol.store(basicCache);

      }

   }
View Full Code Here

   public static List<OrderLine> loadByOrder(BasicOperations.Cache basicCache, Order order) throws Throwable {
      List<OrderLine> list = new ArrayList<OrderLine>();
      if (order == null) return list;
      int numLines = order.getO_ol_cnt();
      OrderLine current = null;
      boolean found = false;

      for (int i = 0; i < numLines; i++) {
         current = new OrderLine();
         current.setOl_w_id(order.getO_w_id());
         current.setOl_d_id(order.getO_d_id());
         current.setOl_o_id(order.getO_id());
         current.setOl_number(i);
         found = current.load(basicCache);
         if (found) list.add(current);
      }
      return list;
   }
View Full Code Here

TOP

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

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.