public boolean updateInfos(Boleto b, Contador p) {
   Boleto boleto = boletoRepository.findById(b.getId());
   if (boleto.getContador() == p) {
     boleto.setEmpresa(b.getEmpresa());
     boleto.setListaNotas(b.getListaNotas());
     boleto.setValor(b.getValor());
     boletoRepository.saveAndFlush(boleto);
     return true;
   }
   return false;
 }
 public void delete(Boleto b, Contador p) {
   Boleto boleto = boletoRepository.findById(b.getId());
   if (boleto.getContador() == p) {
     boletoRepository.delete(boleto);
   }
 }
 public Boleto setPago(String id) {
   Boleto b = getOne(id);
   b.setStatusPago(true);
   b.setDataPago(getDate());
   return boletoRepository.saveAndFlush(b);
 }
 public Boleto save(Boleto b) {
   b.setDataGerada(getDate());
   b.setStatusPago(false);
   return boletoRepository.save(b);
 }