// Path: src/main/resources/java/crawler/EmailCrawlerConfig.java
// public class EmailCrawlerConfig {
// 	private static final EmailCrawlerConfig CONFIG = new EmailCrawlerConfig();
// 	private EmailCrawlerConfig() {};
// 	public static EmailCrawlerConfig getConfig() {
// 		return CONFIG;
// 	}
// 	
// 	public static int readInt(String propName) {
// 		Properties prop = new Properties();
// 		InputStream input = null;
// 		try {
// 			input = new FileInputStream("config.properties");
// 			prop.load(input);
// 			//System.out.println("config: " + propName + ": " + prop.getProperty(propName));
// 			return Integer.parseInt(prop.getProperty(propName));
// 		} catch (IOException ex) {
// 			ex.printStackTrace();
// 		} finally {
// 			if (input != null) {
// 				try {
// 					input.close();
// 				} catch (IOException e) {
// 					e.printStackTrace();
// 				}
// 			}
// 		}
// 		return -1;
// 	}
// 	
// 	public static String readString(String propName) {
// 		Properties prop = new Properties();
// 		InputStream input = null;
// 		try {
// 			input = new FileInputStream("config.properties");
// 			prop.load(input);
// 			//System.out.println("config: " + propName + ": " + prop.getProperty(propName));
// 			return prop.getProperty(propName);
// 		} catch (IOException ex) {
// 			ex.printStackTrace();
// 		} finally {
// 			if (input != null) {
// 				try {
// 					input.close();
// 				} catch (IOException e) {
// 					e.printStackTrace();
// 				}
// 			}
// 		}
// 		return "";
// 	}
// }


import java.sql.Connection;
import java.sql.SQLException;
import crawler.EmailCrawlerConfig;
package crawler.DAO;



public class EmailDAO {
	
	private static Connection connection = MySQLConnector.createConnection("EmailCrawlerDB", EmailCrawlerConfig.getConfig().readString("db-username"), EmailCrawlerConfig.getConfig().readString("db-password"));
	
	public static void reconnect() throws SQLException {
		connection.close();
		connection = MySQLConnector.createConnection("EmailCrawlerDB", EmailCrawlerConfig.getConfig().readString("db-username"), EmailCrawlerConfig.getConfig().readString("db-password"));
	}
	
	public static void insert(String email_address, String customer_linkedin_url, String company_name, int email_response_time) {
		MySQLConnector.executeQuery(connection, "INSERT INTO Email VALUES('" 
// Path: src/main/resources/java/crawler/EmailCrawlerConfig.java
// public class EmailCrawlerConfig {
// 	private static final EmailCrawlerConfig CONFIG = new EmailCrawlerConfig();
// 	private EmailCrawlerConfig() {};
// 	public static EmailCrawlerConfig getConfig() {
// 		return CONFIG;
// 	}
// 	
// 	public static int readInt(String propName) {
// 		Properties prop = new Properties();
// 		InputStream input = null;
// 		try {
// 			input = new FileInputStream("config.properties");
// 			prop.load(input);
// 			//System.out.println("config: " + propName + ": " + prop.getProperty(propName));
// 			return Integer.parseInt(prop.getProperty(propName));
// 		} catch (IOException ex) {
// 			ex.printStackTrace();
// 		} finally {
// 			if (input != null) {
// 				try {
// 					input.close();
// 				} catch (IOException e) {
// 					e.printStackTrace();
// 				}
// 			}
// 		}
// 		return -1;
// 	}
// 	
// 	public static String readString(String propName) {
// 		Properties prop = new Properties();
// 		InputStream input = null;
// 		try {
// 			input = new FileInputStream("config.properties");
// 			prop.load(input);
// 			//System.out.println("config: " + propName + ": " + prop.getProperty(propName));
// 			return prop.getProperty(propName);
// 		} catch (IOException ex) {
// 			ex.printStackTrace();
// 		} finally {
// 			if (input != null) {
// 				try {
// 					input.close();
// 				} catch (IOException e) {
// 					e.printStackTrace();
// 				}
// 			}
// 		}
// 		return "";
// 	}
// }


// Path: src/main/resources/java/crawler/DAO/EmailDAO.java
import java.sql.Connection;
import java.sql.SQLException;
import crawler.EmailCrawlerConfig;

package crawler.DAO;



public class EmailDAO {
	
	private static Connection connection = MySQLConnector.createConnection("EmailCrawlerDB", EmailCrawlerConfig.getConfig().readString("db-username"), EmailCrawlerConfig.getConfig().readString("db-password"));
	
	public static void reconnect() throws SQLException {
		connection.close();
		connection = MySQLConnector.createConnection("EmailCrawlerDB", EmailCrawlerConfig.getConfig().readString("db-username"), EmailCrawlerConfig.getConfig().readString("db-password"));
	}
	
	public static void insert(String email_address, String customer_linkedin_url, String company_name, int email_response_time) {
		MySQLConnector.executeQuery(connection, "INSERT INTO Email VALUES('" 
									+ email_address + "', '"