Merge pull request #20 from adamkulawik/feature/add-endpoint-for-current-demands

New query for current demand per day introduced
This commit is contained in:
Michał Michaluk
2018-12-21 20:12:04 +01:00
committed by GitHub

View File

@@ -16,9 +16,13 @@ import java.util.Optional;
collectionResourceRel = "demand-forecasts",
itemResourceRel = "demand-forecast")
public interface CurrentDemandDao extends ProjectionRepository<CurrentDemandEntity, Long> {
@Deprecated
@RestResource(path = "refNos", rel = "refNos")
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)
Optional<CurrentDemandEntity> findByRefNoAndDate(String refNo, LocalDate date);
}