Пример #1
0
 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());
   }
 }
Пример #2
0
 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());
   }
 }
Пример #3
0
 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);
   }
 }
Пример #4
0
 public List<DistStageDto> getByIdList(List<Long> idList) {
   return distStages.selectByIdList(idList);
 }
Пример #5
0
 public int getAllCount() {
   return distStages.selectAllCount();
 }
Пример #6
0
 public List<DistStageDto> getAll() {
   return distStages.selectAll();
 }