/** GET /prices/:id -> get the "id" price. */ @RequestMapping( value = "/prices/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<Price> get(@PathVariable Long id) { log.debug("REST request to get Price : {}", id); return Optional.ofNullable(priceRepository.findOne(id)) .map(price -> new ResponseEntity<>(price, HttpStatus.OK)) .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND)); }