public void search(String q) {
		searchResult.clear();
		if(!q.equals(""))
		try {
			Statement s = StatusController.connection.createStatement();
			// ((org.postgresql.jdbc3.AbstractJdbc3Statement)s).setQueryTimeout(1);
			// searchResult.clear();
			/*
			 * if(q.equals("")){ throw new Exception(); }
			 */
			String sql = "select * from stock where productId=" + q;
			// ResultSet
			// resultset=((org.postgresql.jdbc3.AbstractJdbc3Statement)s).executeQuery(sql);
			ResultSet resultset = s.executeQuery(sql);
			
			while (resultset.next()) {
				int id = resultset.getInt(1);
				String pname = resultset.getString(2);
				int amount = resultset.getInt(3);
				double price = resultset.getDouble(4);
				String feature = resultset.getString(5);
				searchResult
						.add(new Product(id, pname, amount, price, feature));
			}
			System.out.println(searchResult.toString());

		} catch (Exception e) {
			// TODO Auto-generated catch block
			 e.printStackTrace();

		}
	}