oldCMTAsbid = getAssemblyId();
if (oldAssemblyId != null) oldCMTAsbid = oldAssemblyId; currAssID = getAssemblyId();  if (currAssID.startsWith("CMT")) { if (log.isDebugEnabled()) { log.debug("saveToDB not saving CMT society (" + getSocietyName() + ") with id " + currAssID + " and old ID " + oldCMTAsbid); } return false; }
  public boolean saveToDatabase() {    if(log.isInfoEnabled()) {      log.info("saveToDatabase society (" + getSocietyName() + " with asb: " + getAssemblyId());    }    // 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 = null;    String currAssID = null;    // FIXME: How do I get that old assembly ID?    // Is it the assemblyId in the current assemblyid slot?    oldCMTAsbid = getAssemblyId();        // 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?    try {      // FIXME: Is there a non-gui conflict handler I should use?      PopulateDb pdb = new PopulateDb(oldCMTAsbid, getSocietyName(), currAssID, GUIUtils.createSaveToDbConflictHandler(null));      pdb.populateCSA(SocietyComponentCreator.getComponentData(this));      // Set the new CSA assembly ID on the society - get it from the PDB      setAssemblyId(pdb.getCMTAssemblyId());      // What about fixAssemblies?      // is it really populateCSA?      pdb.close();    } catch (Exception sqle) {      if (log.isErrorEnabled()) {	log.error("Error saving society to database: ", sqle);      }      return false;    }    return true;  }