Returns all application server entities from database.

@param string $id An id of the entity to find.

@return string
763890
private function selectDataById($id)
    {
        $query = "SELECT " . $this->config->getDecodeValueQuery() .
            " as oxvarvalue FROM oxconfig WHERE oxvarname = ? AND oxshopid = ? FOR UPDATE";

        $parameter = [
            self::CONFIG_NAME_FOR_SERVER_INFO.$id,
            $this->config->getBaseShopId()
        ];

        $this->database->setFetchMode(\OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface::FETCH_MODE_ASSOC);
        return $this->database->getOne($query, $parameter);
    }
324888
public function read($id)
    {
        $stmt = $this->db->prepare("SELECT session_data FROM " . $this->tableName . " WHERE session_id = :id");
        $stmt->execute(['id' => $id]);
        return base64_decode($stmt->fetchColumn());
    }
1010196
public function find($id)
    {
        foreach ($this->findAll() as $repo) {
            if ($id == $repo->getId()) {
                return $repo;
            }
        }

        return null;
    }
187800
protected function getType($id)
    {
        $type = $this->attributeTypeRepository->find($id);
        if (!$type) {
            throw new EntityNotFoundException(AttributeType::class, $id);
        }

        return $type;
    }
1008407
public function findDocument($id)
    {
        $documentPath = '/'.$this->databaseName.'/'.urlencode($id);

        return $this->httpClient->request('GET', $documentPath);
    }
1225658
public function getById($id)
    {
		$repo   = $this->getRepository('erdiko\users\entities\User');
		$result = $repo->findOneBy(array('id' => $id ));

		return $result;
	}
1213219
public function getAction($id)
    {
        $view = $this->responseGetById(
            $id,
            function($id) {
                return $this->getDoctrine()
                    ->getRepository(self::$entityName)
                    ->find($id);
            }
        );

        return $this->handleView($view);
    }
1041619
public static function getByID($id)
    {
        if ($id) {
            $app = Application::getFacadeApplication();
            $em = $app->make(EntityManagerInterface::class);
            $result = $em->find(ThumbnailTypeEntity::class, $id);
        } else {
            $result = null;
        }

        return $result;
    }
1326340
public function getBackups($id)
    {
        $backups = $this->adapter->get(sprintf('%s/droplets/%d/backups?per_page=%d', $this->endpoint, $id, 200));

        $backups = json_decode($backups);

        $this->meta = $this->extractMeta($backups);

        return array_map(function ($backup) {
            return new ImageEntity($backup);
        }, $backups->backups);
    }
85190
protected function getQBuilderBaseEditables($id) {
        $query_builder = $this->createQueryBuilder("entity")
                ->select('entity') //, 'trans')
//                ->leftjoin('entity.translations', 'trans')
//                ->join('trans.trans_lang', 'language', \Doctrine\ORM\Query\Expr\join::WITH, "language.status in (1, 2)")
                ->where("entity.id = :id")
//                ->andWhere("language.status in (1, 2)")
                ->setParameter('id', $id);
        return $query_builder;
    }
805483
public function get($id)
    {
        if (!is_array($id)) {
            $index = $this->getIndex();
            $id = $this->db->escape_string($id);
            return $this->build($this->db->select('SELECT * FROM `' . $this->table_name . '` WHERE `' . $index . '` = ? ',
                array($id), $this->getCacheId($id)));
        }
        if (is_array($id)) {
            $fieldsValue = $id;
            $fields = $this->getFields();
            $sql = '';
            $args = array();
            foreach ($fields as $field) {
                if (isset($fieldsValue[$field])) {
                    $args[$field] = $fieldsValue[$field];
                    $sql .= '`' . $field . '` = :' . $field . ' AND ';
                }
            }
            if (!empty($sql)) {
                $sql = substr($sql, 0, -5);
                return $this->build($this->db->select('SELECT * FROM `' . $this->table_name . '` WHERE ' . $sql, $args, $this->getCacheId($id)));
            }
        }
        return $this->build(array());
    }
749913
public function all($id = null)
    {
        if (!is_int($id)) {
            return $this->get('/repositories');
        }

        return $this->get('/repositories?since='.rawurldecode($id));
    }
577265
public function findById($id)
    {
        if ($id === null) {
            throw new \Exception('The parameter $id is mandatory');
        }

        //get all the business entities
        $businessEntities = $this->getBusinessClasses();

        //the result
        $businessEntity = null;

        //parse the business entities
        foreach ($businessEntities as $tempBusinessEntity) {
            //look for the same id
            if ($tempBusinessEntity->getId() === $id) {
                $businessEntity = $tempBusinessEntity;
                //business entity was found, there is no need to continue
                continue;
            }
        }

        return $businessEntity;
    }
1205026
public function getEntity($id = 0)
    {
        try {
            $q = $this->createQueryBuilder($this->getTableAlias());
            if (is_array($id)) {
                $this->buildSelectClause($q, $id);
                $extendedFieldId = $id['id'];
            } else {
                $extendedFieldId = $id;
            }
            $idArray   = explode('@', $extendedFieldId);
            $leadId    = isset($idArray[0]) && !is_null($idArray[0]) ? $idArray[0] : null;
            $leadField = isset($idArray[1]) && !is_null($idArray[1]) ? $idArray[1] : null;
            $q->andWhere($this->getTableAlias().'.lead = '.$leadId);
            $q->andWhere($this->getTableAlias().'.leadField = '.$leadField);
            $entity = $q->getQuery()->getSingleResult();
        } catch (\Exception $e) {
            $entity = null;
        }

        if (null != $entity && isset($extendedFieldId)) {
            // @todo - likely needs refactoring...
            $fieldValues = $this->getFieldValues($extendedFieldId, true, 'extendedField');
            $entity->setFields($fieldValues);
        }

        return $entity;
    }
800301
public function findById(int $id)
    {
        $entity = null;

        for ($i = 0; $i < count($this->registries); $i++) {
            /** @var RegistryInterface $registry */
            $registry = $this->registries[ $i ];
            $entity = $registry->findByKey($id);

            if ($entity instanceof AbstractEntity) {
                $this->updateRegistries([$entity], $i - 1);
                break;
            }
        }

        return $entity;
    }
375435
public function getEntities($id, array $params = array())
    {
        return $this->get($this->path.'/'.rawurlencode($id).'/entities', $params);
    }
1017658
public function fetchEntityById($id)
    {
        $select = $this->tableGateway->getSql()->select();
        $select->where->equalTo($this->tableGateway->getPrimaryKey(), $id);

        return $this->tableGateway->fetchEntity($select);
    }