/** DELETE /ordenCompras/:id -> delete the "id" ordenCompra. */
 @RequestMapping(
     value = "/ordenCompras/{id}",
     method = RequestMethod.DELETE,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Void> deleteOrdenCompra(@PathVariable Long id) {
   log.debug("REST request to delete OrdenCompra : {}", id);
   ordenCompraRepository.delete(id);
   return ResponseEntity.ok()
       .headers(HeaderUtil.createEntityDeletionAlert("ordenCompra", id.toString()))
       .build();
 }
 /** PUT /ordenCompras -> Updates an existing ordenCompra. */
 @RequestMapping(
     value = "/ordenCompras",
     method = RequestMethod.PUT,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<OrdenCompraDTO> updateOrdenCompra(
     @Valid @RequestBody OrdenCompraDTO ordenCompraDTO) throws URISyntaxException {
   log.debug("REST request to update OrdenCompra : {}", ordenCompraDTO);
   if (ordenCompraDTO.getId() == null) {
     return createOrdenCompra(ordenCompraDTO);
   }
   OrdenCompra ordenCompra = ordenCompraMapper.ordenCompraDTOToOrdenCompra(ordenCompraDTO);
   OrdenCompra result = ordenCompraRepository.save(ordenCompra);
   return ResponseEntity.ok()
       .headers(
           HeaderUtil.createEntityUpdateAlert("ordenCompra", ordenCompraDTO.getId().toString()))
       .body(ordenCompraMapper.ordenCompraToOrdenCompraDTO(result));
 }
 /** PUT /proveedoress -> Updates an existing proveedores. */
 @RequestMapping(
     value = "/proveedoress",
     method = RequestMethod.PUT,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<ProveedoresDTO> updateProveedores(
     @Valid @RequestBody ProveedoresDTO proveedoresDTO) throws URISyntaxException {
   log.debug("REST request to update Proveedores : {}", proveedoresDTO);
   if (proveedoresDTO.getId() == null) {
     return createProveedores(proveedoresDTO);
   }
   Proveedores proveedores = proveedoresMapper.proveedoresDTOToProveedores(proveedoresDTO);
   Proveedores result = proveedoresRepository.save(proveedores);
   return ResponseEntity.ok()
       .headers(
           HeaderUtil.createEntityUpdateAlert("proveedores", proveedoresDTO.getId().toString()))
       .body(proveedoresMapper.proveedoresToProveedoresDTO(result));
 }
 /** POST /ordenCompras -> Create a new ordenCompra. */
 @RequestMapping(
     value = "/ordenCompras",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<OrdenCompraDTO> createOrdenCompra(
     @Valid @RequestBody OrdenCompraDTO ordenCompraDTO) throws URISyntaxException {
   log.debug("REST request to save OrdenCompra : {}", ordenCompraDTO);
   if (ordenCompraDTO.getId() != null) {
     return ResponseEntity.badRequest()
         .header("Failure", "A new ordenCompra cannot already have an ID")
         .body(null);
   }
   OrdenCompra ordenCompra = ordenCompraMapper.ordenCompraDTOToOrdenCompra(ordenCompraDTO);
   OrdenCompra result = ordenCompraRepository.save(ordenCompra);
   return ResponseEntity.created(new URI("/api/ordenCompras/" + result.getId()))
       .headers(HeaderUtil.createEntityCreationAlert("ordenCompra", result.getId().toString()))
       .body(ordenCompraMapper.ordenCompraToOrdenCompraDTO(result));
 }
 /** POST /proveedoress -> Create a new proveedores. */
 @RequestMapping(
     value = "/proveedoress",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<ProveedoresDTO> createProveedores(
     @Valid @RequestBody ProveedoresDTO proveedoresDTO) throws URISyntaxException {
   log.debug("REST request to save Proveedores : {}", proveedoresDTO);
   if (proveedoresDTO.getId() != null) {
     return ResponseEntity.badRequest()
         .header("Failure", "A new proveedores cannot already have an ID")
         .body(null);
   }
   Proveedores proveedores = proveedoresMapper.proveedoresDTOToProveedores(proveedoresDTO);
   Proveedores result = proveedoresRepository.save(proveedores);
   return ResponseEntity.created(new URI("/api/proveedoress/" + result.getId()))
       .headers(HeaderUtil.createEntityCreationAlert("proveedores", result.getId().toString()))
       .body(proveedoresMapper.proveedoresToProveedoresDTO(result));
 }