001package csheets.ext.database.core; 002 003import csheets.core.Cell; 004import csheets.ext.database.controller.ControllerImport; 005 006/** 007 * The thread responsible for the import of data from a database 008 * @author João Carreira 009 */ 010public class ThreadImport implements Runnable 011{ 012 private Cell cell; 013 private String url, user, pass, tableName, dbName; 014 private ControllerImport ctrlImp; 015 016 /** 017 * construtor 018 * @param cell cell used as reference for import 019 * @param url path to the database 020 * @param user username 021 * @param pass password 022 * @param tableName table in the database 023 * @param dbName database name 024 * @param ctrlImp ControllerImport object 025 */ 026 public ThreadImport(Cell cell, String url, String user, String pass, String tableName, String dbName, ControllerImport ctrlImp) 027 { 028 this.cell = cell; 029 this.url = url; 030 this.user = user; 031 this.pass = pass; 032 this.tableName = tableName; 033 this.dbName = dbName; 034 this.ctrlImp = ctrlImp; 035 } 036 037 @Override 038 public void run() 039 { 040 try 041 { 042 043 } 044 catch(Exception e) 045 { 046 e.printStackTrace(); 047 } 048 } 049}