public List<HashMap<String, String>> getSubscribtionUserList(String gooruOid) { List<ShelfItem> shelfItemList = shelfService.getShelfSubscribeUserList(gooruOid); List<HashMap<String, String>> subscriptions = new ArrayList<HashMap<String, String>>(); if (shelfItemList != null) { for (ShelfItem shelfItem : shelfItemList) { User user = this.getUserRepository().findByGooruId(shelfItem.getShelf().getUserId()); if (user != null) { if (shelfItem .getResource() .getUser() .getGooruUId() .equalsIgnoreCase(user.getGooruUId())) { continue; } HashMap<String, String> hMap = new HashMap<String, String>(); hMap.put(SUBSCRIBED_ON, shelfItem.getCreatedOn().toString()); hMap.put(CONT_USER_ID, shelfItem.getResource().getUser().getGooruUId()); hMap.put(CONT_FIRSTNAME, user.getFirstName()); hMap.put(CONT_LASTNAME, user.getLastName()); hMap.put(SCB_USER_ID, shelfItem.getShelf().getUserId()); subscriptions.add(hMap); } } } return subscriptions; }