Skip to content

Instantly share code, notes, and snippets.

@craigew
Created September 22, 2013 13:03
Show Gist options
  • Save craigew/6659695 to your computer and use it in GitHub Desktop.
Save craigew/6659695 to your computer and use it in GitHub Desktop.
Simple service class
public class CustomerManagementService extends DataAccess<Customer> {
public long createCustomer(Customer customer) {
return add(customer);
}
public boolean updateCustomer(Customer customer) {
update(customer);
return true;
}
public Customer findCustomerByPrimaryKey(int id) {
setEntityClass(Customer.class);
return findByPrimaryKey(id);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment