class ConvertQuery implements Function<Configuration, T> {

    @Override
    public T apply(Configuration config) {
        List<PropertyConverter<T>> converters = config.getContext().getPropertyConverters(type);
        ConversionContext context = new ConversionContext.Builder(type).setConfiguration(config)
                .setKey(ConvertQuery.class.getName()).build();
        for (PropertyConverter<?> conv : converters) {
            try {
                if (conv instanceof OptionalConverter) {
                    continue;
                }
                T result = (T) conv.convert(rawValue, context);
                if (result != null) {
                    return result;
                }
            } catch (Exception e) {
                LOG.log(Level.FINEST, e, () -> "Converter " + conv + " failed to convert to " + type);
            }
        }
        return null;
    }

    public  ConvertQuery(String rawValue, TypeLiteral<T> type);

}