Class WorkerQueryServiceImpl
java.lang.Object
it.univr.passportease.service.worker.impl.WorkerQueryServiceImpl
- All Implemented Interfaces:
WorkerQueryService
Implementation of
WorkerQueryService
.-
Field Summary
Modifier and TypeFieldDescriptionprivate final RequestTypeRepository
Repository ofRequestType
entities.private final ReservationRepository
Repository ofAvailability
entities. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet all theRequestType
.Get theRequest
associated to theAvailability
with the given id.
-
Field Details
-
requestTypeRepository
Repository ofRequestType
entities. -
reservationRepository
Repository ofAvailability
entities.
-
-
Constructor Details
-
WorkerQueryServiceImpl
public WorkerQueryServiceImpl()
-
-
Method Details
-
getAllRequestTypes
@PreAuthorize("hasAuthority(\'WORKER\') && hasAuthority(\'VALIDATED\')") public List<RequestType> getAllRequestTypes()Get all theRequestType
.- Specified by:
getAllRequestTypes
in interfaceWorkerQueryService
- Returns:
- a list of all the
RequestType
.
-
getRequestByAvailabilityID
@PreAuthorize("hasAuthority(\'WORKER\') && hasAuthority(\'VALIDATED\')") public Request getRequestByAvailabilityID(String id) throws InvalidAvailabilityIDException Get theRequest
associated to theAvailability
with the given id.- Specified by:
getRequestByAvailabilityID
in interfaceWorkerQueryService
- Parameters:
id
- theAvailability
id.- Returns:
- the
Request
associated to theAvailability
with the given id. - Throws:
InvalidAvailabilityIDException
- if the given id is not valid.
-