Returns this or a child entity with the given id.<p>
Will return <code>null</code> if no entity with the given id is present.<p>

@param entityId the entity id

@return the entity
17690
public CmsEntity getEntityById(String entityId) {

        CmsEntity result = null;
        if (m_id.equals(entityId)) {
            result = this;
        } else {
            for (List<CmsEntity> children : m_entityAttributes.values()) {
                for (CmsEntity child : children) {
                    result = child.getEntityById(entityId);
                    if (result != null) {
                        break;
                    }
                }
                if (result != null) {
                    break;
                }
            }
        }
        return result;
    }
1281708
public void selectEntity(final Long entityId) {
        E entity = null;
        if (entityId != null) {
            entity = findEntityByTableValue(entityId).orElse(null);
        }

        setLastSelectedEntityId(entityId);
        publishSelectedEntityEvent(entity);
    }
248793
public IBasicEntity get(EntityIdentifier entityID) throws CachingException {
        return EntityCachingServiceLocator.getEntityCachingService()
                .get(entityID.getType(), entityID.getKey());
    }
1219706
public AndroidElement get(String elementId) {
    AndroidElement element = cache.get(elementId);

    if (element instanceof AndroidNativeElement) {
      if (!ViewHierarchyAnalyzer.getDefaultInstance().isViewChieldOfCurrentRootView(
          ((AndroidNativeElement) element).getView())) {
        return null;
      }
    }
    return element;
  }
272429
public EntityAnnotation getEntityAnnotation(final String entityUri) {
        return Iterables.find(getEntityAnnotations(),
                new Predicate<EntityAnnotation>() {

                    @Override
                    public boolean apply(EntityAnnotation ea) {
                        return ea.getEntityReference().getUri()
                                .equals(entityUri);
                    }

                }
        );
    }
1371196
public Object loadById(Class entity, Serializable id) throws Exception  {
		return getHibernateTemplate().load(entity, id);
	}
870611
@Override
    public Long get(Entity entity) {
        Objects.requireNonNull(entity, "entity cannot be null");
        // return id()
        return entity.id();
    }
1067383
public static boolean findEntityRecursively(final EntityContainer container, final UUID id) {
	final AtomicBoolean found = new AtomicBoolean();

	walkEntityTree(container, e -> {
	    if (id.equals(e.getID())) {
		found.set(true);
		return EntityVisitResult.EXIT;
	    } else {
		return EntityVisitResult.CONTINUE;
	    }
	});

	return found.get();
    }
651320
public function addEntityWithId($entityId)
    {
        $entity = $this->getRepository()->get($entityId);
        if (!$entity) {
            throw new EntityNotFoundException(
                "The entity with is '{$entityId}' was not found."
            );
        }
        return $this->addEntity($entity);
        
    }
82674
public function findById($entityId)
    {
        $this->adapter->select($this->entityTable, "id = {$entityId}");

        if (($data = $this->adapter->fetch()) !== false) {
            return $this->createEntity($data);
        }

        return null;
    }
570651
public ServiceInstanceEntity get(final String serviceId)
	{
		try
		{
			return serviceCache.get(serviceId, () -> dao.getById(serviceId));
		}
		catch (Exception e)
		{
			throw new RuntimeException("Error loading service: " + serviceId, e);
		}
	}
824908
public function get(int $id)
    {
        if ($id === null) {
            return null;
        }

        if (isset($this->entities[$id])) {
            return $this->entities[$id];
        }

        // Entities are mutable
        // Search through the previously null-id entities
        // in case an id has been set now.
        foreach ($this->nullIdEntities as $entity) {
            if ($entity->getId() === $id) {
                return $entity;
            }
        }

        return null;
    }
1169671
public Object getObjectWithId( IdKey id ) {
        if ( null != idToObject ) {
            return idToObject.get( id );
        }
        return null;
    }
942810
public function get($entityId = null)
    {
        if (null !== $entityId) {
            $entityId = '/'.$entityId;
        }


        $response = $this->client->get(sprintf('/entities%s', $entityId));

        return $this->decodeResponse($response);
    }
724284
public Optional<Object> getById(final UUID id) {
        return Optional.ofNullable(idToObject.get(id));
    }
1159560
private EntityContainer getEntityContainer() throws ODataRenderException {
        EntityContainer entityContainer = entityDataModel.getEntityContainer();
        if (entityContainer == null) {
            String message = "EntityContainer should not be null";
            LOG.error(message);
            throw new ODataRenderException(message);
        }
        return entityContainer;
    }
653997
public EntityType getEntityType(Class<?> entityClass) {
    String className = entityClass.getName();
    EntityType type = entityTypes.get(className);
    if (null != type) { return type; }

    type = classEntityTypes.get(className);
    if (null == type) {
      List<EntityType> matched = CollectUtils.newArrayList();
      for (EntityType entityType : entityTypes.values()) {
        if (className.equals(entityType.getEntityName())
            || className.equals(entityType.getEntityClass().getName())) {
          matched.add(entityType);
        }
      }
      if (matched.size() > 1) { throw new RuntimeException("multi-entityName for class:" + className); }
      if (matched.isEmpty()) {
        EntityType tmp = new EntityType(entityClass);
        classEntityTypes.put(className, tmp);
        return tmp;
      } else {
        classEntityTypes.put(className, matched.get(0));
        type = (EntityType) matched.get(0);
      }
    }
    return type;
  }