@@ -0,0 +1,783 @@
+package bg.car_wash.areas.car.serviceImpl;%0A%0Aimport bg.car_wash.areas.car.entity.Car;%0Aimport bg.car_wash.areas.car.exception.CarDBEmptyException;%0Aimport bg.car_wash.areas.car.repository.CarRepository;%0Aimport bg.car_wash.areas.car.service.CarService;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Service;%0A%0Aimport java.util.List;%0A%0A@Service%0Apublic class CarServiceImpl implements CarService %7B%0A%0A%09@Autowired%0A%09private CarRepository carRepository;%0A%0A%09@Override%0A%09public void createCar(Car car)%7B%0A%09%09this.carRepository.save(car);%0A%09%7D%0A%0A%09@Override%0A%09public List%3CCar%3E findAllCars() %7B%0A%09%09List%3CCar%3E cars = this.carRepository.findAll();%0A%09%09if (cars.isEmpty()) %7B%0A%09%09%09throw new CarDBEmptyException(%22Not found cars in DB%22, 404);%0A%09%09%7D%0A%0A%09%09return cars;%0A%09%7D%0A%7D%0A

create car service implementation