[R6] Custom find by active method in patient repository
This commit is contained in:
parent
081e7bcfa3
commit
07ad8c10f0
@ -1,5 +1,7 @@
|
||||
package com.mirna.hospitalmanagementapi.domain.repositories;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import com.mirna.hospitalmanagementapi.domain.entities.Patient;
|
||||
@ -12,4 +14,11 @@ import com.mirna.hospitalmanagementapi.domain.entities.Patient;
|
||||
*/
|
||||
public interface PatientRepository extends JpaRepository<Patient, Long>{
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageable Pagination information, such as size and page number
|
||||
* @return A paginated list with active stored patients if successful, or null if there is an error
|
||||
*/
|
||||
Page<Patient> findPatientsByActiveTrue(Pageable pageable);
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user