示例#1
0
 public List<Facility> getAllForDeliveryZoneAndProgram(Long deliveryZoneId, Long programId) {
   List<Facility> facilities =
       facilityRepository.getAllInDeliveryZoneFor(deliveryZoneId, programId);
   for (Facility facility : facilities) {
     facility
         .getSupportedPrograms()
         .add(
             programSupportedService.getFilledByFacilityIdAndProgramId(
                 facility.getId(), programId));
   }
   return facilities;
 }
示例#2
0
 public Facility getById(Long id) {
   Facility facility = facilityRepository.getById(id);
   facility.setSupportedPrograms(programSupportedService.getAllByFacilityId(id));
   return facility;
 }
示例#3
0
 @Transactional
 public void update(Facility facility) {
   save(facility);
   programSupportedService.updateSupportedPrograms(facility);
 }