Class MapConverterImpl<K,​V>

    • Constructor Detail

      • MapConverterImpl

        public MapConverterImpl()
    • Method Detail

      • mapForDb

        public void mapForDb​(String name,
                             Map<K,​V> value,
                             Map<String,​Object> map)
        Description copied from interface: FieldConverter
        Adds the value to the map for database processing
        Specified by:
        mapForDb in interface FieldConverter<K,​V>
        Parameters:
        name - of field
        value - to be pushed to db
        map - map the value will be entered in
      • toJavaValue

        public Map<K,​V> toJavaValue​(Map<K,​V> currentValue,
                                          Object newValue)
        Description copied from interface: FieldConverter
        Transforms from db value to value understood by the java class
        Specified by:
        toJavaValue in interface FieldConverter<K,​V>
        Parameters:
        currentValue - value the java object has right now
        newValue - db to be transformed
        Returns:
        Java value
      • setKeyConverter

        public void setKeyConverter​(FieldConverter<String,​K> keyConverter)
        Description copied from interface: MapConverter
        Injects converter to convert a string to a map's key class
        Specified by:
        setKeyConverter in interface MapConverter<K,​V>
        Parameters:
        keyConverter - used to convert string
      • setValueConverter

        public void setValueConverter​(FieldConverter<String,​V> valueConverter)
        Description copied from interface: MapConverter
        Injects converter to convert a string to a map's value class
        Specified by:
        setValueConverter in interface MapConverter<K,​V>
        Parameters:
        valueConverter - used to convert string