use of com.dubion.domain.BandPrueba in project dubion by valsamiq.
the class BandPruebaResource method updateBandPrueba.
/**
* PUT /band-pruebas : Updates an existing bandPrueba.
*
* @param bandPrueba the bandPrueba to update
* @return the ResponseEntity with status 200 (OK) and with body the updated bandPrueba,
* or with status 400 (Bad Request) if the bandPrueba is not valid,
* or with status 500 (Internal Server Error) if the bandPrueba couldn't be updated
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PutMapping("/band-pruebas")
@Timed
public ResponseEntity<BandPrueba> updateBandPrueba(@RequestBody BandPrueba bandPrueba) throws URISyntaxException {
log.debug("REST request to update BandPrueba : {}", bandPrueba);
if (bandPrueba.getId() == null) {
return createBandPrueba(bandPrueba);
}
BandPrueba result = bandPruebaService.save(bandPrueba);
return ResponseEntity.ok().headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, bandPrueba.getId().toString())).body(result);
}
use of com.dubion.domain.BandPrueba in project dubion by valsamiq.
the class BandPruebaResource method createBandPrueba.
/**
* POST /band-pruebas : Create a new bandPrueba.
*
* @param bandPrueba the bandPrueba to create
* @return the ResponseEntity with status 201 (Created) and with body the new bandPrueba, or with status 400 (Bad Request) if the bandPrueba has already an ID
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PostMapping("/band-pruebas")
@Timed
public ResponseEntity<BandPrueba> createBandPrueba(@RequestBody BandPrueba bandPrueba) throws URISyntaxException {
log.debug("REST request to save BandPrueba : {}", bandPrueba);
if (bandPrueba.getId() != null) {
throw new BadRequestAlertException("A new bandPrueba cannot already have an ID", ENTITY_NAME, "idexists");
}
BandPrueba result = bandPruebaService.save(bandPrueba);
return ResponseEntity.created(new URI("/api/band-pruebas/" + result.getId())).headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())).body(result);
}
use of com.dubion.domain.BandPrueba in project dubion by valsamiq.
the class BandPruebaResource method getBandPrueba.
/**
* GET /band-pruebas/:id : get the "id" bandPrueba.
*
* @param id the id of the bandPrueba to retrieve
* @return the ResponseEntity with status 200 (OK) and with body the bandPrueba, or with status 404 (Not Found)
*/
@GetMapping("/band-pruebas/{id}")
@Timed
public ResponseEntity<BandPrueba> getBandPrueba(@PathVariable Long id) {
log.debug("REST request to get BandPrueba : {}", id);
BandPrueba bandPrueba = bandPruebaService.findOne(id);
return ResponseUtil.wrapOrNotFound(Optional.ofNullable(bandPrueba));
}
Aggregations