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