public List<User> getUserByNameAndPassword(String name, String password) { String[] params = {"name", "password"}; Object[] values = {name, password}; return templateDao.findByQueryWithParams(User.getUserByNameAndPassword, params, values); }
public List<User> getUserByName(String name) { return templateDao.findByQueryWithParam(User.getUserByName, "name", name); }
public void delete(User user) { templateDao.delete(user); }
public List<User> getAllUsers() { return templateDao.findByNamedQuery(User.getAllUsers); }
public void save(User user) { templateDao.save(user); }