public ProcessingSchedule save(ProcessingSchedule processingSchedule) {
   if (processingSchedule.getId() == null || processingSchedule.getId() == 0) {
     repository.create(processingSchedule);
   } else {
     repository.update(processingSchedule);
   }
   return repository.get(processingSchedule.getId());
 }
 public ProcessingSchedule get(Long id) {
   ProcessingSchedule processingSchedule = repository.get(id);
   if (processingSchedule == null) {
     throw new DataException("error.schedule.not.found");
   }
   return processingSchedule;
 }
 public List<ProcessingSchedule> getAll() {
   return repository.getAll();
 }
 public ProcessingSchedule getByCode(String code) {
   return repository.getByCode(code);
 }