Interface CalendarInstanceRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,,Long> org.springframework.data.jpa.repository.JpaRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>,org.springframework.data.repository.ListCrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,,Long> org.springframework.data.repository.PagingAndSortingRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>,org.springframework.data.repository.Repository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
public interface CalendarInstanceRepository
extends org.springframework.data.jpa.repository.JpaRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>
-
Method Summary
Modifier and TypeMethodDescriptioncountOfLoansSyncedWithCalendar(Long calendarId, Collection<Integer> loanStatuses) EntityType = 3 is for loanorg.apache.fineract.portfolio.calendar.domain.CalendarInstancefindByCalendarIdAndEntityIdAndEntityTypeId(Long calendarId, Long entityId, Integer entityTypeId) Collection<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>findByCalendarIdAndEntityTypeId(Long calendarId, Integer entityTypeId) Collection<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>findByEntityIdAndEntityTypeId(Long entityId, Integer entityTypeId) org.apache.fineract.portfolio.calendar.domain.CalendarInstancefindByEntityIdAndEntityTypeIdAndCalendarTypeId(Long entityId, Integer entityTypeId, Integer calendarTypeId) List<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>findCalendarInstancesForActiveLoansByGroupIdAndClientId(Long groupId, Long clientId) Should use in clause, can I do it without creating a new class?org.apache.fineract.portfolio.calendar.domain.CalendarInstancefindCalendarInstaneByEntityId(Long entityId, Integer entityTypeId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, delete, exists, findAll, findAll, findAll, findBy, findOneMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByCalendarIdAndEntityIdAndEntityTypeId
-
findByEntityIdAndEntityTypeId
Collection<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findByEntityIdAndEntityTypeId(Long entityId, Integer entityTypeId) -
findByEntityIdAndEntityTypeIdAndCalendarTypeId
org.apache.fineract.portfolio.calendar.domain.CalendarInstance findByEntityIdAndEntityTypeIdAndCalendarTypeId(Long entityId, Integer entityTypeId, Integer calendarTypeId) - Parameters:
entityId- : Id ofClient,Group,LoanorSavingsAccount.entityTypeId- :CalendarEntityTypecalendarTypeId- :CalendarType- Returns:
-
findCalendarInstaneByEntityId
-
findByCalendarIdAndEntityTypeId
Collection<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findByCalendarIdAndEntityTypeId(Long calendarId, Integer entityTypeId) -
findCalendarInstancesForActiveLoansByGroupIdAndClientId
@Query("select ci from CalendarInstance ci where ci.entityId in (select loan.id from Loan loan where loan.client.id = :clientId and loan.group.id = :groupId and (loan.loanStatus = 100 or loan.loanStatus = 200 or loan.loanStatus = 300)) and ci.entityTypeId = 3") List<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findCalendarInstancesForActiveLoansByGroupIdAndClientId(@Param("groupId") Long groupId, @Param("clientId") Long clientId) Should use in clause, can I do it without creating a new class? -
countOfLoansSyncedWithCalendar
@Query("SELECT COUNT(ci.id) FROM CalendarInstance ci, Loan loan WHERE loan.id = ci.entityId AND ci.entityTypeId = 3 AND ci.calendar.id = :calendarId AND loan.loanStatus IN :loanStatuses ") Integer countOfLoansSyncedWithCalendar(@Param("calendarId") Long calendarId, @Param("loanStatuses") Collection<Integer> loanStatuses) EntityType = 3 is for loan
-