Interface Record
public interface Record
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAllows to create a record with a fluent API. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T> TAccess a record field value.default <T> Tget(Class<T> expectedType, Schema.Entry entry) default <T> Collection<T>Seeget(Class, String).default booleangetBoolean(String name) Seeget(Class, String).default byte[]Seeget(Class, String).default ZonedDateTimegetDateTime(String name) Seeget(Class, String).default BigDecimalgetDecimal(String name) default doubleSeeget(Class, String).default floatSeeget(Class, String).default InstantgetInstant(String name) Seeget(Class, String).default intSeeget(Class, String).default longSeeget(Class, String).default <T> Optional<Collection<T>>getOptionalArray(Class<T> type, String name) Seeget(Class, String).getOptionalBoolean(String name) Seeget(Class, String).default Optional<byte[]>getOptionalBytes(String name) Seeget(Class, String).default Optional<ZonedDateTime>getOptionalDateTime(String name) Seeget(Class, String).default Optional<BigDecimal>getOptionalDecimal(String name) Seeget(Class, String).default OptionalDoublegetOptionalDouble(String name) Seeget(Class, String).default OptionalDoublegetOptionalFloat(String name) Seeget(Class, String).getOptionalInstant(String name) Seeget(Class, String).default OptionalIntgetOptionalInt(String name) Seeget(Class, String).default OptionalLonggetOptionalLong(String name) Seeget(Class, String).getOptionalRecord(String name) Seeget(Class, String).getOptionalString(String name) Seeget(Class, String).default RecordSeeget(Class, String).default StringSeeget(Class, String).default booleanisValid()default Record.BuilderwithNewSchema(Schema schema) Create a Builder with values of the record present inSchema.
-
Field Details
-
RECORD_ERROR_SUPPORT
- See Also:
-
RECORD_NULLABLE_CHECK
- See Also:
-
-
Method Details
-
getSchema
- Returns:
- the schema of this record.
-
withNewSchema
Create a Builder with values of the record present inSchema.- Parameters:
schema- new schema- Returns:
- a
Record.Builder
-
get
Access a record field value. IMPORTANT: it is always better to use the typed accessors and the optional flavor when the entry is nullable.- Type Parameters:
T- the type of expectedType.- Parameters:
expectedType- the expected type for the column.name- the name of the column.- Returns:
- the column value.
-
get
-
getString
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getInt
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getLong
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getDouble
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getFloat
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getBoolean
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getBytes
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getRecord
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getArray
Seeget(Class, String).- Type Parameters:
T- type of the collection elements.- Parameters:
type- type of the elements of the collection.name- entry name.- Returns:
- the value of the entry in this record.
-
getDateTime
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getInstant
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getDecimal
-
getOptionalArray
Seeget(Class, String).- Type Parameters:
T- type of the collection elements.- Parameters:
type- type of the elements of the collection.name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalDateTime
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalInstant
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalDecimal
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalString
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalInt
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalLong
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalDouble
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalFloat
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalBoolean
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalBytes
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
getOptionalRecord
Seeget(Class, String).- Parameters:
name- entry name.- Returns:
- the value of the entry in this record.
-
isValid
-