public boolean isEnoughRawMaterials(Pallet pallet) {
		String sql = 
				"SELECT count(rawmaterials.quantity >= Ingredients.quantity) = sum(rawmaterials.quantity >= Ingredients.quantity) " +
				"FROM Pallets, Ingredients, RawMaterials " +
				"WHERE Pallets.recipeName = Ingredients.recipeName AND Ingredients.rawMaterialName = Rawmaterials.name AND Pallets.id = ?";
		PreparedStatement ps = null;
		try {
			ps = conn.prepareStatement(sql);
			ps.setLong(1, pallet.id);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		boolean rtn = false;
		try {
			ResultSet rs = ps.executeQuery();
			while (rs.next()) {
				rtn = rs.getBoolean(0);
				
			}
		} catch (SQLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} finally {
			if(ps != null)
				try {
					ps.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
		}
		return rtn;
	}