substitutions.put(":assembly_id:", assemblyId);
  public String createCSAAssembly(String cmtAsbID, String societyName) throws SQLException {    // whatever the current cmtAssemblyId (possibly really a CSA)    // create a new CSA assembly from it:    // entry in asb_assembly and copy any oplan rows    // and return the new ID    // which will be     if (log.isDebugEnabled()) {      log.debug("Creating new CSA " + (cmtAsbID != null ? "based on soc: " + cmtAsbID : "from scratch") + " named " + societyName);    }    String assemblyIdPrefix = csaType + "-";    substitutions.put(":assembly_id_pattern:", assemblyIdPrefix + "____");    substitutions.put(":assembly_type:", csaType);    String assemblyId = getNextId("queryMaxAssemblyId", assemblyIdPrefix);    csaAssemblyId = assemblyId;    substitutions.put(":assembly_id:", assemblyId);    executeUpdate(dbp.getQuery("insertAssemblyId", substitutions));    if (societyName == null) {      if (cmtAsbID != null && ! cmtAsbID.equals(""))	societyName = getAssemblyDesc(cmtAsbID);      else	societyName = "New Society";    }    substitutions.put(":soc_desc:", societyName);    if (cmtAsbID != null && ! cmtAsbID.equals("")) {      // Created from an old Assembly      // If the name we're using is not the same as that of the old Society      // we're OK. If it is, modify the name slightly      if (societyName.equals(getAssemblyDesc(cmtAsbID)))	substitutions.put(":soc_desc:", societyName + "-modified");      // Putting the old AssemblyID in the society name is a bit ugly.      //      substitutions.put(":soc_desc:", societyName + " based on " + cmtAsbID);      // Came from a CMT assembly. Copy the OPLAN stuff      copyOPLANData(cmtAsbID, assemblyId);    }    executeUpdate(dbp.getQuery("updateAssemblyDesc", substitutions));    return assemblyId;  }