Пример #1
0
 protected boolean amIFollowing(User u) {
   return id == u.id || userRepository.follows(this, u);
 }
Пример #2
0
 public void stopFollowing(User u) {
   if (!userRepository.follows(this, u)) {
     throw RingerException.RELATION_ALREADY_EXISTS;
   }
   userRepository.deleteRelation(this, u);
 }
Пример #3
0
 public List<User> getFollowing(int offset, int number) {
   return userRepository.getFollowing(this, offset, number);
 }
Пример #4
0
 public void startFollowing(User u) {
   if (amIFollowing(u) == true) {
     throw RingerException.RELATION_ALREADY_EXISTS;
   }
   userRepository.createRelation(this, u);
 }