Package org.cswteams.ms3.dao
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>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisTaskAssigned(Long taskId) Check if the specificTaskis assigned, i.e. if at least one entry ofDoctorAssignmentexist.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
-
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 specificTaskis assigned, i.e. if at least one entry ofDoctorAssignmentexist.See issue #413 for further details.
- Parameters:
taskId- task id- Returns:
trueif found,falseelsewhere.- See Also:
-