
org.sfm.map.impl.fieldmapper.ByteFieldMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleFlatMapper Show documentation
Show all versions of simpleFlatMapper Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.sfm.map.impl.fieldmapper;
import org.sfm.map.impl.FieldMapper;
import org.sfm.reflect.primitive.ByteGetter;
import org.sfm.reflect.primitive.ByteSetter;
public final class ByteFieldMapper implements FieldMapper {
private final ByteGetter getter;
private final ByteSetter setter;
public ByteFieldMapper(final ByteGetter getter, final ByteSetter setter) {
this.getter = getter;
this.setter = setter;
}
@Override
public void map(final S source, final T target) throws Exception {
setter.setByte(target, getter.getByte(source));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy