Packages

c

ca.dataedu.savro.AvroImplicits

GenericRecordOps

implicit class GenericRecordOps extends AnyRef

Add some functionalities to facilitate extracting values from an Avro message

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GenericRecordOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GenericRecordOps(record: GenericRecord)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def as[T](fieldName: String)(f: (AnyRef, Schema) ⇒ Either[SAvroError, Option[T]]): Either[SAvroError, Option[T]]

    Tries to extract the value of the field name from the Avro message.

    Tries to extract the value of the field name from the Avro message.

    The provided function accepts a value (a JVM object) with the schema of the field should return an optional value. The function doesn't need to be concern about the null values because as will return a None if the value of the field is null and won't call the function.

  5. def asBoolean(fieldName: String): Either[SAvroError, Option[Boolean]]

    Returns the value of fieldName as boolean if exists

  6. def asDouble(fieldName: String): Either[SAvroError, Option[Double]]

    Returns the value of fieldName as double if exists

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def asInt(fieldName: String): Either[SAvroError, Option[Int]]

    Returns the value of fieldName as integer if exists

  9. def asLong(fieldName: String): Either[SAvroError, Option[Long]]

    Returns the value of fieldName as long if exists

  10. def asString(fieldName: String): Option[String]

    Returns the value of fieldName as string if exists

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def set[T](fieldName: String, value: T): GenericRecord

    A wrapper for GenericRecord#put that supports null values.

    A wrapper for GenericRecord#put that supports null values. Set the value of a field with an optional value. It puts null if the value is empty.

  22. def set[T](fieldName: String, value: Option[T]): GenericRecord

    A wrapper for GenericRecord#put that supports null values.

    A wrapper for GenericRecord#put that supports null values. Set the value of a field with an optional value. It puts null if the value is empty. Note that due to GenericRecord limitation, the record is not immutable. The return value is the same record and not a new on.

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped