public void save(DeliveryZoneProgramSchedule deliveryZoneProgramSchedule) {
    fillProgram(deliveryZoneProgramSchedule);
    fillDeliveryZone(deliveryZoneProgramSchedule);
    fillSchedule(deliveryZoneProgramSchedule);

    if (deliveryZoneProgramSchedule.getId() == null) repository.insert(deliveryZoneProgramSchedule);
    else repository.update(deliveryZoneProgramSchedule);
  }
 public ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId) {
   return repository.getProcessingScheduleByZoneAndProgram(zoneId, programId);
 }
 public List<ProcessingPeriod> getPeriodsForDeliveryZoneAndProgram(Long zoneId, Long programId) {
   ProcessingSchedule schedule =
       repository.getProcessingScheduleByZoneAndProgram(zoneId, programId);
   return scheduleService.getAllPeriodsBefore(schedule.getId(), null);
 }
 public List<Long> getProgramIdsForDeliveryZones(Long deliveryZoneId) {
   return repository.getProgramIdsForDeliveryZones(deliveryZoneId);
 }
 public DeliveryZoneProgramSchedule getByDeliveryZoneCodeAndProgramCode(
     String deliveryZoneCode, String programCode) {
   return repository.getByDeliveryZoneCodeAndProgramCode(deliveryZoneCode, programCode);
 }