Exemplo n.º 1
0
 @Transactional
 private void saveWeatherInfo(LinkedList<WeatherInfo> weatherInfos) {
   weatherRepository.deleteAll();
   for (WeatherInfo weatherInfo : weatherInfos) {
     weatherRepository.save(weatherInfo);
   }
 }
Exemplo n.º 2
0
  private void init() {
    cityRepository.truncate();
    for (City city : cities) {
      cityRepository.save(city);
    }

    weatherRepository.truncate();
  }