@Repository public interface BudgetDefinitionRepository extends org.springframework.data.jpa.repository.JpaRepository<Budget,Long>
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllList<Budget> findByFinancialYearIdOrderByFinancialYearIdAscNameAsc(Long id)
List<Budget> findByIsbereIsOrderByFinancialYearIdAscNameAsc(String isBere)
List<Budget> findByIsbereIsAndFinancialYearIdIsOrderByFinancialYearIdAscNameAsc(String bere, Long id)
@Query(value="from Budget be where isActiveBudget=true and isbere =:isbere and financialYear.id=:financialYearId and id not in :rbIds") List<Budget> findReferenceBudget(@Param(value="isbere") String isbere, @Param(value="financialYearId") Long financialYearId, @Param(value="rbIds") List<Long> rbIds)
List<Budget> findByIsActiveBudgetTrueAndIsbereIsAndFinancialYearIdIs(String isbere, Long financialYearId)
List<Budget> findByIsbereIsAndFinancialYearIdIsAndIdNotIn(String isbere, Long financialYearId, List<Long> rbId)
List<Budget> findByIsbereIsAndFinancialYearIdIsAndIsPrimaryBudgetTrueAndParentIsNull(String isbere, Long financialYearId)
List<Budget> findByFinancialYearIdIsOrderByFinancialYearIdAscNameAsc(Long financialYearId)
@Query(value="select count(b) from Budget b where b.status.id =:statusId") Long countBudget(Integer statusId)
Long countByIdNotInAndStatusIdInAndFinancialYearIdIsAndIsbereIs(List<Long> budgetId, Integer statusId, Long financialYearId, String bere)
Long countByStatusIdInAndFinancialYearIdIsAndIsbereIsAndIdIn(Integer statusId, Long financialYearId, String bere, List<Long> budgetId)
Long countByIdNotInAndFinancialYearIdIs(List<Long> budgetId, Long financialYearId)
@Query(value="select count(b) from Budget b where parent is null") Long getRootBudgetsCount()
@Query(value="select count(b) from Budget b where parent=:parent") Long getChildBudgetsCount(@Param(value="parent") Budget parent)
@Query(value="select bd.referenceBudget.id from Budget bd where bd.referenceBudget.id is not null and bd.financialYear.id=:financialYearId") List<Long> getReferenceBudgetIds(@Param(value="financialYearId") Long financialYearId)
Long countByIdNotInAndFinancialYearIdIsAndIsbereIs(List<Long> budgetId, Long financialYearId, String bere)
@Query(value="select distinct bg.parent.id from Budget bg, Budget bd where bg.parent=bd.id and (bg.parent is not null)") List<Long> findParentBudget()
Long countByStatusIdNotInAndFinancialYearIdIsAndIsbereIsAndIdNotIn(Integer statusId, Long financialYearId, String bere, List<Long> budgetId)
@Query(value="select count(b) from Budget b where b.materializedPath like :path||\'%\' and b.status.code not in (\'Approved\')") Long countNotApprovedBudgetByMaterializedPath(@Param(value="path") String path)
Copyright © 2015–2017 eGovernments Foundation. All rights reserved.