List<Person> friendsUsingWidget = new ArrayList<Person>();
TypedQuery<JpaWidget> widgetQuery = manager.createNamedQuery(JpaWidget.WIDGET_GET_BY_URL, JpaWidget.class);
widgetQuery.setParameter(JpaWidget.PARAM_URL, appId);
final List<JpaWidget> resultList = widgetQuery.getResultList();
Widget widget = getSingleResult(resultList);
TypedQuery<JpaUser> usersQuery = manager.createNamedQuery(JpaUser.USER_GET_ALL_FOR_ADDED_WIDGET, JpaUser.class);
usersQuery.setParameter(JpaUser.PARAM_WIDGET_ID, Long.parseLong(widget.getId()));
List<User> widgetUsers = CollectionUtils.<User>toBaseTypedList(usersQuery.getResultList());
List<Person> userFriends = findFriends(username);
for (Person userFriend : userFriends) {
for (User widgetUser : widgetUsers) {