org.simpleflatmapper.map.mapper.AbstractEnumerableDelegateMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-map Show documentation
Show all versions of sfm-map Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.map.mapper;
import org.simpleflatmapper.map.ContextualSourceMapper;
import org.simpleflatmapper.map.SetRowMapper;
import org.simpleflatmapper.map.SourceMapper;
import org.simpleflatmapper.map.MappingContext;
import org.simpleflatmapper.map.MappingException;
import org.simpleflatmapper.map.ConsumerErrorHandler;
public abstract class AbstractEnumerableDelegateMapper extends AbstractEnumerableMapper implements SetRowMapper {
public AbstractEnumerableDelegateMapper(ConsumerErrorHandler errorHandler) {
super(errorHandler);
}
@Override
public final T map(ROW source) throws MappingException {
return getMapper(source).map(source);
}
@Override
public final T map(ROW source, MappingContext super ROW> context) throws MappingException {
return getMapper(source).map(source, context);
}
protected abstract ContextualSourceMapper getMapper(ROW source);
}