/** * Return the number of track list persisted * * @param trackInfoDTOList * @return */ @GET @Produces(MediaType.APPLICATION_JSON) @Path("/getParticipantPoints/{participantId}") public TrackInfoDTOList getParticipantPoints(@PathParam("participantId") String participantId) { log.debug("listado para participantId " + participantId); TrackInfoDTOList ret = new TrackInfoDTOList(); ret.add(ejb.getParticipantPoints(Long.valueOf(participantId))); return ret; }
@GET @Produces(MediaType.APPLICATION_XML) @Path("/getEventEditionPointsXML/{eventEditionId}") public TrackInfoDTOList getEventEditionPointsXML( @PathParam("eventEditionId") String eventEditionId) { log.debug("listado para eventEditionId " + eventEditionId); TrackInfoDTOList ret = new TrackInfoDTOList(); ret.add(ejb.getEventEditionPoints(Long.valueOf(eventEditionId))); return ret; }
private List<TrackInfo> getTrackInfoList(TrackInfoDTOList trackInfoDTOList) { List<TrackInfo> list = new ArrayList<TrackInfo>(); for (TrackInfoDTO dto : trackInfoDTOList.getList()) { list.add(getTrackInfo(dto)); } return list; }
/** * Return the number of track list persisted * * @param trackInfoDTOList * @return */ @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Path("/postTrackInfoList/") public Integer postTrackInfoList(TrackInfoDTOList trackInfoDTOList) { log.debug(trackInfoDTOList.toString()); return ejb.persistTrackInfoList(getTrackInfoList(trackInfoDTOList)); }