for (Iterator j = rc.getProperties(); j.hasNext(); ) { Property prop = (Property) j.next();
for (Iterator j = rc.getLocalPropertyNames(); j.hasNext(); ) { CompositeName pname = (CompositeName) j.next(); Property prop = rc.getProperty(pname); if (prop == null) { prop = rc.getInvisibleProperty(pname); if (prop == null) { continue; } }
  private boolean isRecipeEqual(String[] recipeIdAndClass,                                 RecipeComponent rc) {    if (!recipeIdAndClass[1].equals(rc.getClass().getName()))      return false; // different class    Map newProps = new HashMap();    for (Iterator j = rc.getProperties(); j.hasNext(); ) {      Property prop = (Property) j.next();      Object val = prop.getValue();      if (val == null) continue; // Don't write null values      String sval = val.toString();      if (sval.equals("")) continue; // Don't write empty values      newProps.put(prop.getName().last().toString(), sval);    }    Map oldProps = new HashMap();    substitutions.put(":recipe_id:", recipeIdAndClass[0]);    ResultSet rs = null;    try {      rs = executeQuery(stmt,                         dbp.getQuery("queryLibRecipeProps", substitutions));      while (rs.next()) {        oldProps.put(rs.getString(1), rs.getString(2));      }    } catch (SQLException sqle) {      if(log.isErrorEnabled()) {        log.error("SQL Exception: ", sqle);      }      return false;    } finally {      try {        if (rs != null)          rs.close();      } catch (SQLException sqle2) {        if(log.isErrorEnabled()) {          log.error("SQL Exception: ", sqle2);        }        return false;      }    }    return oldProps.equals(newProps);  }