All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.simpleflatmapper.map.error.LogFieldMapperErrorHandler Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.map.error;

import org.simpleflatmapper.converter.Context;
import org.simpleflatmapper.map.FieldMapperErrorHandler;
import org.simpleflatmapper.map.MappingException;

import java.util.logging.Level;
import java.util.logging.Logger;

public final class LogFieldMapperErrorHandler implements FieldMapperErrorHandler {
	private final Logger logger = Logger.getLogger(getClass().getName());
	@Override
	public void errorMappingField(final K key, final Object source, final Object target,
								  final Exception error, final Context mappingContext) throws MappingException {
		logger.log(Level.WARNING, "Error getting value from " + source, error);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy