Class PassengerService

java.lang.Object
com.unosquare.carmigo.service.PassengerService

@Service public class PassengerService extends Object
Handles requests regarding the Passenger entity.
  • Field Details

  • Constructor Details

    • PassengerService

      public PassengerService()
  • Method Details

    • createPassengerById

      @CachePut(value="passenger", key="#result.id") public PassengerResponse createPassengerById(int platformUserId)
      Creates a passenger.
      Parameters:
      platformUserId - the platform user id to create a passenger.
      Returns:
      a PassengerResponse.
    • getPassengerById

      @Cacheable(value="passenger", key="#passengerId") public PassengerResponse getPassengerById(int passengerId)
      Fetches a passenger.
      Parameters:
      passengerId - the passenger id to search for.
      Returns:
      a PassengerResponse.
    • deletePassengerById

      @CacheEvict(value="passenger", key="#passengerId") public void deletePassengerById(int passengerId)
      Deletes a passenger. The platform user is not affected.
      Parameters:
      passengerId - the passenger id to be deleted.