public boolean hasMoreActivities() { int loadedActivitiesCount = (activityPageIndex + 1) * ACTIVITY_COUNT_PER_LOAD; int totalActivitiesCount = activityServiceImpl.getActivityCountByActor(authenticatedAccount.getPerson().getId()); return ((loadedActivitiesCount < totalActivitiesCount) && (loadedActivitiesCount < MAX_ACTIVITIES_COUNT_PER_PAGE)); }
public List<Activity> getActivities() { if (authenticatedAccount != null) { int count = (activityPageIndex + 1) * ACTIVITY_COUNT_PER_LOAD; return activityServiceImpl.findLatestActivities( authenticatedAccount.getPerson().getId(), 0, count); } return Collections.emptyList(); }