Class ScalarListener

All Implemented Interfaces:
Direct Known Subclasses:
BigIntListener, BinaryValueListener, BooleanListener, DateValueListener, DecimalValueListener, DoubleListener, IntervalValueListener, StrictBigIntValueListener, StrictDoubleValueListener, StrictIntValueListener, StrictStringValueListener, TimestampValueListener, TimeValueListener, UtcDateValueListener, UtcTimestampValueListener, VarCharListener

public abstract class ScalarListener extends Object implements ValueListener
Base class for scalar field listeners
  • Field Details

    • loader

      protected final JsonLoaderImpl loader
    • writer

      protected final ScalarWriter writer
    • isArray

      protected final boolean isArray
  • Constructor Details

  • Method Details

    • schema

      public ColumnMetadata schema()
    • onValue

      public void onValue(com.fasterxml.jackson.core.JsonToken token, TokenIterator tokenizer)
      Description copied from interface: ValueListener
      Called for a JSON scalar token.
      Specified by:
      onValue in interface ValueListener
      token - the scalar token
      tokenizer - provides access to the value of the token
    • onText

      public void onText(String value)
      Description copied from interface: ValueListener
      Called when a parser converts a JSON structure to text rather than delivering the token directly.
      Specified by:
      onText in interface ValueListener
      value - the string value of the parsed token or structure
    • setNull

      protected void setNull()
    • setArrayNull

      protected void setArrayNull()
    • typeConversionError

      protected UserException typeConversionError(String jsonType)
    • addValueToListenerMap

      protected void addValueToListenerMap(String key, String value)
      Adds a field's most recent value to the column listener map. This data is only stored if the listener column map is defined, and has keys.
      key - The key of the listener field
      value - The value of to be retained
    • addValueToListenerMap

      protected void addValueToListenerMap(String key, Object value)