new query for current demand per day introduced

This commit is contained in:
Adam Kulawik
2018-11-02 21:54:40 +01:00
parent 9e93d7e778
commit 6e3e79db46

View File

@@ -16,9 +16,13 @@ import java.util.Optional;
collectionResourceRel = "demand-forecasts", collectionResourceRel = "demand-forecasts",
itemResourceRel = "demand-forecast") itemResourceRel = "demand-forecast")
public interface CurrentDemandDao extends ProjectionRepository<CurrentDemandEntity, Long> { public interface CurrentDemandDao extends ProjectionRepository<CurrentDemandEntity, Long> {
@Deprecated
@RestResource(path = "refNos", rel = "refNos") @RestResource(path = "refNos", rel = "refNos")
List<CurrentDemandEntity> findByRefNoAndDateGreaterThanEqual(@Param("refNo") String refNo, @Param("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date); List<CurrentDemandEntity> findByRefNoAndDateGreaterThanEqual(@Param("refNo") String refNo, @Param("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date);
@RestResource(path = "byDate")
List<CurrentDemandEntity> findByDate(LocalDate date);
@RestResource(exported = false) @RestResource(exported = false)
Optional<CurrentDemandEntity> findByRefNoAndDate(String refNo, LocalDate date); Optional<CurrentDemandEntity> findByRefNoAndDate(String refNo, LocalDate date);
} }