@Repository public interface SewerageRatesMasterRepository extends org.springframework.data.jpa.repository.JpaRepository<SewerageRatesMaster,Long>
| Modifier and Type | Method and Description |
|---|---|
List<SewerageRatesMaster> |
findAllByPropertyType(PropertyType propertyType) |
SewerageRatesMaster |
findByPropertyTypeAndActive(PropertyType propertyType,
boolean active) |
SewerageRatesMaster |
findByPropertyTypeAndFromDateAndActive(PropertyType propertyType,
Date fromDate,
boolean active) |
List<Date> |
findFromDateByPropertyType(PropertyType propertyType) |
List<SewerageRatesMaster> |
getLatestActiveRecord(PropertyType propertyType,
boolean active,
Date date) |
Double |
getSewerageMonthlyRatesByPropertytype(PropertyType propertyType) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllList<SewerageRatesMaster> findAllByPropertyType(PropertyType propertyType)
SewerageRatesMaster findByPropertyTypeAndFromDateAndActive(PropertyType propertyType, Date fromDate, boolean active)
SewerageRatesMaster findByPropertyTypeAndActive(PropertyType propertyType, boolean active)
@Query(value="select srm.monthlyRate from SewerageRatesMaster srm where srm.propertyType =:propertyType and srm.active = true and srm.fromDate <=current_date and (srm.toDate >= current_date or srm.toDate is null)") Double getSewerageMonthlyRatesByPropertytype(@Param(value="propertyType") PropertyType propertyType)
@Query(value="select S from SewerageRatesMaster S where S.propertyType=:propertyType and S.active=:active and (S.fromDate<=:date or (S.toDate is null or S.toDate<=:date)) order by S.fromDate desc") List<SewerageRatesMaster> getLatestActiveRecord(@Param(value="propertyType") PropertyType propertyType, @Param(value="active") boolean active, @Param(value="date") Date date)
@Query(value="select distinct(S.fromDate) from SewerageRatesMaster S where S.propertyType=:propertyType order by S.fromDate asc") List<Date> findFromDateByPropertyType(@Param(value="propertyType") PropertyType propertyType)
Copyright © 2015–2016 eGovernments Foundation. All rights reserved.