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 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 remove(List<Long> idList) { int rowCount = distStages.deleteByIdList(idList); if (rowCount != idList.size()) { LOGGER.error( "Delete request and result mismatch: request " + idList + ", affected results: " + rowCount); } }
public List<DistStageDto> getByIdList(List<Long> idList) { return distStages.selectByIdList(idList); }
public int getAllCount() { return distStages.selectAllCount(); }
public List<DistStageDto> getAll() { return distStages.selectAll(); }