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 Type
    Method
    Description
    EntityType = 3 is for loan
    org.apache.fineract.portfolio.calendar.domain.CalendarInstance
    findByCalendarIdAndEntityIdAndEntityTypeId(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.CalendarInstance
    findByEntityIdAndEntityTypeIdAndCalendarTypeId(Long entityId, Integer entityTypeId, Integer calendarTypeId)
     
    List<org.apache.fineract.portfolio.calendar.domain.CalendarInstance>
    Should use in clause, can I do it without creating a new class?
    org.apache.fineract.portfolio.calendar.domain.CalendarInstance
    findCalendarInstaneByEntityId(Long entityId, Integer entityTypeId)
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    count, delete, exists, findAll, findAll, findAll, findBy, findOne

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByCalendarIdAndEntityIdAndEntityTypeId

      org.apache.fineract.portfolio.calendar.domain.CalendarInstance findByCalendarIdAndEntityIdAndEntityTypeId(Long calendarId, Long entityId, Integer entityTypeId)
    • 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 of Client, Group, Loan or SavingsAccount.
      entityTypeId - : CalendarEntityType
      calendarTypeId - : CalendarType
      Returns:
    • findCalendarInstaneByEntityId

      @Query("select ci from CalendarInstance ci where ci.entityId = :entityId and ci.entityTypeId = :entityTypeId") org.apache.fineract.portfolio.calendar.domain.CalendarInstance findCalendarInstaneByEntityId(@Param("entityId") Long entityId, @Param("entityTypeId") Integer entityTypeId)
    • 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