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

org.simpleflatmapper.map.mapper.TransfromerSetRowMapperBuilder 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.ContextualSourceFieldMapper;
import org.simpleflatmapper.map.FieldKey;
import org.simpleflatmapper.map.FieldMapper;
import org.simpleflatmapper.map.MapperConfig;
import org.simpleflatmapper.map.SetRowMapper;
import org.simpleflatmapper.map.SourceFieldMapper;
import org.simpleflatmapper.map.context.MappingContextFactoryBuilder;
import org.simpleflatmapper.map.property.FieldMapperColumnDefinition;
import org.simpleflatmapper.util.Function;

import java.util.List;

public class TransfromerSetRowMapperBuilder, MI extends SetRowMapper, ROW, SET, I, O, K extends FieldKey, E extends Exception> 
        implements SetRowMapperBuilder {
    
    private final SetRowMapperBuilder delegate;
    private final Function transformer;
    

    public TransfromerSetRowMapperBuilder(SetRowMapperBuilder delegate, Function transformer) {
        this.delegate = delegate;
        this.transformer = transformer;
    }

    @Override
    public final MO mapper() {
        return transformer.apply(delegate.mapper());
    }

    @Override
    public ContextualSourceFieldMapper sourceFieldMapper() {
        throw new UnsupportedOperationException();
    }
    @Override
    public final boolean isRootAggregate() {
        return delegate.isRootAggregate();
    }

    public final void addMapper(FieldMapper mapper) {
        throw new UnsupportedOperationException();
    }

    @Override
    public final void addMapping(K key, ColumnDefinition columnDefinition) {
        delegate.addMapping(key, columnDefinition);
    }

    @Override
    public final MapperConfig mapperConfig() {
        return delegate.mapperConfig();
    }

    @Override
    public final MappingContextFactoryBuilder getMappingContextFactoryBuilder() {
        return delegate.getMappingContextFactoryBuilder();
    }

    @Override
    public List getKeys() {
        return delegate.getKeys();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy