response.close();
System.out.println("** Buy an iPhone for Bill Burke");
System.out.println();
System.out.println("** First see if Bill Burke exists as a customer");
Customers custs = client.target(customers)
.queryParam("firstName", "Bill")
.queryParam("lastName", "Burke")
.request().get(Customers.class);
Customer customer = null;
if (custs.getCustomers().size() > 0)
{
System.out.println("- Found a Bill Burke in the database, using that");
customer = custs.getCustomers().iterator().next();
}
else
{
System.out.println("- Cound not find a Bill Burke in the database, creating one.");
customer = new Customer();