docs: protected Root getEntityByIdentifier(Root root, String inputAttrName, String inputAttrValue, String outputAttrName, BridgeUtils mapUtils) throws WIMException {
  
          boolean isInputAttrIdentifier = mapUtils.isIdentifierTypeProperty(inputAttrName); //&& UniqueNameHelper.isDN(inputAttrValue) != null;
          boolean isInputAttrExternalId = inputAttrName.equals(Service.PROP_EXTERNAL_NAME);
          boolean isOutputAttrIdentifier = mapUtils.isIdentifierTypeProperty(outputAttrName);
  
          Root returnValue = null;
  
          // check if the input attribute is an identifier type
          if (isInputAttrIdentifier || hasFederatedRegistry) {
              if (!isOutputAttrIdentifier) {
                  mapUtils.createPropertyControlDataObject(root, outputAttrName);
              }
              // use the root DataGraph to create a LoginAccount DataObject
              List<Entity> entities = root.getEntities();
              Entity entity = null;
              if (entities != null) {
                  entity = new Entity();
                  entities.add(entity);
              }
              if (entity != null) {
                  IdentifierType idfType = new IdentifierType();
                  if (SchemaConstants.PROP_PRINCIPAL_NAME.equalsIgnoreCase(inputAttrName) || "CN".equalsIgnoreCase(inputAttrName))
                      idfType.set(SchemaConstants.PROP_UNIQUE_NAME, inputAttrValue);
                  else
                      idfType.set(inputAttrName, inputAttrValue);
                  entity.setIdentifier(idfType);
              }
  
              // Create an external name control if the external identifier is being used
              if (isInputAttrExternalId) {
                  List<Control> controls = root.getControls();
                  if (controls != null)
                      controls.add(new ExternalNameControl());
              }
  
              // invoke ProfileService.get with the input root DataGraph
              returnValue = mapUtils.getWimService().get(root);
  
              if (returnValue != null && returnValue.getEntities().isEmpty()) {
                  returnValue = null;
              }
          }
  
          return returnValue;
      }