Пример #1
0
 @GET
 @Path("{userId}/friends/pending")
 public Response getPendingFriends(@PathParam("userId") final String userId) {
   final List<User> pendingFriends = userDao.getPendingFriendReq(userId);
   List<com.campusconnect.neo4j.types.web.User> returnUsers =
       new ArrayList<>(pendingFriends.size());
   for (User user : pendingFriends) {
     returnUsers.add(Neo4jToWebMapper.mapUserNeo4jToWeb(user));
   }
   UsersPage usersPage = new UsersPage(0, returnUsers.size(), returnUsers);
   return Response.ok().entity(usersPage).build();
 }