docs: private void genSearchString(StringBuffer searchExpBuffer, PropertyNode propNode) throws WIMException {
          String propName = propNode.getName();
          String ldapAttrName = null;
          String dataType = null;
          Set<String> attrs = ldapConfigMgr.getAttributeNames(entityTypes, propName);
          // attrs known to be non-null as getAttributesNames creates a new set
          if (attrs.size() == 1) {
              ldapAttrName = (String) attrs.toArray()[0];
  
              Object value = null;
  
              for (String entityType : entityTypes) {
                  Entity entity = null;
                  if (entityType != null) {
                      if (entityType.equalsIgnoreCase("PersonAccount") || entityType.equalsIgnoreCase("LoginAccount"))
                          entity = new PersonAccount();
                      else if (entityType.equalsIgnoreCase("Person"))
                          entity = new Person();
                      else if (entityType.equalsIgnoreCase("Group"))
                          entity = new Group();
                      else
                          entity = new Entity();
  
                      dataType = entity.getDataType(propName);
                  }
  
                  if (dataType != null) {
                      value = ldapConfigMgr.getLdapValue(propNode.getValue(), dataType, ldapAttrName);
                  } else {
                      throw new PropertyNotDefinedException(WIMMessageKey.PROPERTY_NOT_DEFINED, Tr.formatMessage(tc, WIMMessageKey.PROPERTY_NOT_DEFINED,
                                                                                                                 WIMMessageHelper.generateMsgParms(propName)));
                  }
              }
  
              short operator = ldapConfigMgr.getOperator(propNode.getOperator());
              value = ldapConfigMgr.escapeSpecialCharacters((String) value);
              Object[] arguments = { ldapAttrName, value };
              String searchCondtion = ldapConfigMgr.CONDITION_FORMATS[operator].format(arguments);
              searchExpBuffer.append(searchCondtion);
  
          } else if (attrs.size() > 1) {
              searchExpBuffer.append("|");
              for (String entityType : entityTypes) {
                  LdapEntity ldapEntity = ldapConfigMgr.getLdapEntity(entityType);
                  ldapAttrName = ldapConfigMgr.getAttributeName(ldapEntity, propName);
                  /*
                   * if (ldapAttrName == null) {
                   * //search property is not defined
                   * throw new PropertyNotDefinedException(WIMMessageKey.PROPERTY_NOT_DEFINED, Tr.formatMessage(
                   * tc,
                   * WIMMessageKey.PROPERTY_NOT_DEFINED,
                   * WIMMessageHelper.generateMsgParms(propName)));
                   * }
                   */
                  Object value = null;
  
                  Entity entity = null;
                  if (entityType != null) {
                      if (entityType.equalsIgnoreCase("PersonAccount"))
                          entity = new PersonAccount();
                      else if (entityType.equalsIgnoreCase("Person"))
                          entity = new Person();
                      else if (entityType.equalsIgnoreCase("Group"))
                          entity = new Group();
                      else
                          entity = new Entity();
  
                      dataType = entity.getDataType(propName);
                  }
  
                  value = ldapConfigMgr.getLdapValue(propNode.getValue(), dataType, ldapConfigMgr.getSyntax(ldapAttrName));
                  short operator = ldapConfigMgr.getOperator(propNode.getOperator());
                  value = ldapConfigMgr.escapeSpecialCharacters((String) value);
                  Object[] arguments = { ldapAttrName, value };
                  String searchCondtion = ldapConfigMgr.CONDITION_FORMATS[operator].format(arguments);
                  searchExpBuffer.append("(");
                  searchExpBuffer.append(searchCondtion);
                  searchExpBuffer.append(")");
              }
          }
      }