Interface GenericRecordBuilder
GenericRecord
instances.- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static GenericRecordBuilder
/** Creates a Builder that will build aGenericRecord
inCompact
format with the given type name and schema:static GenericRecordBuilder
portable
(ClassDefinition classDefinition) Creates a Builder that will build aGenericRecord
inPortable
format with a new class definition:setArrayOfBoolean
(String fieldName, boolean[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfChar
(String fieldName, char[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfDate
(String fieldName, LocalDate[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfDecimal
(String fieldName, BigDecimal[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfFloat32
(String fieldName, float[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfFloat64
(String fieldName, double[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfGenericRecord
(String fieldName, GenericRecord[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfInt16
(String fieldName, short[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfInt32
(String fieldName, int[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfInt64
(String fieldName, long[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfInt8
(String fieldName, byte[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableBoolean
(String fieldName, Boolean[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableFloat32
(String fieldName, Float[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableFloat64
(String fieldName, Double[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableInt16
(String fieldName, Short[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableInt32
(String fieldName, Integer[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableInt64
(String fieldName, Long[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfNullableInt8
(String fieldName, Byte[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfString
(String fieldName, String[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfTime
(String fieldName, LocalTime[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfTimestamp
(String fieldName, LocalDateTime[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setArrayOfTimestampWithTimezone
(String fieldName, OffsetDateTime[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setBoolean
(String fieldName, boolean value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.Sets a date field consisting of year, month of the year, and day of the month.setDecimal
(String fieldName, BigDecimal value) Sets a decimal which is arbitrary precision and scale floating-point number.setFloat32
(String fieldName, float value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setFloat64
(String fieldName, double value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setGenericRecord
(String fieldName, GenericRecord value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableBoolean
(String fieldName, Boolean value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableFloat32
(String fieldName, Float value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableFloat64
(String fieldName, Double value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableInt16
(String fieldName, Short value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableInt32
(String fieldName, Integer value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableInt64
(String fieldName, Long value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.setNullableInt8
(String fieldName, Byte value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
.Sets a time field consisting of hour, minute, seconds, and nanos parts.setTimestamp
(String fieldName, LocalDateTime value) Sets a timestamp field consisting of year, month of the year, and day of the month, hour, minute, seconds, nanos parts.setTimestampWithTimezone
(String fieldName, OffsetDateTime value) Sets a timestamp with timezone field consisting of year, month of the year and day of the month, offset seconds, hour, minute, seconds, nanos parts.
-
Method Details
-
portable
Creates a Builder that will build aGenericRecord
inPortable
format with a new class definition:ClassDefinition classDefinition = new ClassDefinitionBuilder(FACTORY_ID, CLASS_ID) .addStringField("name") .addIntField("id") .build(); GenericRecord genericRecord = GenericRecordBuilder.portable(classDefinition) .setString("name", "foo") .setInt32("id", 123) .build();
- Parameters:
classDefinition
- of the Portable that will be created- Returns:
- GenericRecordBuilder for Portable format
-
compact
/** Creates a Builder that will build aGenericRecord
inCompact
format with the given type name and schema:GenericRecord genericRecord = GenericRecordBuilder.compact("typeName") .setString("name", "foo") .setInt32("id", 123) .build();
- Parameters:
typeName
- of the schema- Returns:
- GenericRecordBuilder for Compact format
-
build
- Returns:
- a new constructed GenericRecord
- Throws:
HazelcastSerializationException
- when the GenericRecord cannot be built.
-
setBoolean
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setInt8
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setChar
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its class definition. It should be composed of only alphanumeric characters.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the class definition or the type of the field does not match the one in the class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setInt16
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setInt32
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setInt64
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setFloat32
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setFloat64
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableBoolean
@Nonnull GenericRecordBuilder setNullableBoolean(@Nonnull String fieldName, @Nullable Boolean value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableInt8
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableInt16
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableInt32
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableInt64
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableFloat32
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setNullableFloat64
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setString
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setGenericRecord
@Nonnull GenericRecordBuilder setGenericRecord(@Nonnull String fieldName, @Nullable GenericRecord value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. This method allows nested structures. Subclass should also be created as `GenericRecord`.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- 1. if the field name does not exist in the schema/class definition. 2. The type of the field does not match the one in the schema/class definition. 3. The same field is trying to be set without usingGenericRecord.newBuilderWithClone()
. 4. The type of the generic record is not the same as the generic record that is being built. e.g using portable generic record in a compact generic record builder.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setDecimal
Sets a decimal which is arbitrary precision and scale floating-point number.It is legal to set the field again only when Builder is created with
GenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setTime
Sets a time field consisting of hour, minute, seconds, and nanos parts.It is legal to set the field again only when Builder is created with
GenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setDate
Sets a date field consisting of year, month of the year, and day of the month.It is legal to set the field again only when Builder is created with
GenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setTimestamp
@Nonnull GenericRecordBuilder setTimestamp(@Nonnull String fieldName, @Nullable LocalDateTime value) Sets a timestamp field consisting of year, month of the year, and day of the month, hour, minute, seconds, nanos parts.It is legal to set the field again only when Builder is created with
GenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setTimestampWithTimezone
@Nonnull GenericRecordBuilder setTimestampWithTimezone(@Nonnull String fieldName, @Nullable OffsetDateTime value) Sets a timestamp with timezone field consisting of year, month of the year and day of the month, offset seconds, hour, minute, seconds, nanos parts.It is legal to set the field again only when Builder is created with
GenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfBoolean
@Nonnull GenericRecordBuilder setArrayOfBoolean(@Nonnull String fieldName, @Nullable boolean[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfInt8
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfChar
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its class definition. It should be composed of only alphanumeric charactersvalue
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the class definition or the type of the field does not match the one in the class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfInt16
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfInt32
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfInt64
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfFloat32
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfFloat64
@Nonnull GenericRecordBuilder setArrayOfFloat64(@Nonnull String fieldName, @Nullable double[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableBoolean
@Nonnull GenericRecordBuilder setArrayOfNullableBoolean(@Nonnull String fieldName, @Nullable Boolean[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableInt8
@Nonnull GenericRecordBuilder setArrayOfNullableInt8(@Nonnull String fieldName, @Nullable Byte[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableInt16
@Nonnull GenericRecordBuilder setArrayOfNullableInt16(@Nonnull String fieldName, @Nullable Short[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableInt32
@Nonnull GenericRecordBuilder setArrayOfNullableInt32(@Nonnull String fieldName, @Nullable Integer[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableInt64
@Nonnull GenericRecordBuilder setArrayOfNullableInt64(@Nonnull String fieldName, @Nullable Long[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableFloat32
@Nonnull GenericRecordBuilder setArrayOfNullableFloat32(@Nonnull String fieldName, @Nullable Float[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfNullableFloat64
@Nonnull GenericRecordBuilder setArrayOfNullableFloat64(@Nonnull String fieldName, @Nullable Double[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice.- Parameters:
fieldName
- name of the field as it is defined in its schema.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema or the type of the field does not match the one in the schema or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfString
It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. Array items can not be null.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-
setArrayOfDecimal
@Nonnull GenericRecordBuilder setArrayOfDecimal(@Nonnull String fieldName, @Nullable BigDecimal[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. Array items can not be null.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.- See Also:
-
setArrayOfTime
@Nonnull GenericRecordBuilder setArrayOfTime(@Nonnull String fieldName, @Nullable LocalTime[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. Array items can not be null.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.- See Also:
-
setArrayOfDate
@Nonnull GenericRecordBuilder setArrayOfDate(@Nonnull String fieldName, @Nullable LocalDate[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. Array items can not be null.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.- See Also:
-
setArrayOfTimestamp
@Nonnull GenericRecordBuilder setArrayOfTimestamp(@Nonnull String fieldName, @Nullable LocalDateTime[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. Array items can not be null.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.- See Also:
-
setArrayOfTimestampWithTimezone
@Nonnull GenericRecordBuilder setArrayOfTimestampWithTimezone(@Nonnull String fieldName, @Nullable OffsetDateTime[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. Array items can not be null.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if the field name does not exist in the schema/class definition or the type of the field does not match the one in the schema/class definition or the same field is trying to be set without usingGenericRecord.newBuilderWithClone()
.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.- See Also:
-
setArrayOfGenericRecord
@Nonnull GenericRecordBuilder setArrayOfGenericRecord(@Nonnull String fieldName, @Nullable GenericRecord[] value) It is legal to set the field again only when Builder is created withGenericRecord.newBuilderWithClone()
. Otherwise, it is illegal to set to the same field twice. This method allows nested structures. Subclasses should also be created as `GenericRecord`.Array items can not be null.
For
Compact
objects, it is not allowed write an array containing different item types or aHazelcastSerializationException
will be thrown.- Parameters:
fieldName
- name of the field as it is defined in its schema/class definition. It should be composed of only alphanumeric characters forPortable
GenericRecords.value
- to set to GenericRecord- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- 1. if the field name does not exist in the schema/class definition. 2. The type of the field does not match the one in the schema/class definition. 3. The same field is trying to be set without usingGenericRecord.newBuilderWithClone()
. 4. The type of the generic record is not the same as the generic record that is being built. e.g using portable generic record in a compact generic record builder.UnsupportedOperationException
- if the setter is called after a GenericRecord is built bybuild()
.
-