@Repository public interface DonationMasterRepository extends org.springframework.data.jpa.repository.JpaRepository<DonationMaster,Long>
| Modifier and Type | Method and Description |
|---|---|
List<DonationMaster> |
findAllByPropertyType(PropertyType propertyType) |
DonationMaster |
findByPropertyTypeAndActive(PropertyType propertyType,
boolean active) |
DonationMaster |
findByPropertyTypeAndFromDateAndActive(PropertyType propertyType,
Date fromDate,
boolean active) |
List<Date> |
findFromDateByPropertyType(PropertyType propertyType) |
BigDecimal |
getDonationAmountByNoOfClosetsAndPropertytypeForCurrentDate(Integer noofclosets,
PropertyType propertyType) |
DonationDetailMaster |
getDonationDetailMasterByNoOfClosetsAndPropertytypeForCurrentDate(PropertyType propertyType,
Integer noofclosets) |
List<DonationMaster> |
getLatestActiveRecordByPropertyTypeAndActive(PropertyType propertyType,
boolean active,
Date date) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllList<DonationMaster> findAllByPropertyType(PropertyType propertyType)
DonationMaster findByPropertyTypeAndFromDateAndActive(PropertyType propertyType, Date fromDate, boolean active)
DonationMaster findByPropertyTypeAndActive(PropertyType propertyType, boolean active)
@Query(value="select ddm.amount from DonationDetailMaster ddm where ddm.donation.propertyType =:propertyType and ddm.noOfClosets =:noofclosets and ddm.donation.active = true and ddm.donation.fromDate <= current_date and (ddm.donation.toDate >= current_date or ddm.donation.toDate is null)") BigDecimal getDonationAmountByNoOfClosetsAndPropertytypeForCurrentDate(@Param(value="noofclosets") Integer noofclosets, @Param(value="propertyType") PropertyType propertyType)
@Query(value="select D from DonationMaster D where D.propertyType=:propertyType and D.active=:active and ( D.fromDate<=:date or (D.toDate is null or D.toDate<=:date)) order by D.fromDate desc") List<DonationMaster> getLatestActiveRecordByPropertyTypeAndActive(@Param(value="propertyType") PropertyType propertyType, @Param(value="active") boolean active, @Param(value="date") Date date)
@Query(value="select distinct(D.fromDate) from DonationMaster D where D.propertyType=:propertyType order by D.fromDate asc") List<Date> findFromDateByPropertyType(@Param(value="propertyType") PropertyType propertyType)
@Query(value="select ddm from DonationDetailMaster ddm where ddm.donation.propertyType =:propertyType and ddm.noOfClosets =:noofclosets and ddm.donation.active = true and ddm.donation.fromDate <=current_date and (ddm.donation.toDate >= current_date or ddm.donation.toDate is null)") DonationDetailMaster getDonationDetailMasterByNoOfClosetsAndPropertytypeForCurrentDate(@Param(value="propertyType") PropertyType propertyType, @Param(value="noofclosets") Integer noofclosets)
Copyright © 2015–2016 eGovernments Foundation. All rights reserved.