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

com.cloudimpl.outstack.spring.repo.SqlResultSet Maven / Gradle / Ivy

There is a newer version: 4.0.551
Show newest version
package com.cloudimpl.outstack.spring.repo;

import java.io.Closeable;
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @author OS Hewawitharana
 */
public class SqlResultSet implements AutoCloseable {
    private java.sql.ResultSet resultSet;
    private java.sql.Connection connection;

    public SqlResultSet(Connection connection, ResultSet resultSet) {
        this.resultSet = resultSet;
        this.connection = connection;
    }

    public ResultSet getResultSet() {
        return resultSet;
    }

    @Override
    public void close() {
        try {
            this.connection.close();
            this.resultSet.close();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy