Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public Facility getById(Long id) {
   Facility facility = facilityRepository.getById(id);
   facility.setSupportedPrograms(programSupportedService.getAllByFacilityId(id));
   return facility;
 }
Ejemplo n.º 3
0
 @Transactional
 public void update(Facility facility) {
   save(facility);
   programSupportedService.updateSupportedPrograms(facility);
 }