Class InfluxDBResultMapper
- Direct Known Subclasses:
InfluxDBMapper
public class InfluxDBResultMapper extends Object
- Author:
- fmachado
-
Constructor Summary
Constructors Constructor Description InfluxDBResultMapper()
-
Method Summary
Modifier and Type Method Description <T> List<T>
toPOJO(QueryResult queryResult, Class<T> clazz)
Process aQueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.<T> List<T>
toPOJO(QueryResult queryResult, Class<T> clazz, String measurementName)
Process aQueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.<T> List<T>
toPOJO(QueryResult queryResult, Class<T> clazz, String measurementName, TimeUnit precision)
Process aQueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.<T> List<T>
toPOJO(QueryResult queryResult, Class<T> clazz, TimeUnit precision)
Process aQueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.
-
Constructor Details
-
InfluxDBResultMapper
public InfluxDBResultMapper()
-
-
Method Details
-
toPOJO
Process a
QueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.- Type Parameters:
T
- the target type- Parameters:
queryResult
- the InfluxDB result objectclazz
- the Class that will be used to hold your measurement data- Returns:
- a
List
of objects from the same Class passed as parameter and sorted on the same order as received from InfluxDB. - Throws:
InfluxDBMapperException
- IfQueryResult
parameter contain errors,clazz
parameter is not annotated with @Measurement or it was not possible to define the values of your POJO (e.g. due to an unsupported field type).
-
toPOJO
public <T> List<T> toPOJO(QueryResult queryResult, Class<T> clazz, TimeUnit precision) throws InfluxDBMapperExceptionProcess a
QueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.- Type Parameters:
T
- the target type- Parameters:
queryResult
- the InfluxDB result objectclazz
- the Class that will be used to hold your measurement dataprecision
- the time precision of results- Returns:
- a
List
of objects from the same Class passed as parameter and sorted on the same order as received from InfluxDB. - Throws:
InfluxDBMapperException
- IfQueryResult
parameter contain errors,clazz
parameter is not annotated with @Measurement or it was not possible to define the values of your POJO (e.g. due to an unsupported field type).
-
toPOJO
public <T> List<T> toPOJO(QueryResult queryResult, Class<T> clazz, String measurementName) throws InfluxDBMapperExceptionProcess a
QueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.- Type Parameters:
T
- the target type- Parameters:
queryResult
- the InfluxDB result objectclazz
- the Class that will be used to hold your measurement datameasurementName
- name of the Measurement- Returns:
- a
List
of objects from the same Class passed as parameter and sorted on the same order as received from InfluxDB. - Throws:
InfluxDBMapperException
- IfQueryResult
parameter contain errors,clazz
parameter is not annotated with @Measurement or it was not possible to define the values of your POJO (e.g. due to an unsupported field type).
-
toPOJO
public <T> List<T> toPOJO(QueryResult queryResult, Class<T> clazz, String measurementName, TimeUnit precision) throws InfluxDBMapperExceptionProcess a
QueryResult
object returned by the InfluxDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.- Type Parameters:
T
- the target type- Parameters:
queryResult
- the InfluxDB result objectclazz
- the Class that will be used to hold your measurement datameasurementName
- name of the Measurementprecision
- the time precision of results- Returns:
- a
List
of objects from the same Class passed as parameter and sorted on the same order as received from InfluxDB. - Throws:
InfluxDBMapperException
- IfQueryResult
parameter contain errors,clazz
parameter is not annotated with @Measurement or it was not possible to define the values of your POJO (e.g. due to an unsupported field type).
-