예제 #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);
 }