public static long getIdByName(Map<Long, String> qcIdNames,
                                  String qcName)
   {
      long id = 0;
      for (Map.Entry<Long, String> me : qcIdNames.entrySet()) {
         if (qcName.equals(me.getValue())) {
            id = me.getKey();
            break;
         }
      }
      return id;
   }