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 Type
    Method
    Description
    Returns a list of all removal requests from assigned shift for a specific ConcreteShift and a specific User.
    Returns a list of all removal requests from assigned shift for a specific User.
    Returns a list of all requests for removal from assigned shift pending, i.e. not examined, i.e. with examined field set to false.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods 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. with examined field set to false.
      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 specific ConcreteShift and a specific User. The cardinality of this list should always be 0 or 1 (if the request exists, it is unique).
      Parameters:
      shift - assignmentId shift assignment id
      UserId - user id
      Returns:
      list, possibly empty, of removal requests from the assigned shift for the specification Shift Assignment and for the specific User
    • 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 specific User.
      Parameters:
      UserId - user id
      Returns:
      list, possibly empty, of removal requests from assigned shift for the specific User.