@GET @Transactional(readOnly = true) public Response getTeamResource(@PathParam("teamName") final String teamName) { final List<Sprint> sprints = this.sprintAPI.getSprintsForTeam(teamName); for (final Sprint sprint : sprints) { sprint.getRemoteReferences().size(); sprint.getParticipants(); sprint.getUserStories().size(); } return Response.status(Response.Status.OK) .entity(new GenericEntity<List<Sprint>>(sprints) {}) .build(); }
@Override @Transactional public void updateRemote(Sprint sprint) { final Map<String, SprintProvider> sprintProviderMap; sprintProviderMap = new HashMap<>(); for (final SprintProvider provider : this.sprintProviders) { sprintProviderMap.put(provider.getSystemId(), provider); } for (final RemoteReference reference : sprint.getRemoteReferences()) { if (reference.isDirty()) { sprintProviderMap.get(reference.getSystemId()).refreshSprint(sprint); } } }