public interface RecordService
| Modifier and Type | Method and Description |
|---|---|
Record |
create(Schema schema,
Record fallbackRecord,
BiFunction<Schema.Entry,Record.Builder,Boolean> customHandler,
BiConsumer<Record.Builder,Boolean> beforeFinish)
Shortcut to build a record using
toRecord(Schema, Record, BiFunction, BiConsumer). |
boolean |
forwardEntry(Record source,
Record.Builder builder,
String sourceColumn,
Schema.Entry entry)
Forward an entry from the source record if it exists.
|
<T> T |
toObject(Record data,
Class<T> expected)
Simple mapper of record to pojo.
|
Collector<Schema.Entry,Record.Builder,Record> |
toRecord(Schema schema,
Record fallbackRecord,
BiFunction<Schema.Entry,Record.Builder,Boolean> customHandler,
BiConsumer<Record.Builder,Boolean> beforeFinish)
Method providing a collector enabling to create a record from another one in a custom fashion.
|
<T> Record |
toRecord(T data)
Simple mapper of data to record.
|
<T> T |
visit(RecordVisitor<T> visitor,
Record record)
Visit a record with a custom visitor.
|
<T> T toObject(Record data, Class<T> expected)
T - the pojo type (optional).data - record to map to pojo.expected - : class expected.<T> Record toRecord(T data)
T - the pojo type (optional).data - pojo to map to record.boolean forwardEntry(Record source, Record.Builder builder, String sourceColumn, Schema.Entry entry)
source - the source record to read data from.builder - the current builder to fill.sourceColumn - the column name.entry - the entry to use for the output column.Collector<Schema.Entry,Record.Builder,Record> toRecord(Schema schema, Record fallbackRecord, BiFunction<Schema.Entry,Record.Builder,Boolean> customHandler, BiConsumer<Record.Builder,Boolean> beforeFinish)
schema - the schema of the record being built.fallbackRecord - the source record used when the custom handler does not handle current entry.customHandler - a processor of entry enabling to inject custom data in the record being built.beforeFinish - a callback before the record is actually built, it enables to add data if not already there.Record create(Schema schema, Record fallbackRecord, BiFunction<Schema.Entry,Record.Builder,Boolean> customHandler, BiConsumer<Record.Builder,Boolean> beforeFinish)
toRecord(Schema, Record, BiFunction, BiConsumer).schema - the schema of the record being built.fallbackRecord - the source record used when the custom handler does not handle current entry.customHandler - a processor of entry enabling to inject custom data in the record being built.beforeFinish - a callback before the record is actually built, it enables to add data if not already there.<T> T visit(RecordVisitor<T> visitor, Record record)
T - the visitor returned type.visitor - the visitor to use to browse the record.1.1.27 - Copyright © 2019 Talend Component Kit Documentation