org.simpleflatmapper.map.mapper.TransfromerSetRowMapperBuilder 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.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 super ROW, K> getMappingContextFactoryBuilder() {
return delegate.getMappingContextFactoryBuilder();
}
@Override
public List getKeys() {
return delegate.getKeys();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy