Interface TypeMapper<S>

All Known Implementing Classes:
DefaultTypeMapper

public interface TypeMapper<S>
Interface to define strategies how to store type information in a store specific sink or source.
Author:
Oliver Gierke
  • Method Details

    • readType

      @Nullable TypeInformation<?> readType(S source)
      Reads the TypeInformation from the given source.
      Parameters:
      source - must not be null.
      Returns:
    • readType

      <T> TypeInformation<? extends T> readType(S source, TypeInformation<T> defaultType)
      Returns the TypeInformation from the given source if it is a more concrete type than the given default one.
      Parameters:
      source - must not be null.
      defaultType - must not be null.
      Returns:
    • writeType

      void writeType(Class<?> type, S dbObject)
      Writes type information for the given type into the given sink.
      Parameters:
      type - must not be null.
      dbObject - must not be null.
    • writeType

      void writeType(TypeInformation<?> type, S dbObject)
      Writes type information for the given TypeInformation into the given sink.
      Parameters:
      type - must not be null.
      dbObject - must not be null.