Interface CarService

All Known Implementing Classes:
CarServiceImpl

public interface CarService
Interface Service car to service CarRepository.
Since:
2020-04-27.
Version:
2.0.
Author:
Krystian Cwioro Kamil Bieniasz Damian Mierzynski.
  • Method Details

    • findAll

      java.util.List<CarResponse> findAll()
      Method find all car.
      Returns:
      List Car.
    • save

      void save​(CarRequest car) throws WrongDataException
      Method to save new car.
      Parameters:
      car - new data car.
      Throws:
      WrongDataException - when request has wrong localization.
    • findByIdCar

      CarResponse findByIdCar​(int id) throws WrongDataException
      Method find car on id
      Parameters:
      id - id on find car
      Returns:
      car on id.
      Throws:
      WrongDataException - when car not exist.
    • update

      Car update​(int id, CarRequest carResponse) throws WrongDataException
      Method to edit data car.
      Parameters:
      id - id car
      carResponse - data new car.
      Returns:
      new data update car.
      Throws:
      WrongDataException - where id car not exist.
    • deleteCar

      void deleteCar​(int id) throws WrongDataException
      Delete car on id.
      Parameters:
      id - id car to delete.
      Throws:
      WrongDataException - when id car is wrong.
    • deleteByIdCar

      java.lang.Integer deleteByIdCar​(int id) throws WrongDataException
      Delete car on id.
      Parameters:
      id - id car to delete.
      Returns:
      return id deleting car.
      Throws:
      WrongDataException - when id car not exist.
    • findByLocalizationId

      java.util.List<CarResponse> findByLocalizationId​(java.lang.Long id)
      Find car on localization.
      Parameters:
      id - id localization.
      Returns:
      return List car witch id localization.
    • findByLocalizationCity

      java.util.List<CarResponse> findByLocalizationCity​(java.lang.String city)
      Find car on localization on name city.
      Parameters:
      city - name city.
      Returns:
      return List car on localization city.
      Throws:
      WrongDataException - when city name not exist.