org.simpleflatmapper.map.mapper.MapperSourceImpl 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.FieldKey;
import org.simpleflatmapper.map.getter.ContextualGetterFactory;
import org.simpleflatmapper.map.getter.ContextualGetterFactoryAdapter;
import org.simpleflatmapper.reflect.getter.GetterFactory;
public class MapperSourceImpl> implements MapperSource {
private final Class source;
private final ContextualGetterFactory getterFactory;
public MapperSourceImpl(Class source, ContextualGetterFactory getterFactory) {
this.source = source;
this.getterFactory = getterFactory;
}
@Override
public Class source() {
return source;
}
@Override
public ContextualGetterFactory getterFactory() {
return getterFactory;
}
public MapperSourceImpl getterFactory(ContextualGetterFactory getterFactory) {
return new MapperSourceImpl(source, getterFactory);
}
public MapperSourceImpl getterFactory(GetterFactory getterFactory) {
return new MapperSourceImpl(source, new ContextualGetterFactoryAdapter(getterFactory));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy