public void add(DistStageDto stage) { int rowCount = distStages.insert(stage); if (rowCount == 0) { LOGGER.error("Bad user input: " + stage); throw new UnexpectedInputException(Messages.ERR_BAD_USER_INPUT.getText()); } }
public void replace(long id, DistStageDto stage) { int rowCount = distStages.updateById(id, stage); if (rowCount == 0) { LOGGER.error("Bad user input: id: " + id + ", platform: " + stage); throw new UnexpectedInputException(Messages.ERR_BAD_USER_INPUT.getText()); } }
public DistStageDto parseDistStage(Map<String, Object> stageAnswers) { DistStageDto stage = new DistStageDto(stageAnswers); if (stage.isEmpty()) { LOGGER.error("Bad user input: unparsable distStage input: " + stageAnswers); throw new UnexpectedInputException(Messages.ERR_BAD_USER_INPUT.getText()); } return stage; }