public boolean isLinkEstablished(String tableName, String firstCol, String secondCol, String firstKey, String secondKey){
		boolean linkEstablished = true;
		String query = "SELECT COUNT("+firstCol+") FROM "+tableName+" WHERE "+firstCol+"= '"+firstKey+"' AND "+secondCol+"='"+secondKey+"';";
		try {
			Statement stmt = con.createStatement();
			ResultSet rs = stmt.executeQuery(query);
			rs.next();
			if (rs.getInt("count") != 0) {
				linkEstablished = true;
			} else {
				linkEstablished = false;
			}
		} catch (SQLException e) {
			logger.warn("Invalid query: "+ query, e);
			e.printStackTrace();
		}
		return linkEstablished;
		
	}