Package com.oltpbenchmark.benchmarks.tpcc.pojo

Examples of com.oltpbenchmark.benchmarks.tpcc.pojo.Customer


        if (!rs.next()) {
          throw new RuntimeException("C_ID=" + c_id + " C_D_ID=" + c_d_id
              + " C_W_ID=" + c_w_id + " not found!");
        }

        Customer c = TPCCUtil.newCustomerFromResults(rs);
        c.c_id = c_id;
        c.c_last = rs.getString("c_last");
        rs.close();
        return c;
      }
View Full Code Here


          String c_last, boolean c_by_name, Connection conn, TPCCWorker w) throws SQLException {
        int o_id = -1, o_carrier_id = -1;
        Timestamp entdate;
        ArrayList<String> orderLines = new ArrayList<String>();

        Customer c;
        if (c_by_name) {
          assert c_id <= 0;
          // TODO: This only needs c_balance, c_first, c_middle, c_id
          // only fetch those columns?
          c = getCustomerByName(w_id, d_id, c_last);
View Full Code Here

        customerByName.setInt(2, c_d_id);
        customerByName.setString(3, c_last);
        ResultSet rs = customerByName.executeQuery();

        while (rs.next()) {
          Customer c = TPCCUtil.newCustomerFromResults(rs);
          c.c_id = rs.getInt("c_id");
          c.c_last = c_last;
          customers.add(c);
        }
        rs.close();
View Full Code Here

      d_zip = rs.getString("d_zip");
      d_name = rs.getString("d_name");
      rs.close();
      rs = null;

      Customer c;
      if (c_by_name) {
        assert c_id <= 0;
        c = getCustomerByName(c_w_id, c_d_id, c_last);
      } else {
        assert c_last == null;
View Full Code Here

      if (!rs.next()) {
        throw new RuntimeException("C_ID=" + c_id + " C_D_ID=" + c_d_id
            + " C_W_ID=" + c_w_id + " not found!");
      }

      Customer c = TPCCUtil.newCustomerFromResults(rs);
      c.c_id = c_id;
      c.c_last = rs.getString("c_last");
      rs.close();
      return c;
    }
View Full Code Here

      customerByName.setInt(2, c_d_id);
      customerByName.setString(3, c_last);
      ResultSet rs = customerByName.executeQuery();

      while (rs.next()) {
        Customer c = TPCCUtil.newCustomerFromResults(rs);
        c.c_id = rs.getInt("c_id");
        c.c_last = c_last;
        customers.add(c);
      }
      rs.close();
View Full Code Here

     * @return the newly created Customer object
     * @throws SQLException for problems getting data from row
     */
  public static Customer newCustomerFromResults(ResultSet rs)
      throws SQLException {
    Customer c = new Customer();
    // TODO: Use column indices: probably faster?
    c.c_first = rs.getString("c_first");
    c.c_middle = rs.getString("c_middle");
    c.c_street_1 = rs.getString("c_street_1");
    c.c_street_2 = rs.getString("c_street_2");
View Full Code Here

  static int loadCust(int whseKount, int distWhseKount, int custDistKount) {

    int k = 0;
    int t = 0;

    Customer customer = new Customer();
    History history = new History();
    PrintWriter outHist = null;

    try {
View Full Code Here

TOP

Related Classes of com.oltpbenchmark.benchmarks.tpcc.pojo.Customer

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.