Esempio n. 1
0
  @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;
  }
Esempio n. 2
0
  @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;
  }