@Override public User getUser(String usernameOrEmail) { User user = userDao.find(usernameOrEmail); if (user == null) { return null; } State state = stateDao.find(user.getState().getId()); user.setState(state); return user; }
@Override public User find(int id) { User user = userDao.find(id); if (user == null) { return null; } State state = stateDao.find(user.getState().getId()); user.setState(state); return user; }
@Override public void update(User user) { userDao.update(user); }
@Override public void insert(User user) { userDao.insert(user); }
@Override public List<User> findAll(int offset, int limit) { return userDao.findAll(offset, limit); }
@Override public int numberOfUsers() { return userDao.count(); }
@Override public void delete(User user) { userDao.delete(user); }