Skip to content

Commit

Permalink
PI-1561 Handle multiple Duty to Refer NSIs (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Oct 16, 2023
1 parent 4aee48b commit 4e704e7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import jakarta.persistence.Table
import org.hibernate.annotations.Immutable
import org.hibernate.annotations.Where
import org.springframework.data.annotation.CreatedDate
import org.springframework.data.domain.PageRequest
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Query
import java.time.LocalDate
Expand Down Expand Up @@ -100,7 +101,7 @@ interface NsiRepository : JpaRepository<Nsi, Long> {
order by nsi.createdDatetime desc
"""
)
fun findDutyToReferByCrn(crn: String): Nsi?
fun findDutyToReferByCrn(crn: String, page: PageRequest = PageRequest.of(0, 1)): Nsi?

@Query(
"""
Expand All @@ -113,5 +114,5 @@ interface NsiRepository : JpaRepository<Nsi, Long> {
order by nsi.createdDatetime desc
"""
)
fun findDutyToReferByNoms(noms: String): Nsi?
fun findDutyToReferByNoms(noms: String, page: PageRequest = PageRequest.of(0, 1)): Nsi?
}

0 comments on commit 4e704e7

Please sign in to comment.