Package org.cswteams.ms3.dao
Interface RequestRemovalFromConcreteShiftDAO
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<RequestRemovalFromConcreteShift,,Long> org.springframework.data.jpa.repository.JpaRepository<RequestRemovalFromConcreteShift,,Long> org.springframework.data.repository.PagingAndSortingRepository<RequestRemovalFromConcreteShift,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<RequestRemovalFromConcreteShift>,org.springframework.data.repository.Repository<RequestRemovalFromConcreteShift,Long>
public interface RequestRemovalFromConcreteShiftDAO
extends org.springframework.data.jpa.repository.JpaRepository<RequestRemovalFromConcreteShift,Long>
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByAssegnazioneTurnoIdAndUtenteId(Long shift, Long UserId) Returns a list of all removal requests from assigned shift for a specificConcreteShiftand a specificUser.findAllByUser(Long UserId) Returns a list of all removal requests from assigned shift for a specificUser.Returns a list of all requests for removal from assigned shift pending, i.e. not examined, i.e. withexaminedfield set tofalse.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findOne
-
Method Details
-
findAllPending
@Query("SELECT r FROM RequestRemovalFromConcreteShift r WHERE r.isReviewed = false") List<RequestRemovalFromConcreteShift> findAllPending()Returns a list of all requests for removal from assigned shift pending, i.e. not examined, i.e. withexaminedfield set tofalse.- Returns:
- list of requests to remove from assigned shift pending
-
findAllByAssegnazioneTurnoIdAndUtenteId
@Query("SELECT r FROM RequestRemovalFromConcreteShift r WHERE r.concreteShift.id = ?1 AND r.requestingDoctor.id = ?2") List<RequestRemovalFromConcreteShift> findAllByAssegnazioneTurnoIdAndUtenteId(Long shift, Long UserId) Returns a list of all removal requests from assigned shift for a specificConcreteShiftand a specificUser. The cardinality of this list should always be 0 or 1 (if the request exists, it is unique).- Parameters:
shift- assignmentId shift assignment idUserId- user id- Returns:
- list, possibly empty, of removal requests from the assigned shift for the specification
Shift Assignmentand for the specificUser
-
findAllByUser
@Query("SELECT r FROM RequestRemovalFromConcreteShift r WHERE r.requestingDoctor.id = ?1") List<RequestRemovalFromConcreteShift> findAllByUser(Long UserId) Returns a list of all removal requests from assigned shift for a specificUser.- Parameters:
UserId- user id- Returns:
- list, possibly empty, of removal requests from assigned shift
for the specific
User.
-