@Test public void testGet() throws URISyntaxException { String studentId = resourceService.postEntity(studentResource, createTestEntity()); String sectionId = resourceService.postEntity(sectionResource, createSectionEntity()); String assocId = resourceService.postEntity(ssaResource, createAssociationEntity(studentId, sectionId)); setupMocks(BASE_URI + "/" + studentId + "/studentSectionAssociations"); Response response = threePartResource.get(uriInfo, studentId); assertEquals("Status code should be OK", Response.Status.OK.getStatusCode(), response.getStatus()); }
@GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return resourceService.getEntities(base, id, resource, uriInfo.getRequestUri()); } }); }
ThreePartResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return resourceService.getEntities(base, id, resource, uriInfo.getRequestUri()); } }); } }
ThreePartResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return resourceService.getEntities(base, id, resource, uriInfo.getRequestUri()); } }); }  }
ThreePartResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return resourceService.getEntities(base, id, resource, uriInfo.getRequestUri()); } }); }  @GET Response get(@Context final UriInfo uriInfo,
                        @PathParam("id") final String id); }
ThreePartResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return resourceService.getEntities(base, id, resource, uriInfo.getRequestUri()); } }); }  @GET Response get(@Context final UriInfo uriInfo,
                        @PathParam("id") final String id);  }