org.simpleflatmapper.jdbc.impl.JdbcKeySourceGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-jdbc Show documentation
Show all versions of sfm-jdbc Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.jdbc.impl;
import org.simpleflatmapper.jdbc.JdbcColumnKey;
import org.simpleflatmapper.map.context.KeySourceGetter;
import java.sql.ResultSet;
import java.sql.SQLException;
public class JdbcKeySourceGetter implements KeySourceGetter {
public static final JdbcKeySourceGetter INSTANCE = new JdbcKeySourceGetter();
private JdbcKeySourceGetter() {
}
@Override
public Object getValue(JdbcColumnKey key, ResultSet source) throws SQLException {
return source.getObject(key.getIndex());
}
}