Package com.microsoft.azure.kusto.data
Class KustoResultMapper.Builder<R>
- java.lang.Object
-
- com.microsoft.azure.kusto.data.KustoResultMapper.Builder<R>
-
- Enclosing class:
- KustoResultMapper<R>
public static class KustoResultMapper.Builder<R> extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C> KustoResultMapper.Builder<R>addColumn(KustoType<C> type, int ordinal, boolean isNullable, BiConsumer<R,C> setter)Add a column by ordinal (column index).<C> KustoResultMapper.Builder<R>addColumn(KustoType<C> type, String name, boolean isNullable, BiConsumer<R,C> setter)Add a column by name.<C> KustoResultMapper.Builder<R>addColumn(KustoType<C> type, String name, int ordinal, boolean isNullable, BiConsumer<R,C> setter)Add a column by name and ordinal (column index).KustoResultMapper<R>build()
-
-
-
Method Detail
-
addColumn
public <C> KustoResultMapper.Builder<R> addColumn(KustoType<C> type, String name, boolean isNullable, BiConsumer<R,C> setter)
Add a column by name. Using this function will cause the KustoResultMapper to lookup the column by name once per column per call toKustoResultMapper.extractList(KustoResultSetTable)orKustoResultMapper.extractSingle(KustoResultSetTable)- Type Parameters:
C- Java type returned by the column (based on the KustoType parameter)- Parameters:
type-KustoTypereturned by the columnname- column nameisNullable- whether the column may contains null valuessetter- function for setting a cell value into a pojo instance- Returns:
KustoResultMapper.Builderof the provided type of the object being populated (determined by the object the setter belongs to)
-
addColumn
public <C> KustoResultMapper.Builder<R> addColumn(KustoType<C> type, String name, int ordinal, boolean isNullable, BiConsumer<R,C> setter)
Add a column by name and ordinal (column index). The ordinal value will be preferred for extracting values from theKustoResultSetTable.- Type Parameters:
C- Java type returned by the column (based on the KustoType parameter)- Parameters:
type-KustoTypereturned by the columnname- column nameordinal- index of the column in theisNullable- whether the column may contains null valuessetter- function for setting a cell value into a pojo instance- Returns:
KustoResultMapper.Builderof the provided type of the object being populated (determined by the object the setter belongs to)
-
addColumn
public <C> KustoResultMapper.Builder<R> addColumn(KustoType<C> type, int ordinal, boolean isNullable, BiConsumer<R,C> setter)
Add a column by ordinal (column index).- Type Parameters:
C- Java type returned by the column (based on the KustoType parameter)- Parameters:
type-KustoTypereturned by the columnordinal- index of the column in theisNullable- whether the column may contains null valuessetter- function for setting a cell value into a pojo instance- Returns:
KustoResultMapper.Builderof the provided type of the object being populated (determined by the object the setter belongs to)
-
build
public KustoResultMapper<R> build()
-
-