Interface Record.Builder
- Enclosing interface:
- Record
public static interface Record.Builder
Allows to create a record with a fluent API. This is the unique recommended way to create a record.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Record.Builder
Mark that next entry createdwithXXXX()
will be afterentryName
in schema order.default Record.Builder
Mark that next entry createdwithXXXX()
will be beforeentryName
in schema order.build()
default Schema.Entry
removeEntry
(Schema.Entry schemaEntry) updateEntryByName
(String name, Schema.Entry schemaEntry) default Record.Builder
updateEntryByName
(String name, Schema.Entry schemaEntry, Function<Object, Object> valueCastFunction) with
(Schema.Entry entry, Object value) <T> Record.Builder
withArray
(Schema.Entry entry, Collection<T> values) withBoolean
(String name, boolean value) withBoolean
(Schema.Entry entry, boolean value) withBytes
(Schema.Entry entry, byte[] value) withDateTime
(String name, ZonedDateTime value) withDateTime
(String name, Date value) withDateTime
(Schema.Entry entry, ZonedDateTime value) withDateTime
(Schema.Entry entry, Date value) default Record.Builder
withDecimal
(String name, BigDecimal value) default Record.Builder
withDecimal
(Schema.Entry entry, BigDecimal value) withDouble
(String name, double value) withDouble
(Schema.Entry entry, double value) withFloat
(Schema.Entry entry, float value) default Record.Builder
withInstant
(String name, Instant value) default Record.Builder
withInstant
(Schema.Entry entry, Instant value) withInt
(Schema.Entry entry, int value) withLong
(Schema.Entry entry, long value) withRecord
(String name, Record value) withRecord
(Schema.Entry entry, Record value) withString
(String name, String value) withString
(Schema.Entry entry, String value) withTimestamp
(String name, long value) withTimestamp
(Schema.Entry entry, long value)
-
Method Details
-
build
-
getValue
-
getCurrentEntries
-
getEntry
-
before
Mark that next entry createdwithXXXX()
will be beforeentryName
in schema order.- Parameters:
entryName
- target entry name. This entry must exist!- Returns:
- this Builder
- See Also:
-
- Schema#naturalOrder()
- Schema#getEntriesOrdered()
- Schema#getEntriesOrdered(Comparator)
-
after
Mark that next entry createdwithXXXX()
will be afterentryName
in schema order.- Parameters:
entryName
- target entry name. This entry must exist!- Returns:
- this Builder
- See Also:
-
- Schema#naturalOrder()
- Schema#getEntriesOrdered()
- Schema#getEntriesOrdered(Comparator)
-
removeEntry
-
updateEntryByName
-
updateEntryByName
default Record.Builder updateEntryByName(String name, Schema.Entry schemaEntry, Function<Object, Object> valueCastFunction) -
with
-
withString
-
withString
-
withBytes
-
withBytes
-
withDateTime
-
withDateTime
-
withDateTime
-
withDateTime
-
withDecimal
-
withDecimal
-
withTimestamp
-
withTimestamp
-
withInstant
-
withInstant
-
withInt
-
withInt
-
withLong
-
withLong
-
withFloat
-
withFloat
-
withDouble
-
withDouble
-
withBoolean
-
withBoolean
-
withRecord
-
withRecord
- Parameters:
name
- entry name.value
- record value.- Returns:
- this builder.
- Since:
- 1.1.6
-
withArray
-