Class TypedDefinitionDataCoercer

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

public class TypedDefinitionDataCoercer extends 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 Details

    • TypedDefinitionDataCoercer

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

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

    • convertTypedDefinitionToUnion

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

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

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