Organize imports with new settings

See gh-4234
This commit is contained in:
Phillip Webb
2015-10-19 12:23:14 -07:00
parent 47ae7487ac
commit a79131f8d2
703 changed files with 1113 additions and 611 deletions

View File

@@ -16,12 +16,12 @@
package sample.data.jpa.service;
import sample.data.jpa.domain.City;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;
import sample.data.jpa.domain.City;
interface CityRepository extends Repository<City, Long> {
Page<City> findAll(Pageable pageable);

View File

@@ -16,12 +16,12 @@
package sample.data.jpa.service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.HotelSummary;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public interface CityService {
Page<City> findCities(CitySearchCriteria criteria, Pageable pageable);

View File

@@ -16,6 +16,9 @@
package sample.data.jpa.service;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.HotelSummary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -24,9 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.HotelSummary;
@Component("cityService")
@Transactional
class CityServiceImpl implements CityService {

View File

@@ -18,16 +18,16 @@ package sample.data.jpa.service;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.HotelSummary;
import sample.data.jpa.domain.RatingCount;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
interface HotelRepository extends Repository<Hotel, Long> {
Hotel findByCityAndName(City city, String name);

View File

@@ -16,14 +16,14 @@
package sample.data.jpa.service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Review;
import sample.data.jpa.domain.ReviewDetails;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public interface HotelService {
Hotel getHotel(City city, String name);

View File

@@ -20,13 +20,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Rating;
@@ -34,6 +27,13 @@ import sample.data.jpa.domain.RatingCount;
import sample.data.jpa.domain.Review;
import sample.data.jpa.domain.ReviewDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
@Component("hotelService")
@Transactional
class HotelServiceImpl implements HotelService {

View File

@@ -16,13 +16,13 @@
package sample.data.jpa.service;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Review;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Review;
interface ReviewRepository extends Repository<Review, Long> {
Page<Review> findByHotel(Hotel hotel, Pageable pageable);

View File

@@ -16,14 +16,14 @@
package sample.data.jpa.web;
import sample.data.jpa.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import sample.data.jpa.service.CityService;
@Controller
public class SampleController {