private static void writeToDataBase(IGMVGardenType type, Set<IGMVVariety> varieties) {

		String url = "jdbc:postgresql://localhost/puf-web";
        String user = "puf-web";
        String password = "puf-web";

        Connection con = null;
        Statement st = null;
        ResultSet rs = null;
        
        try {
            con = DriverManager.getConnection(url, user, password);
            st = con.createStatement();
            //String query = "SELECT * FROM GARDEN_TYPE_VEGETABLES";
            String query = "INSERT INTO VEGETABLES ";
            
			for (IGMVVegetable veg : type.getVegetables()) {
				query += "(id, name, dept, age, salary location)";
			}
			
			rs = st.executeQuery(query);
            if (rs.next()) {
                System.out.println(rs.getString(1));
            }

        } catch (SQLException ex) {
            Logger lgr = Logger.getLogger(Version.class.getName());
            lgr.log(Level.SEVERE, ex.getMessage(), ex);

        } finally {
            try {
                if (rs != null) {
                    rs.close();
                }
                if (st != null) {
                    st.close();
                }
                if (con != null) {
                    con.close();
                }

            } catch (SQLException ex) {
                Logger lgr = Logger.getLogger(Version.class.getName());
                lgr.log(Level.WARNING, ex.getMessage(), ex);
            }
        }
	}