public boolean checkAccessRights(Long user, Long id, String part) {
        if (part.equals("inbox"))
            return (recommendations.containsKey(id)&&
                    inbox.containsKey(user)&&
                    inbox.get(user).contains(recommendations.get(id))) ;
        if (part.equals("queries"))
            return (recommendations.containsKey(id)&&
                    queries.containsKey(user)&&
                    queries.get(user).contains(recommendations.get(id))) ;
        if (part.equals("recommendations"))
            return (recommendations.containsKey(id)&&
                    self.containsKey(user)&&
                    self.get(user).contains(recommendations.get(id))) ;
        return false;
    }