Aktualizacja CarService
This commit is contained in:
parent
d15e17ce4a
commit
f62b2b7978
@ -55,9 +55,12 @@ public class CarService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<CarDto> convertListToDtoList(List<Car> cars){
|
private List<CarDto> convertListToDtoList(List<Car> cars){
|
||||||
List<CarDto> dtoList = cars.stream()
|
return cars.stream()
|
||||||
.map(this::mapCarModelToCarDto)
|
.map(this::mapCarModelToCarDto)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CarDto> processList(List<CarDto> dtoList){
|
||||||
|
|
||||||
for(CarDto c : dtoList){
|
for(CarDto c : dtoList){
|
||||||
Double fuelEconomy = 0D;
|
Double fuelEconomy = 0D;
|
||||||
@ -105,11 +108,6 @@ public class CarService {
|
|||||||
return dtoList;
|
return dtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<CarDto> processList(List<CarDto> carsToBeProcessed){
|
|
||||||
// TODO do the magic, preprocess list to get better values and sort elements
|
|
||||||
return carsToBeProcessed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<CarDto> searchForCars(String fuelType, Integer seats, Integer doors, Integer maxPrice,
|
public List<CarDto> searchForCars(String fuelType, Integer seats, Integer doors, Integer maxPrice,
|
||||||
Integer maxYearsOld, Integer enginePowerFrom, Integer enginePowerTo,
|
Integer maxYearsOld, Integer enginePowerFrom, Integer enginePowerTo,
|
||||||
String bodyType, String gearbox, String driveType) {
|
String bodyType, String gearbox, String driveType) {
|
||||||
|
Loading…
Reference in New Issue
Block a user