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