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

org.simpleflatmapper.jdbc.impl.JdbcKeySourceGetter Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

The newest version!
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());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy