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
-
-
-
Method Detail
-
getCurrentEntries
List<Schema.Entry> getCurrentEntries()
-
getEntry
default Schema.Entry getEntry(String name)
-
before
default Record.Builder before(String entryName)
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
default Record.Builder after(String entryName)
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
Record.Builder removeEntry(Schema.Entry schemaEntry)
-
updateEntryByName
Record.Builder updateEntryByName(String name, Schema.Entry schemaEntry)
-
updateEntryByName
default Record.Builder updateEntryByName(String name, Schema.Entry schemaEntry, Function<Object,Object> valueCastFunction)
-
with
Record.Builder with(Schema.Entry entry, Object value)
-
withString
Record.Builder withString(String name, String value)
-
withString
Record.Builder withString(Schema.Entry entry, String value)
-
withBytes
Record.Builder withBytes(String name, byte[] value)
-
withBytes
Record.Builder withBytes(Schema.Entry entry, byte[] value)
-
withDateTime
Record.Builder withDateTime(String name, Date value)
-
withDateTime
Record.Builder withDateTime(Schema.Entry entry, Date value)
-
withDateTime
Record.Builder withDateTime(String name, ZonedDateTime value)
-
withDateTime
Record.Builder withDateTime(Schema.Entry entry, ZonedDateTime value)
-
withDecimal
default Record.Builder withDecimal(String name, BigDecimal value)
-
withDecimal
default Record.Builder withDecimal(Schema.Entry entry, BigDecimal value)
-
withTimestamp
Record.Builder withTimestamp(String name, long value)
-
withTimestamp
Record.Builder withTimestamp(Schema.Entry entry, long value)
-
withInt
Record.Builder withInt(String name, int value)
-
withInt
Record.Builder withInt(Schema.Entry entry, int value)
-
withLong
Record.Builder withLong(String name, long value)
-
withLong
Record.Builder withLong(Schema.Entry entry, long value)
-
withFloat
Record.Builder withFloat(String name, float value)
-
withFloat
Record.Builder withFloat(Schema.Entry entry, float value)
-
withDouble
Record.Builder withDouble(String name, double value)
-
withDouble
Record.Builder withDouble(Schema.Entry entry, double value)
-
withBoolean
Record.Builder withBoolean(String name, boolean value)
-
withBoolean
Record.Builder withBoolean(Schema.Entry entry, boolean value)
-
withRecord
Record.Builder withRecord(Schema.Entry entry, Record value)
-
withRecord
Record.Builder withRecord(String name, Record value)
- Parameters:
name
- entry name.value
- record value.- Returns:
- this builder.
- Since:
- 1.1.6
-
withArray
<T> Record.Builder withArray(Schema.Entry entry, Collection<T> values)
-
-