示例#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;
  }
示例#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;
  }
示例#3
0
 @Override
 public void update(User user) {
   userDao.update(user);
 }
示例#4
0
 @Override
 public void insert(User user) {
   userDao.insert(user);
 }
示例#5
0
 @Override
 public List<User> findAll(int offset, int limit) {
   return userDao.findAll(offset, limit);
 }
示例#6
0
 @Override
 public int numberOfUsers() {
   return userDao.count();
 }
示例#7
0
 @Override
 public void delete(User user) {
   userDao.delete(user);
 }