@@ -0,0 +1,2376 @@
+import java.sql.PreparedStatement;%0Aimport java.sql.DriverManager;%0Aimport java.sql.Connection;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0A%0Apublic class StocklevelTest %7B%0A%09%0A  public static void main(String%5B%5D argv) %7B%0A%0A    System.out.println(%22-------- TPCC Stocklevel Testing ------------%22);%0A        %0A    PreparedStatement pst = null;%0A    ResultSet rs = null;%0A%0A    try %7B%0A      Class.forName(%22org.postgresql.Driver%22);%0A    %7D catch (ClassNotFoundException e) %7B%0A      System.out.println(%22Where is your PostgreSQL JDBC Driver? %22%0A%09%09%09%09%09+ %22Include in your library path!%22);%0A      e.printStackTrace();%0A      return;%0A    %7D%0A%0A    System.out.println(%22PostgreSQL JDBC Driver Registered!%22);%0A    Connection con = null;%0A%0A    try %7B%0A      con = DriverManager.getConnection(%0A%09%22jdbc:postgresql://127.0.0.1:15721/tpcc%22, %22tpcc%22,%0A%09%22tpcc%22);%0A%0A    String query = %22SELECT * %22 +%0A%09%09   %22 FROM order_line %22 +%0A%09%09   %22 WHERE OL_W_ID = ?%22 +%0A%09%09   %22 AND OL_D_ID = ?%22 +%0A%09%09   %22 AND OL_O_ID %3C ?%22 +%0A%09%09   %22 AND OL_O_ID %3E= ?%22%0A;%0A%0A    String query2 = %22SELECT * %22 +%0A                    %22 FROM stock %22 +%0A                    %22 WHERE S_W_ID = ?%22 +%0A                    %22 AND S_I_ID %3C ?%22 +%0A                    %22 AND S_QUANTITY %3C ?%22%0A;%0A%0A    String query3 = %22SELECT S_I_ID%22 +%0A                    %22 FROM order_line, stock %22 +%0A                    %22 WHERE OL_W_ID = ?%22 +%0A                    %22 AND OL_D_ID = ?%22 +%0A                    %22 AND OL_O_ID %3C ?%22 +%0A                    %22 AND OL_O_ID %3E= ?%22 +%0A                    %22 AND S_W_ID = ?%22 +%0A                    %22 AND S_I_ID = OL_I_ID%22 + %0A                    %22 AND S_QUANTITY %3C ?%22%0A;%0A    pst = con.prepareStatement(query3);%0A%0A    pst.setInt(1, 1);   // OL_W_ID%0A    pst.setInt(2, 1);   // OL_D_ID%0A    pst.setInt(3, 2);   // OL_O_ID%0A    pst.setInt(4, 1);   // OL_O_ID%0A    pst.setInt(5, 1);   // S_W_ID%0A    pst.setInt(6, 100);%0A    boolean isResult = pst.execute();%0A%0A    do %7B%0A      rs = pst.getResultSet();     %0A      while (rs.next()) %7B%0A        System.out.print(%22Result:%22);%0A        System.out.println(rs.getInt(1));%0A    %7D%0A      isResult = pst.getMoreResults();%0A    %7Dwhile (isResult);%0A%0A  %7D catch (SQLException e) %7B%0A    System.out.println(%22Connection Failed! Check output console%22);%0A%09%09%09e.printStackTrace();%0A    return;%0A  %7D%0A%0A  if (con != null) %7B%0A    System.out.println(%22You made it, take control your database now!%22);%0A  %7D else %7B%0A    System.out.println(%22Failed to make connection!%22);%0A  %7D%0A%7D%0A%7D%0A

add jdbc test client in script/testing/jdbc/src/