modified = false; saveInProgress = false;  fireModification(new ModificationEvent(this, RECIPE_SAVED));
  public boolean saveToDatabase() {    // First, save the new recipe assembly.    saveInProgress = true;    if(log.isInfoEnabled()) {      log.info("saveToDatabase recipe (" + getRecipeName() + ") with asb: " + getAssemblyId() + " and old Assembly: " + oldAssemblyId);    }    // TODO:    // Should I notice when I need to save and only save then?    // Should I resist creating a new assembly ID, to avoid    // breaking other experiments? Or always create one?        String oldCMTAsbid = oldAssemblyId;    String currAssID = getAssemblyId();    String name = getRecipeName();    if (currAssID != null && currAssID.startsWith("CMT")) {      if (log.isDebugEnabled()) {	log.debug("saveToDB not saving CMT society (" + getRecipeName() + ") with id " + currAssID + " and old ID " + oldCMTAsbid + " into same ID. Will create new one and new name -- like a copy, except done in place");      }      oldCMTAsbid = currAssID;      currAssID = null;      name = name + " edited";    }    // And what is my current assemblyID?    // How do I know if it is different?    // FIXME: Maybe I need a new        // But probably only want to pass it in if it was in fact a CMT assembly, no?    // Or does it hurt to pass it in?    PopulateDb pdb = null;    boolean ret = true;    try {      // FIXME: Is there a non-gui conflict handler I should use?      pdb = new PopulateDb(oldCMTAsbid, name, currAssID, GUIUtils.createSaveToDbConflictHandler(null), true);      pdb.populateCSA(getComponentData());      // Set the new CSA assembly ID on the society - get it from the PDB      //      setAssemblyId(pdb.getCMTAssemblyId());      assemblyId = pdb.getCMTAssemblyId();      propAssemblyId.setValue(assemblyId);      // What about fixAssemblies?      // is it really populateCSA?      pdb.close();    } catch (Exception sqle) {      if (log.isErrorEnabled()) {	log.error("Error saving recipe to database: ", sqle);      }      ret = false;    } finally {      if (pdb != null) {	try {	  pdb.close();	} catch (SQLException e) {}      }    }    // Now save to the recipe tables.    boolean result = false;    PDbBase pdbb = null;    try {      propAssemblyId.setVisible(true);      pdbb = new PDbBase();      pdbb.insureLibRecipe(this);      result = true;    } catch (Exception sqle) {      if(log.isErrorEnabled()) {        log.error("Exception", sqle);      }      result = false;    } finally {      try {	if (pdbb != null)	  pdbb.close();      } catch (Exception sqle) {	if(log.isErrorEnabled()) {	  log.error("Exception", sqle);	}      }    }    propAssemblyId.setVisible(false);    modified = false;    saveInProgress = false;    // tell listeners society is now saved    fireModification(new ModificationEvent(this, RECIPE_SAVED));    return ret;  }