Package edu.ie3.datamodel.io.source.sql
Class SqlTimeSeriesMetaInformationSource
java.lang.Object
edu.ie3.datamodel.io.source.sql.SqlDataSource<IndividualTimeSeriesMetaInformation>
edu.ie3.datamodel.io.source.sql.SqlTimeSeriesMetaInformationSource
- All Implemented Interfaces:
DataSource
,TimeSeriesMetaInformationSource
public class SqlTimeSeriesMetaInformationSource
extends SqlDataSource<IndividualTimeSeriesMetaInformation>
implements TimeSeriesMetaInformationSource
SQL implementation for retrieving
TimeSeriesMetaInformationSource
from the SQL scheme-
Field Summary
Fields inherited from class edu.ie3.datamodel.io.source.sql.SqlDataSource
log
-
Constructor Summary
ConstructorDescriptionSqlTimeSeriesMetaInformationSource
(SqlConnector connector, String schemaName, DatabaseNamingStrategy namingStrategy) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<IndividualTimeSeriesMetaInformation>
createEntity
(Map<String, String> fieldToValues) Instantiates an entity produced by this source given the required field value map.Get a mapping from time seriesUUID
to its meta informationIndividualTimeSeriesMetaInformation
getTimeSeriesMetaInformation
(UUID timeSeriesUuid) Get an option on the given time series meta informationMethods inherited from class edu.ie3.datamodel.io.source.sql.SqlDataSource
createBaseQueryString, executeQuery, getDbColumnName, getDbTables
-
Constructor Details
-
SqlTimeSeriesMetaInformationSource
public SqlTimeSeriesMetaInformationSource(SqlConnector connector, String schemaName, DatabaseNamingStrategy namingStrategy)
-
-
Method Details
-
getTimeSeriesMetaInformation
Description copied from interface:TimeSeriesMetaInformationSource
Get a mapping from time seriesUUID
to its meta informationIndividualTimeSeriesMetaInformation
- Specified by:
getTimeSeriesMetaInformation
in interfaceTimeSeriesMetaInformationSource
- Returns:
- that mapping
-
getTimeSeriesMetaInformation
public Optional<IndividualTimeSeriesMetaInformation> getTimeSeriesMetaInformation(UUID timeSeriesUuid) Description copied from interface:TimeSeriesMetaInformationSource
Get an option on the given time series meta information- Specified by:
getTimeSeriesMetaInformation
in interfaceTimeSeriesMetaInformationSource
- Parameters:
timeSeriesUuid
- Unique identifier of the time series in question- Returns:
- An Option on the meta information
-
createEntity
protected Optional<IndividualTimeSeriesMetaInformation> createEntity(Map<String, String> fieldToValues) Description copied from class:SqlDataSource
Instantiates an entity produced by this source given the required field value map.- Specified by:
createEntity
in classSqlDataSource<IndividualTimeSeriesMetaInformation>
- Parameters:
fieldToValues
- map of fields to their respective values- Returns:
- the entity if instantiation succeeds
-