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

org.simpleflatmapper.map.mapper.AbstractEnumerableDelegateMapper 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.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 context) throws MappingException {
        return getMapper(source).map(source, context);
    }

    protected abstract ContextualSourceMapper getMapper(ROW source);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy