@GET @Path("selectAll") @Produces(MediaType.APPLICATION_JSON) public List<SportsCar> getAllPerson() { // TODO List<SportsCar> list = sportsCarDao.selectAll(); return list; }
@GET @Path("sample") @Produces(MediaType.APPLICATION_JSON) public SportsCar getSamplePerson() { // TODO sportsCar = sportsCarDao.selectById(1); System.out.println( "Returning sample car: " + sportsCar.getModel() + " " + sportsCar.getOrigin()); return sportsCar; }
@GET @Path("sample/id/{id}") @Produces(MediaType.APPLICATION_JSON) public SportsCar getSamplePersonByPersonId(@PathParam("id") int id) { // TODO sportsCar = sportsCarDao.selectById(id); System.out.println( "Returning sample car: " + sportsCar.getModel() + " " + sportsCar.getOrigin()); return sportsCar; }