Interface DataNeedCalculationService<T extends DataNeedInterface>
- Type Parameters:
T- Should always beDataNeed, but this is only available in the core itself.
- All Known Implementing Classes:
DataNeedCalculationServiceImpl
public interface DataNeedCalculationService<T extends DataNeedInterface>
Used to by a region-connector to calculate start and end data of a data need, as well as reporting if it supports a
certain data need.
-
Method Summary
Modifier and TypeMethodDescriptionCalculate relevant information for a given data need IDcalculate(String dataNeedId, ZonedDateTime referenceDateTime) Calculates relevant information for given data need ID, using the reference datetimeCalculates relevant information for a data needcalculate(T dataNeed, ZonedDateTime referenceDateTime) Calculates relevant information for a data need, using the reference datetimecalculateAll(Set<String> dataNeedIds) Calculates the relevant information for multiple given data need IDs.calculateAll(Set<String> dataNeedIds, ZonedDateTime referenceDateTime) Calculates the relevant information for multiple given data need IDs, using the reference datetime.The id of the region-connector that provides the implementation of this service.
-
Method Details
-
calculate
Calculates relevant information for a data need- Parameters:
dataNeed- the data need- Returns:
- the calculation results for the data need
-
calculate
Calculates relevant information for a data need, using the reference datetime- Parameters:
dataNeed- the data needreferenceDateTime- the reference datetime the calculations are based on- Returns:
- the calculation results for the data need
-
calculate
Calculate relevant information for a given data need ID- Parameters:
dataNeedId- the ID of the data need- Returns:
- the calculation results for the data need
-
calculate
Calculates relevant information for given data need ID, using the reference datetime- Parameters:
dataNeedId- the ID of the data needreferenceDateTime- the reference datetime the calculations are based on- Returns:
- the calculation results for the data need
-
calculateAll
Calculates the relevant information for multiple given data need IDs.- Parameters:
dataNeedIds- the ID of the data needs- Returns:
- a Map of the calculations, where the key is the data need ID and the value the calculation result.
-
calculateAll
MultipleDataNeedCalculationResult calculateAll(Set<String> dataNeedIds, ZonedDateTime referenceDateTime) Calculates the relevant information for multiple given data need IDs, using the reference datetime.- Parameters:
dataNeedIds- the ID of the data needsreferenceDateTime- the reference datetime the calculations are based on- Returns:
- a Map of the calculations, where the key is the data need ID and the value the calculation result.
-
regionConnectorId
String regionConnectorId()The id of the region-connector that provides the implementation of this service.- Returns:
- region-connector id
-