程序包 com.cnosdb.impl

类 CnosDBResultMapper

java.lang.Object
com.cnosdb.impl.CnosDBResultMapper
直接已知子类:
CnosDBMapper

public class CnosDBResultMapper extends Object
Main class responsible for mapping a QueryResult to a POJO.
作者:
fmachado
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    <T> List<T>
    toPOJO(QueryResult queryResult, Class<T> clazz)
    Process a QueryResult object returned by the CnosDB 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 a QueryResult object returned by the CnosDB 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 a QueryResult object returned by the CnosDB 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 a QueryResult object returned by the CnosDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • CnosDBResultMapper

      public CnosDBResultMapper()
  • 方法详细资料

    • toPOJO

      public <T> List<T> toPOJO(QueryResult queryResult, Class<T> clazz) throws CnosDBMapperException

      Process a QueryResult object returned by the CnosDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.

      类型参数:
      T - the target type
      参数:
      queryResult - the CnosDB result object
      clazz - the Class that will be used to hold your measurement data
      返回:
      a List of objects from the same Class passed as parameter and sorted on the same order as received from CnosDB.
      抛出:
      CnosDBMapperException - If QueryResult 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 CnosDBMapperException

      Process a QueryResult object returned by the CnosDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.

      类型参数:
      T - the target type
      参数:
      queryResult - the CnosDB result object
      clazz - the Class that will be used to hold your measurement data
      precision - the time precision of results
      返回:
      a List of objects from the same Class passed as parameter and sorted on the same order as received from CnosDB.
      抛出:
      CnosDBMapperException - If QueryResult 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 CnosDBMapperException

      Process a QueryResult object returned by the CnosDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.

      类型参数:
      T - the target type
      参数:
      queryResult - the CnosDB result object
      clazz - the Class that will be used to hold your measurement data
      measurementName - name of the Measurement
      返回:
      a List of objects from the same Class passed as parameter and sorted on the same order as received from CnosDB.
      抛出:
      CnosDBMapperException - If QueryResult 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 CnosDBMapperException

      Process a QueryResult object returned by the CnosDB client inspecting the internal data structure and creating the respective object instances based on the Class passed as parameter.

      类型参数:
      T - the target type
      参数:
      queryResult - the CnosDB result object
      clazz - the Class that will be used to hold your measurement data
      measurementName - name of the Measurement
      precision - the time precision of results
      返回:
      a List of objects from the same Class passed as parameter and sorted on the same order as received from CnosDB.
      抛出:
      CnosDBMapperException - If QueryResult 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).