src/main/java/br/ufpa/labes/spm/web/rest/PlainResource.java
@PutMapping("/plains")
  public ResponseEntity<Plain> updatePlain(@RequestBody Plain plain) throws URISyntaxException {
    log.debug("REST request to update Plain : {}", plain);
    if (plain.getId() == null) {
      throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
    }
    Plain result = plainRepository.save(plain);
    return ResponseEntity.ok()
        .headers(
            HeaderUtil.createEntityUpdateAlert(
                applicationName, true, ENTITY_NAME, plain.getId().toString()))
        .body(result);
  }
/**
   * {@code PUT /plains} : Updates an existing plain.
   *
   * @param plain the plain to update.
   * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated
   *     plain, or with status {@code 400 (Bad Request)} if the plain is not valid, or with status
   *     {@code 500 (Internal Server Error)} if the plain couldn't be updated.
   * @throws URISyntaxException if the Location URI syntax is incorrect.
   */
PUT /plains : Updates an existing plain.
@param plain the plain to update.
@return the  ResponseEntity with status  200 (OK) and with body the updated
plain, or with status  400 (Bad Request) if the plain is not valid, or with status
500 (Internal Server Error) if the plain couldn't be updated.
@throws URISyntaxException if the Location URI syntax is incorrect.
PUT / plains : Updates an existing plain . @param plain the plain to update . @return the ResponseEntity with status 200 ( OK ) and with body the updated plain or with status 400 ( Bad Request ) if the plain is not valid or with status 500 ( Internal Server Error ) if the plain couldn ' t be updated . @throws URISyntaxException if the Location URI syntax is incorrect .
@PutMapping("/plains")
  public ResponseEntity<Plain> updatePlain(@RequestBody Plain plain) throws URISyntaxException {
    log.debug("REST request to update Plain : {}", plain);
    if (plain.getId() == null) {
      throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
    }
    Plain result = plainRepository.save(plain);
    return ResponseEntity.ok()
        .headers(
            HeaderUtil.createEntityUpdateAlert(
                applicationName, true, ENTITY_NAME, plain.getId().toString()))
        .body(result);
  }
@ PutMapping ( "/plains" ) public ResponseEntity < Plain > updatePlain ( @ RequestBody Plain plain ) throws URISyntaxException { log . debug ( "REST request to update Plain : {}" , plain ) ; if ( plain . getId ( ) == null ) { throw new BadRequestAlertException ( "Invalid id" , ENTITY_NAME , "idnull" ) ; } Plain result = plainRepository . save ( plain ) ; return ResponseEntity . ok ( ) . headers ( HeaderUtil . createEntityUpdateAlert ( applicationName , true , ENTITY_NAME , plain . getId ( ) . toString ( ) ) ) . body ( result ) ; }
{@code PUT /plains} : Updates an existing plain.
{ @code PUT / plains } : Updates an existing plain .