Interface RecordBuilderFactory
-
- All Superinterfaces:
Serializable
public interface RecordBuilderFactory extends Serializable
Entry point to create records (through builders).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Schema.Entry.Builder
newEntryBuilder()
default Schema.Entry.Builder
newEntryBuilder(Schema.Entry model)
Build a schema.entry from another one.Record.Builder
newRecordBuilder()
Record.Builder
newRecordBuilder(Schema schema)
Record.Builder
newRecordBuilder(Schema schema, Record record)
Enables to build a record from another one.Schema.Builder
newSchemaBuilder(Schema schema)
Build a schema from another one.Schema.Builder
newSchemaBuilder(Schema.Type type)
-
-
-
Method Detail
-
newRecordBuilder
Record.Builder newRecordBuilder(Schema schema, Record record)
Enables to build a record from another one. It is typically useful to add a column and passthrough others.- Parameters:
schema
- the schema if the output record.record
- the record to take as input.- Returns:
- a new builder initialized with the input record for all matching entries (by name).
-
newRecordBuilder
Record.Builder newRecordBuilder(Schema schema)
- Parameters:
schema
- the schema of the record to be built- Returns:
- a builder to create a new record and enforce the built record to respect a static schema. If the entries don't match the schema the build call will fail.
-
newRecordBuilder
Record.Builder newRecordBuilder()
- Returns:
- a builder to create a new record.
-
newSchemaBuilder
Schema.Builder newSchemaBuilder(Schema.Type type)
- Parameters:
type
- the schema type.- Returns:
- a builder to create a schema.
-
newSchemaBuilder
Schema.Builder newSchemaBuilder(Schema schema)
Build a schema from another one. Typically useful to add a column and letting others passthrough.- Parameters:
schema
- the input schema.- Returns:
- a new schema builder intialized with the input schema.
-
newEntryBuilder
Schema.Entry.Builder newEntryBuilder()
- Returns:
- a builder to create a schema entry.
-
newEntryBuilder
default Schema.Entry.Builder newEntryBuilder(Schema.Entry model)
Build a schema.entry from another one. Useful to duplicate a column with some changes.- Parameters:
model
- : model of entry to copy.- Returns:
- entry builder with model parameters.
-
-