public Page<Mood> findFriendMoods(Account owner, Pageable pageRequest) { Page<Mood> moods = moodDao.findFriendMoods(owner, pageRequest); for (Mood mood : moods.getContent()) { List<Comment> comments = commentDao.findByParentMoodAndParentType(mood, Comment.PARENT_TYPE_MOOD); mood.setChildren(comments); } return moods; }
public Long countFriendMoods(Account owner, Long timeLine) { return moodDao.countFriendMoods(owner, timeLine); }
public Mood findById(Long id) { return moodDao.findOne(id); }
public Mood save(Mood mood) { return moodDao.save(mood); }
public Mood findByParty(Party party) { return moodDao.findByParty(party); }