@Override
public Customer getCustomer(String pCustomerName) throws NoSuchCustomerException {
ClResult result = DBClient.getInstance().getAll(DBClient.NAME_SPACE, "Customer", pCustomerName, null);
if (result.resultCode != ClResultCode.OK){
throw new NoSuchCustomerException("cannot find customer " + pCustomerName);
}
Customer customer = new Customer();
customer.setCustomerName((String) result.results.get("CustomerName"));
customer.setAddress((String) result.results.get("Address"));