Adds a custom converter to the model.

@param converter custom converter
@deprecated use {@link #convertWith(org.javalite.activejdbc.conversion.Converter, String...)} instead
11687
@Deprecated
    protected static ValidationBuilder convertWith(org.javalite.activejdbc.validation.Converter converter) {
        return ModelDelegate.convertWith(modelClass(), converter);
    }
796139
protected <T> void addConverter(Class<T> type, Converter<T> converter) {
        storage.put(type, converter);
    }
568824
private ConvertFrom<String> converter()
  {
    ConvertFromBuilder<String> builder = ConvertStringDefault.build();

    builder.add(new ConvertStringToPath());

    return builder.get();
  }
1315231
public void init(Converter converter, int dateFormat)
    {
        Converter.initGlobals();
        super.init(converter);
        m_sDateFormat = dateFormat;
    }
809889
public static void addInternalConverters(Map<Class<?>, Converter<?, ?>> converterMap) {
		converterMap.put(BigDecimal.class, BigDecimalConverter.getSingleton());
		converterMap.put(BigInteger.class, BigIntegerConverter.getSingleton());
		converterMap.put(Boolean.class, BooleanConverter.getSingleton());
		converterMap.put(boolean.class, BooleanConverter.getSingleton());
		converterMap.put(Byte.class, ByteConverter.getSingleton());
		converterMap.put(byte.class, ByteConverter.getSingleton());
		converterMap.put(Character.class, CharacterConverter.getSingleton());
		converterMap.put(char.class, CharacterConverter.getSingleton());
		converterMap.put(Date.class, DateConverter.getSingleton());
		converterMap.put(Double.class, DoubleConverter.getSingleton());
		converterMap.put(double.class, DoubleConverter.getSingleton());
		converterMap.put(Enum.class, EnumConverter.getSingleton());
		converterMap.put(Float.class, FloatConverter.getSingleton());
		converterMap.put(float.class, FloatConverter.getSingleton());
		converterMap.put(Integer.class, IntegerConverter.getSingleton());
		converterMap.put(int.class, IntegerConverter.getSingleton());
		converterMap.put(Long.class, LongConverter.getSingleton());
		converterMap.put(long.class, LongConverter.getSingleton());
		converterMap.put(Short.class, ShortConverter.getSingleton());
		converterMap.put(short.class, ShortConverter.getSingleton());
		converterMap.put(String.class, StringConverter.getSingleton());
		converterMap.put(UUID.class, UuidConverter.getSingleton());
	}
396634
public void init(Converter converter, Object objTarget, boolean bTrueIfMatch)
    {
        super.init(converter, null, null);
        m_objTarget = objTarget;
        m_bTrueIfMatch = bTrueIfMatch;
    }
152204
public void addConverterComponent(ValueConverter<?, ?> converter) {

    if (converter instanceof AbstractRecursiveValueConverter) {
      ((AbstractRecursiveValueConverter<?, ?>) converter).setComposedValueConverter(this);
    }
    if (converter instanceof AbstractComponent) {
      ((AbstractComponent) converter).initialize();
    }
    addConverter(converter);
  }
843581
public void registerConvertor(Class src, Class dest, Convertor convertor) {
        repository.registerConvertor(src, dest, convertor);
    }
1108380
public void init(Converter converter, Converter convIndent, int iIndentAmount)
    {
        m_convIndent = null;
        m_iIndentAmount = 0;
        super.init(converter);
        m_convIndent = convIndent;
        m_iIndentAmount = iIndentAmount;
    }
1153084
@Override
    protected void addDefaultConverters() {
        super.addDefaultConverters();

        /* Add the "shortDate" conversion. */
        StringToDate dateAndTimeToDate = new StringToDate();
        dateAndTimeToDate.setPattern(DATE_AND_TIME_FORMAT);
        addConverter("date", dateAndTimeToDate);
    }
110844
public final <S, T> void registerMarshaller(ConverterKey<S,T> key, ToMarshaller<S, T> converter) {
		registerConverter(key, new ToMarshallerConverter<S,T>(converter));
	}
245102
@Trivial
    public void addAll(PriorityConverterMap convertersToAdd) {
        for (PriorityConverter converter : convertersToAdd.converters.values()) {
            _addConverter(converter);
        }
    }
940189
public static Converter<?, ?> constructConverter(Class<? extends Converter<?, ?>> clazz) {
		Constructor<? extends Converter<?, ?>> constructor;
		try {
			constructor = clazz.getConstructor();
		} catch (Exception e) {
			throw new IllegalArgumentException("Could not find public no-arg constructor for CSV converter class: "
					+ clazz, e);
		}
		try {
			return constructor.newInstance();
		} catch (Exception e) {
			throw new IllegalArgumentException("Could not construct new CSV converter: " + clazz, e);
		}
	}
657287
public void init(Convert converter, boolean bAddCalendarButton, boolean bAddTimeButton)
    {
        m_converter = converter;
        this.setBorder(null);
        this.setOpaque(false);
        
        this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
        String strDefault = null;
        int iColumns = 15;
        if (m_converter != null)
        {
            strDefault = m_converter.getString();
            iColumns = m_converter.getMaxLength();
        }
        m_tf = new JTextField(strDefault, iColumns);
        this.add(m_tf);
        BaseApplet applet = BaseApplet.getSharedInstance();
        if (bAddCalendarButton)
        {
            m_button = new JButton(applet.loadImageIcon(JCalendarPopup.CALENDAR_ICON));
            m_button.setMargin(JCalendarPopup.NO_INSETS);
            m_button.setOpaque(false);
            this.add(m_button);
            m_button.addActionListener(this);
        }
        
        if (bAddTimeButton)
        {
            m_buttonTime = new JButton(applet.loadImageIcon(JTimePopup.TIME_ICON));
            m_buttonTime.setMargin(JCalendarPopup.NO_INSETS);
            m_buttonTime.setOpaque(false);            
            this.add(m_buttonTime);
            m_buttonTime.addActionListener(this);
        }
    }
223135
public TreeBuilder<T> convert(ContentConverter<T> converter) {
        return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, PathUtil.allpathSelector()));
    }
655707
public static <A, B, C, D> Converter<Example<A, B>, Example<C, D>> converter(
      Converter<A, C> inputConverter, Converter<B, D> outputConverter) {
    return new ExampleConverter<A, B, C, D>(inputConverter, outputConverter);
  }
1273077
@SuppressWarnings("rawtypes")
    public void addConverter(Function<?, ?> converter) {

        LettuceAssert.notNull(converter, "Converter must not be null");

        ClassTypeInformation<? extends Function> classTypeInformation = ClassTypeInformation.from(converter.getClass());
        TypeInformation<?> typeInformation = classTypeInformation.getSuperTypeInformation(Function.class);
        List<TypeInformation<?>> typeArguments = typeInformation.getTypeArguments();

        ConvertiblePair pair = new ConvertiblePair(typeArguments.get(0).getType(), typeArguments.get(1).getType());
        converterMap.put(pair, converter);
    }