Skip to content

Instantly share code, notes, and snippets.

@machielg
Last active August 5, 2017 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machielg/8e0db53533906a16e7fdeddead4f8782 to your computer and use it in GitHub Desktop.
Save machielg/8e0db53533906a16e7fdeddead4f8782 to your computer and use it in GitHub Desktop.
public class Client {
public Client(CustomerRepository customerRepo, OrderRepository orderRepo) {
this.customerRepo = customerRepo;
this.orderRepo = orderRepo;
}
public void demonstrate() {
customerRepo.allCustomers().forEach(customer -> {
List<Order> orders = orderRepo.getOrdersForCustomer(customer.getId());
//display orders...
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment