Class FieldNameMappingFilter

All Implemented Interfaces:
Closeable, Serializable, AutoCloseable

public class FieldNameMappingFilter extends MetadataFilterBase
See Also:
  • Constructor Details

    • FieldNameMappingFilter

      public FieldNameMappingFilter()
    • FieldNameMappingFilter

      public FieldNameMappingFilter(FieldNameMappingFilter.Config config)
      Constructor with explicit Config object.
      Parameters:
      config - the configuration
    • FieldNameMappingFilter

      public FieldNameMappingFilter(JsonConfig jsonConfig)
      Constructor for JSON configuration. Requires Jackson on the classpath.
      Parameters:
      jsonConfig - JSON configuration
  • Method Details

    • filter

      protected void filter(Metadata metadata)
      Specified by:
      filter in class MetadataFilterBase
    • setExcludeUnmapped

      public void setExcludeUnmapped(boolean excludeUnmapped)
      If this is true (default), this means that only the fields that have a "from" value in the mapper will be passed through. Otherwise, this will pass through all keys/values and mutate the keys that exist in the mappings.
      Parameters:
      excludeUnmapped -
    • setMappings

      public void setMappings(Map<String,String> mappings)
    • getMappins

      public Map<String,String> getMappins()
    • toString

      public String toString()
      Overrides:
      toString in class Object