
/* Genomic Comparison Tool
   Master Thesis of computer science

   Author: Yue Lu
   Version: 1.1

*/


/* this class get database connection instance and
	get the resultset
*/

import java.net.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import java.awt.*;
import javax.swing.*;

public class DatabaseResultSet
{
	public DatabaseResultSet(String q)
   {
	   query=q;

   	  try
      {
		//get the database connection instance
		 DatabaseConnection connection=DatabaseConnection.getInstance();
		 con=connection.getConnection();

		//execute the query
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);

         stmt.close();
		//rs.close();
      }
      catch (SQLException ex)
      {
		  System.out.println ("7"+ex);

      }

   }


     public ResultSet getQueryResult()
     {
		 return Query_Result;
	 }


	private String query;
	private Connection con;
	private ResultSet Query_Result;
}
