Class TypedDefinitionDataCoercer

java.lang.Object
org.coursera.pegasus.TypedDefinitionDataCoercer

public class TypedDefinitionDataCoercer
extends java.lang.Object
WARNING: This coercer mutates data in-place! Please do not use directly unless you are sure you know what you are doing. For most applications [[TypedDefinitionCodec]] should be used.
See [[TypedDefinitionCodec]] for additional documentation.
  • Constructor Summary

    Constructors 
    Constructor Description
    TypedDefinitionDataCoercer​(com.linkedin.data.schema.DataSchema dataSchema)  
    TypedDefinitionDataCoercer​(com.linkedin.data.schema.DataSchema dataSchema, java.lang.Boolean passthroughEnabled)  
  • Method Summary

    Modifier and Type Method Description
    <D extends com.linkedin.data.DataComplex>
    D
    convertTypedDefinitionToUnion​(D data)
    Convert from typedDefinition wire form to union form for in-memory usage by courier.
    <D extends com.linkedin.data.DataComplex>
    D
    convertUnionToTypedDefinition​(D data)
    Convert from union form for in-memory usage by courier to typedDefinition wire form.
    <D extends com.linkedin.data.DataComplex>
    void
    convertUnionToTypedDefinitionInPlace​(D data)
    Convert from union form for in-memory usage by courier to typedDefinition wire form.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TypedDefinitionDataCoercer

      public TypedDefinitionDataCoercer​(com.linkedin.data.schema.DataSchema dataSchema)
    • TypedDefinitionDataCoercer

      public TypedDefinitionDataCoercer​(com.linkedin.data.schema.DataSchema dataSchema, java.lang.Boolean passthroughEnabled)
  • Method Details

    • convertTypedDefinitionToUnion

      public <D extends com.linkedin.data.DataComplex> D convertTypedDefinitionToUnion​(D data) throws java.io.IOException
      Convert from typedDefinition wire form to union form for in-memory usage by courier.
      Throws:
      java.io.IOException
    • convertUnionToTypedDefinition

      public <D extends com.linkedin.data.DataComplex> D convertUnionToTypedDefinition​(D data) throws java.io.IOException
      Convert from union form for in-memory usage by courier to typedDefinition wire form.
      Throws:
      java.io.IOException
    • convertUnionToTypedDefinitionInPlace

      public <D extends com.linkedin.data.DataComplex> void convertUnionToTypedDefinitionInPlace​(D data) throws java.io.IOException, java.lang.IllegalArgumentException
      Convert from union form for in-memory usage by courier to typedDefinition wire form.
      Throws:
      java.io.IOException
      java.lang.IllegalArgumentException