Untitled
private void isSupplyExistentAndActive(Long id) { Supplies supplies = suppliesRepository .findById(id) .orElseThrow(() -> new BadRequestAlertException(Translator.toLocal("entity.not.found"), ENTITY_NAME, "idnotfound")); if (Objects.equals(supplies.getStatus(), Constants.STATUS.DELETE)) throw new BadRequestAlertException( Translator.toLocal("entity.not.active"), ENTITY_NAME, "entityNotActive" ); }