Interface TaskDAO

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Task,Long>, org.springframework.data.jpa.repository.JpaRepository<Task,Long>, org.springframework.data.repository.PagingAndSortingRepository<Task,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Task>, org.springframework.data.repository.Repository<Task,Long>

public interface TaskDAO extends org.springframework.data.jpa.repository.JpaRepository<Task,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if the specific Task is assigned, i.e. if at least one entry of DoctorAssignment exist.

    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

    • isTaskAssigned

      @Query(value="SELECT CASE WHEN EXISTS ( SELECT * FROM doctor_assignment da WHERE da.task_task_id = ?1 LIMIT 1 ) THEN \'TRUE\' ELSE \'FALSE\' END", nativeQuery=true) boolean isTaskAssigned(Long taskId)
      Check if the specific Task is assigned, i.e. if at least one entry of DoctorAssignment exist.

      See issue #413 for further details.

      Parameters:
      taskId - task id
      Returns:
      true if found, false elsewhere.
      See Also: