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>
@Repository
@CacheConfig(cacheNames="calendarInstances")
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<org.apache.fineract.portfolio.loanaccount.domain.LoanStatus> loanStatuses) EntityType = 3 is for loanvoiddelete(org.apache.fineract.portfolio.calendar.domain.CalendarInstance entity) voidvoiddeleteAll(Iterable<? extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance> entities) voiddeleteAllById(Iterable<? extends Long> ids) voiddeleteById(Long id) org.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) org.apache.fineract.portfolio.calendar.domain.CalendarInstancefindCalendarInstanceByEntityId(Long entityId, Integer entityTypeId) List<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findCalendarInstancesForLoansByGroupIdAndClientIdAndStatuses(Long groupId, Long clientId, Collection<org.apache.fineract.portfolio.loanaccount.domain.LoanStatus> loanStatuses) Should use in clause, can I do it without creating a new class?<S extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance>
Ssave(S entity) <S extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance>
List<S> <S extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance>
SsaveAndFlush(S entity) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, existsById, findByIdMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlushMethods 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, findAllByIdMethods 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
@Cacheable(key="\'entityId_\' + #entityId + \'_entityTypeId_\' + #entityTypeId") Collection<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findByEntityIdAndEntityTypeId(Long entityId, Integer entityTypeId) -
findByEntityIdAndEntityTypeIdAndCalendarTypeId
@Cacheable(key="\'entityId_\' + #entityId + \'_entityTypeId_\' + #entityTypeId + \'_calendarTypeId_\' + #calendarTypeId") org.apache.fineract.portfolio.calendar.domain.CalendarInstance findByEntityIdAndEntityTypeIdAndCalendarTypeId(Long entityId, Integer entityTypeId, Integer calendarTypeId) - Parameters:
entityId- : Id ofClient,Group,LoanorSavingsAccount.entityTypeId- :CalendarEntityTypecalendarTypeId- :CalendarType- Returns:
-
findCalendarInstanceByEntityId
@Cacheable(key="\'findCalendarInstanceByEntityId_entityId_\' + #entityId + \'_entityTypeId_\' + #entityTypeId") @Query("select ci from CalendarInstance ci where ci.entityId = :entityId and ci.entityTypeId = :entityTypeId") org.apache.fineract.portfolio.calendar.domain.CalendarInstance findCalendarInstanceByEntityId(@Param("entityId") Long entityId, @Param("entityTypeId") Integer entityTypeId) -
findByCalendarIdAndEntityTypeId
@Cacheable(key="\'calendarId_\' + #calendarId + \'_entityTypeId_\' + #entityTypeId") Collection<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findByCalendarIdAndEntityTypeId(Long calendarId, Integer entityTypeId) -
findCalendarInstancesForLoansByGroupIdAndClientIdAndStatuses
@Cacheable(key="\'groupId_\' + #groupId + \'_clientId_\' + #clientId + \'_statuses_\' + T(org.springframework.util.StringUtils).collectionToCommaDelimitedString(#loanStatuses)") @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 in :loanStatuses) and ci.entityTypeId = 3") List<org.apache.fineract.portfolio.calendar.domain.CalendarInstance> findCalendarInstancesForLoansByGroupIdAndClientIdAndStatuses(@Param("groupId") Long groupId, @Param("clientId") Long clientId, @Param("loanStatuses") Collection<org.apache.fineract.portfolio.loanaccount.domain.LoanStatus> loanStatuses) Should use in clause, can I do it without creating a new class? -
countOfLoansSyncedWithCalendar
@Cacheable(key="\'countLoans_calendarId_\' + #calendarId + \'_statuses_\' + T(org.springframework.util.StringUtils).collectionToCommaDelimitedString(#loanStatuses)") @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<org.apache.fineract.portfolio.loanaccount.domain.LoanStatus> loanStatuses) EntityType = 3 is for loan -
save
@CacheEvict(allEntries=true) <S extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance> S save(S entity) - Specified by:
savein interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
saveAll
@CacheEvict(allEntries=true) <S extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance> List<S> saveAll(Iterable<S> entities) - Specified by:
saveAllin interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long> - Specified by:
saveAllin interfaceorg.springframework.data.repository.ListCrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
delete
@CacheEvict(allEntries=true) void delete(org.apache.fineract.portfolio.calendar.domain.CalendarInstance entity) - Specified by:
deletein interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
deleteById
- Specified by:
deleteByIdin interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
deleteAll
@CacheEvict(allEntries=true) void deleteAll()- Specified by:
deleteAllin interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
deleteAll
@CacheEvict(allEntries=true) void deleteAll(Iterable<? extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance> entities) - Specified by:
deleteAllin interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
deleteAllById
- Specified by:
deleteAllByIdin interfaceorg.springframework.data.repository.CrudRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-
saveAndFlush
@CacheEvict(allEntries=true) <S extends org.apache.fineract.portfolio.calendar.domain.CalendarInstance> S saveAndFlush(S entity) - Specified by:
saveAndFlushin interfaceorg.springframework.data.jpa.repository.JpaRepository<org.apache.fineract.portfolio.calendar.domain.CalendarInstance,Long>
-