Moved getAllUserFriends by pageable into 104 line
@@ -93,6 +93,16 @@ public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExe
@Query(value = " SELECT u.userFriends FROM User u WHERE u.id = :userId ")
List<User> getAllUserFriends(Long userId);
+ /**
+ * Get all user friends{@link User}. by page.
+ *
+ * @param pageable pageable configuration.
+ * @return {@link Page}
+ * @author Yurii Yhurakovskyi
+ */
+ @Query(value = " SELECT u.userFriends FROM User u WHERE u.id = :userId ")
+ Page<User> getAllUserFriends(Long userId, Pageable pageable);
+
/**
* Delete friend {@link User}.
*/
@@ -131,16 +141,6 @@ public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExe
@Query(value = "UPDATE User SET last_activity_time=:userLastActivityTime WHERE id=:userId")
void updateUserLastActivityTime(Long userId, Date userLastActivityTime);
- /**
- * Get all user friends{@link User}. by page.
- *
- * @param pageable pageable configuration.
- * @return {@link Page}
- * @author Yurii Yhurakovskyi
- */
- @Query(value = " SELECT u.userFriends FROM User u WHERE u.id = :userId ")
- Page<User> getAllUserFriends(Long userId, Pageable pageable);
-
/**
* Find the last activity time by {@link User}'s id.
*
