Package com.unosquare.carmigo.service
Class PassengerService
java.lang.Object
com.unosquare.carmigo.service.PassengerService
Handles requests regarding the
Passenger
entity.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePassengerById
(int platformUserId) Creates a passenger.void
deletePassengerById
(int passengerId) Deletes a passenger.getPassengerById
(int passengerId) Fetches a passenger.
-
Field Details
-
PASSENGER_NOT_FOUND
- See Also:
-
-
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.
-