Options
All
  • Public
  • Public/Protected
  • All
Menu

A generic object interface that is returned to the user when the domain class can not be created from any of the distributed Hazelcast data structures like IMap, IQueue etc.

GenericRecord also allows reading from a cluster without having the classes on the client side. This way, the clients can read and write objects back to the cluster without the need to have the domain classes.

GenericRecords is only supported for Compact serializable objects.

This API is currently in Beta and can change at any time.

Hierarchy

  • GenericRecord

Index

Methods

  • Clones this generic record and returns a new one.

    throws

    TypeError if the type of any value does not match with its field type.

    throws

    RangeError if any provided fieldName does not exist in the record or a field value provided is out of range.

    Parameters

    • Optional fieldsToUpdate: {}

      If provided, some fields of the returned generic record will be updated. Keys of this object are fieldNames and values are field values.

      • [fieldName: string]: any

    Returns GenericRecord

  • getArrayOfBoolean(fieldName: string): boolean[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns boolean[]

  • getArrayOfDate(fieldName: string): LocalDate[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns LocalDate[]

  • getArrayOfDecimal(fieldName: string): BigDecimal[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns BigDecimal[]

  • getArrayOfFloat32(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfFloat64(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns GenericRecord[]

  • getArrayOfInt16(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfInt32(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfInt64(fieldName: string): Long[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns Long[]

  • getArrayOfInt8(fieldName: string): Buffer
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns Buffer

  • getArrayOfNullableBoolean(fieldName: string): boolean[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns boolean[]

  • getArrayOfNullableFloat32(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfNullableFloat64(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfNullableInt16(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfNullableInt32(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfNullableInt64(fieldName: string): Long[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns Long[]

  • getArrayOfNullableInt8(fieldName: string): number[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number[]

  • getArrayOfString(fieldName: string): string[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns string[]

  • getArrayOfTime(fieldName: string): LocalTime[]
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns LocalTime[]

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns LocalDateTime[]

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns OffsetDateTime[]

  • getBoolean(fieldName: string): boolean
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns boolean

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns LocalDate

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns BigDecimal

  • Returns field type for the given field name

    throws

    RangeError if the field name does not exist in the generic record

    Parameters

    • fieldName: string

      the name of the field

    Returns FieldKind

  • getFieldNames(): Set<string>
  • Returns set of field names of this GenericRecord

    Returns Set<string>

  • getFloat32(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getFloat64(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns GenericRecord

  • getInt16(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getInt32(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getInt64(fieldName: string): Long
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns Long

  • getInt8(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getNullableBoolean(fieldName: string): boolean
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns boolean

  • getNullableFloat32(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getNullableFloat64(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getNullableInt16(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getNullableInt32(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getNullableInt64(fieldName: string): Long
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns Long

  • getNullableInt8(fieldName: string): number
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns number

  • getString(fieldName: string): string
  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns string

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns LocalTime

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns LocalDateTime

  • Returns value of the field.

    throws

    HazelcastSerializationError if the field name does not exist in the generic record or the type of the field does not match the one in the generic record.

    Parameters

    • fieldName: string

      the name of the field

    Returns OffsetDateTime

  • hasField(fieldName: string): boolean
  • Returns true if field exists in the definition of the class. Note that returns true even if the field is null.

    Parameters

    • fieldName: string

      the name of the field

    Returns boolean

  • toString(): string
  • Returns string representation of this generic record. The string representation is a valid JSON string.

    Returns string

Generated using TypeDoc