예제 #1
0
 public void updateLocation(Long callerId, String locationId) {
   List<CourseItemMeasure> courseItemMeasures = allCourseItemMeasures.findByCallerId(callerId);
   LocationDimension locationDimension = locationDimensionService.getFor(locationId);
   for (CourseItemMeasure courseItemMeasure : courseItemMeasures) {
     courseItemMeasure.setLocationDimension(locationDimension);
   }
   allCourseItemMeasures.updateAll(courseItemMeasures);
 }
예제 #2
0
 public void updateLocation(String oldLocationId, String newLocationId) {
   log.info(
       String.format(
           "Updated course item measures with old location id :%s to new location id : %s",
           oldLocationId, newLocationId));
   LocationDimension newLocation = locationDimensionService.getFor(newLocationId);
   List<CourseItemMeasure> courseItemMeasureList =
       allCourseItemMeasures.findByLocationId(oldLocationId);
   for (CourseItemMeasure courseItemMeasure : courseItemMeasureList) {
     courseItemMeasure.setLocationDimension(newLocation);
   }
   allCourseItemMeasures.updateAll(courseItemMeasureList);
 }
예제 #3
0
 @Transactional
 public void transfer(FrontLineWorkerDimension fromFlw, FrontLineWorkerDimension toFlw) {
   allCourseItemMeasures.transfer(CourseItemMeasure.class, fromFlw.getId(), toFlw.getId());
 }
예제 #4
0
 public List<Long> getAllFrontLineWorkerMsisdnsBetween(Date startDate, Date endDate) {
   return allCourseItemMeasures.getFilteredFrontLineWorkerMsisdns(startDate, endDate);
 }