Interface CarSearchService


public interface CarSearchService
Service useful for research operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    findCars(net.andresbustamante.yafoot.commons.model.UserContext ctx)
    Load the list of cars saved by a user.
    loadCar(Integer id, net.andresbustamante.yafoot.commons.model.UserContext ctx)
    Loads the details of a car from its unique identifier.
  • Method Details

    • findCars

      List<Car> findCars(net.andresbustamante.yafoot.commons.model.UserContext ctx) throws net.andresbustamante.yafoot.commons.exceptions.DatabaseException
      Load the list of cars saved by a user.
      Parameters:
      ctx - User context
      Returns:
      List of cars
      Throws:
      net.andresbustamante.yafoot.commons.exceptions.DatabaseException
    • loadCar

      Car loadCar(Integer id, net.andresbustamante.yafoot.commons.model.UserContext ctx) throws net.andresbustamante.yafoot.commons.exceptions.DatabaseException, net.andresbustamante.yafoot.commons.exceptions.ApplicationException
      Loads the details of a car from its unique identifier.
      Parameters:
      id - Car's identifier
      ctx - Context information for the actual user
      Returns:
      Car details
      Throws:
      net.andresbustamante.yafoot.commons.exceptions.DatabaseException
      net.andresbustamante.yafoot.commons.exceptions.ApplicationException - If the user is not the owner of the car. This operation is only allowed to the car's owner