This method looks up an object by it's id, and only returns it if has a child by the given name
(resolving identifier based cross references)

@param id
@param childName
@return
@throws Exception
769101
public Element getById(Element id, String childName) throws Exception {
	  return getById(doc.getDocumentElement(), id, childName);
  }
214307
public Entry getChildEntry(final String pName) throws IOException {
        if (isFile() || rootNodeDId == -1) {
            return null;
        }

        Entry dummy = new Entry();
        dummy.name = pName;
        dummy.parent = this;

        SortedSet child = getChildEntries().tailSet(dummy);
        return (Entry) child.first();
    }
1193713
public DrawerProfile findProfileById(long id) {
        for (DrawerProfile profile : mProfileAdapter.getItems()) {
            if (profile.getId() == id) {
                return profile;
            }
        }
        return null;
    }
824482
def find_by_id(cls, id):
        
        obj = cls.find_one(cls._id_spec(id))
        if not obj:
            raise NotFoundException(cls.collection, id)
        return obj
575908
@Nullable public View findViewById(int id) {
        if (searchView != null) {
            return searchView.findViewById(id);
        } else if (supportView != null) {
            return supportView.findViewById(id);
        }
        throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
    }
201349
@Override
   public DirectoryResourceImpl getChildDirectory(final String name) throws ResourceException
   {
      Resource<?> result = getChild(name);
      if (!(result instanceof DirectoryResourceImpl))
      {
         if (result.exists())
         {
            throw new ResourceException("The resource [" + result.getFullyQualifiedName()
                     + "] is not a DirectoryResource");
         }
      }

      if (!(result instanceof DirectoryResourceImpl))
      {
         result = new DirectoryResourceImpl(getResourceFactory(), new File(getUnderlyingResourceObject()
                  .getAbsoluteFile(), name));
      }
      return (DirectoryResourceImpl) result;
   }
182561
@Override
    public Optional<T> findById(ID id) {
        Assert.notNull(id, "id must not be null");

        if (id instanceof String && !StringUtils.hasText((String) id)) {
            return Optional.empty();
        }

        return Optional.ofNullable(operation.findById(information.getCollectionName(), id, information.getJavaType()));
    }
497625
public HashSet<String> getDataById(String id) throws IOException {
    if (idToVersion.containsKey(id)) {
      return get(id);
    } else {
      return null;
    }
  }
98122
public static @CheckForNull <T extends Descriptor> T findById(Collection<? extends T> list, String id) {
        for (T d : list) {
            if(d.getId().equals(id))
                return d;
        }
        return null;
    }
356788
public static UIComponent findChildByTagId(UIComponent parent, String id)
    {
        Iterator<UIComponent> itr = null;
        if (parent.getChildCount() > 0)
        {
            for (int i = 0, childCount = parent.getChildCount(); i < childCount; i ++)
            {
                UIComponent child = parent.getChildren().get(i);
                if (id.equals(child.getAttributes().get(MARK_CREATED)))
                {
                    return child;
                }
            }
        }
        if (parent.getFacetCount() > 0)
        {
            itr = parent.getFacets().values().iterator();
            while (itr.hasNext())
            {
                UIComponent facet = itr.next();
                // check if this is a dynamically generated UIPanel
                if (Boolean.TRUE.equals(facet.getAttributes()
                             .get(FACET_CREATED_UIPANEL_MARKER)))
                {
                    // only check the children and facets of the panel
                    if (facet.getChildCount() > 0)
                    {
                        for (int i = 0, childCount = facet.getChildCount(); i < childCount; i ++)
                        {
                            UIComponent child = facet.getChildren().get(i);
                            if (id.equals(child.getAttributes().get(MARK_CREATED)))
                            {
                                return child;
                            }
                        }
                    }
                    if (facet.getFacetCount() > 0)
                    {
                        Iterator<UIComponent> itr2 = facet.getFacets().values().iterator();
                        while (itr2.hasNext())
                        {
                            UIComponent child = itr2.next();
                            if (id.equals(child.getAttributes().get(MARK_CREATED)))
                            {
                                return child;
                            }
                        }
                    }
                }
                else if (id.equals(facet.getAttributes().get(MARK_CREATED)))
                {
                    return facet;
                }
            }
        }

        return null;
    }
3474
protected String getChildName(String child, String parent) throws IOException {
    if (child.startsWith(parent)) {
      return child.substring(parent.length());
    }
    throw new IOException(ExceptionMessage.INVALID_PREFIX.getMessage(parent, child));
  }
1250091
public XNElement childElement(String name) {
        for (XNElement e : children) {
            if (e.name.equals(name)) {
                return e;
            }
        }
        return null;
    }
173922
public Edge lookupEdgeById(int id) {
        Iterator<Edge> i = edgeIterator();
        while (i.hasNext()) {
            Edge edge = i.next();
            if (edge.getId() == id) {
                return edge;
            }
        }
        return null;
    }
1060774
@Override
    public Set<Span> getChildren(String tenant, String id) {
        if (id == null) {
            throw new NullPointerException("Id should not be null!");
        }

        Set<Span> children = childrenCache.get(id);

        return children == null ? null : Collections.unmodifiableSet(children);
    }
1369020
public function getChildById($id)
    {
        foreach ($this->children as $child) {
            if ($child->id === $id) {
                return $child;
            }

            $subChild = $child->getChildById($id);
            if ($subChild !== null) {
                return $subChild;
            }
        }

        return null;
    }
916626
public static linkset get(nitro_service service, String id) throws Exception{
		linkset obj = new linkset();
		obj.set_id(id);
		linkset response = (linkset) obj.get_resource(service);
		return response;
	}
717670
@SuppressWarnings("unchecked")
    public <M extends T> M byId(ID id) {
        return (M) server().find(getModelType(), id);
    }