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

net.n2oapp.framework.boot.sql.rowmapper.IndexRowMapper Maven / Gradle / Ivy

The newest version!
package net.n2oapp.framework.boot.sql.rowmapper;

import net.n2oapp.engine.factory.TypicalEngine;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class IndexRowMapper implements RowMapper, TypicalEngine {
    @Override
    public Object[] mapRow(ResultSet rs, int rowNum) throws SQLException {
        Object[] result = new Object[rs.getMetaData().getColumnCount()];
        for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
            result[i-1] = rs.getObject(i);
        }
        return result;
    }

    @Override
    public String getType() {
        return "index";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy