@param $recordId

@return Record
974693
public function getRecord($recordId, $contentTypeName = null, DataDimensions $dataDimensions = null)
    {

        if ($contentTypeName == null)
        {
            $contentTypeName = $this->getCurrentContentTypeName();
        }

        $records = $this->getAllRecords($contentTypeName, $dataDimensions);

        if (array_key_exists($recordId, $records))
        {
            return $records[$recordId];
        }

        KVMLogger::instance('anycontent-connection')
                 ->info('Record ' . $recordId . ' not found for content type ' . $this->getCurrentContentTypeName());

        return false;

    }
444302
public function getResource($recordId)
    {
        $collection = $this->getThisCollection();
        $repository = $this->getRepository();
        $returnedResource = null;

        list($returnedResource, $resultSet) = $this->loadResource($recordId, $collection, $repository);

        if($returnedResource) {
            $relationships = $collection->getRelationships();

            if (count($relationships)) {
                foreach ($relationships as $tableReference => $field) {
                    /** @var ForestField $field */
                    $foreignCollection = $this->findCollection($tableReference);

                    $relationship = new ForestRelationship;
                    $relationship->setType($foreignCollection->getName());
                    $relationship->setEntityClassName($foreignCollection->getEntityClassName());
                    $relationship->setFieldName($field->getField());
                    $relationship->setIdentifier($foreignCollection->getIdentifier());
                    if ($field->isTypeToOne()) {
                        $relationship->setId($resultSet[$field->getForeignKey()]);
                    }
                        $returnedResource->addRelationship($relationship);
                }

                foreach($returnedResource->getRelationships() as $relationship) {
                    if($relationship->getId()) {
                        $foreignCollection = $this->findCollection($relationship->getType());
                        $foreignRepository = $this->getEntityManager()->getRepository($relationship->getEntityClassName());
                        list($resourceToInclude, $rs) = $this->loadResource(
                            $relationship->getId(), 
                            $foreignCollection, 
                            $foreignRepository
                        );
                        
                        if($resourceToInclude) {
                            $resourceToInclude->setType($relationship->getType());
                            $returnedResource->includeResource($resourceToInclude);
                        }
                    }
                }
            }
        }

        return $returnedResource->formatJsonApi();
    }
223727
public function findPageById($pageId)
    {
        $this->makeCollectionPageSelect(true);
        $this->sql .= ' and p.id = ?';
        $this->bindValues[] = $pageId;

        return $this->findRow();
    }
334291
private function getDbData($sessionid): ?stdClass
    {
        $r = null;

        try {
            if ($this->disableLog) {
                Log::temporaryDisable('sql');
            }

            $r = $this->getAdapter()
              ->select($this->getTableName())
              ->field('time')
              ->field('data')
              ->where('id', $sessionid)
              ->fetchFirstObj();

        } catch (DbException $e) {
            throw $e;

        } finally {
            if ($this->disableLog) {
                Log::restoreTemporaryDisablement();
            }
        }

        return $r;
    }
1130642
public static function getByID($id)
    {
        $record = static::getRecordByField(static::$primaryKey ? static::$primaryKey : 'ID', $id, true);

        return static::instantiateRecord($record);
    }
299518
protected function get_entry($entryid) {
        global $DB;

        if (empty($this->entriesdata[$entryid])) {
            $this->entriesdata[$entryid] = $DB->get_record_sql("SELECT ge.*, g.course, g.defaultapproval FROM {glossary_entries} ge
                                                                  JOIN {glossary} g ON g.id = ge.glossaryid
                                                                WHERE ge.id = ?", array('id' => $entryid), MUST_EXIST);
        }
        return $this->entriesdata[$entryid];
    }
985234
public function read($callId, $legId, $recordingId, $transcriptionId)
    {
        list(, , $body) = $this->HttpClient->performHttpRequest(Common\HttpClient::REQUEST_GET,
            "calls/$callId/legs/$legId/recordings/$recordingId/transcriptions/$transcriptionId");

        return $this->processRequest($body);
    }
872151
public function update_onDelete($recordId = null)
    {
        $model = $this->formFindModelObject($recordId);

        $model->forceDelete();

        Flash::success(Lang::get('backend::lang.form.delete_success'));

        if ($redirect = $this->makeRedirect('delete', $model)) {
            return $redirect;
        }
    }
1101397
public function find($id)
    {
        $rel = $this->currentOrClone();
        $modelClass = $this->modelClass;
        $tableName  = $modelClass::tableName();
        $first = $rel->where([$tableName . '.' . $modelClass::primaryKey() => $id])->first();
        if (!$first) {
            throw new RecordNotFoundException(sprintf(
                "Couldn't find %s with %s=%s",
                $this->modelClass,
                $modelClass::primaryKey(),
                $id
            ));
        }
        return $first;
    }
1281787
public function createRecord($spaceId, $objectId, RecordParameters $parameters)
    {
        $requestData = $this->getDefaultRequestData('json', $parameters->exportToArray());
        $endpoint = vsprintf('projects/%s/spaces/%s/objects/%s/records', [
            $this->getProjectId(),
            $spaceId,
            $objectId,
        ]);

        return $this->sendRequest($endpoint, $requestData, static::HTTP_METHOD_POST);
    }
862326
public function getRecord($id, $versionID = null)
    {
        if (!$id) {
            return null;
        }
        $treeClass = $this->config()->get('tree_class');
        if ($id instanceof $treeClass) {
            return $id;
        }
        if (substr($id, 0, 3) == 'new') {
            return $this->getNewItem($id);
        }
        if (!is_numeric($id)) {
            return null;
        }

        $currentStage = Versioned::get_reading_mode();

        if ($this->getRequest()->getVar('Version')) {
            $versionID = (int) $this->getRequest()->getVar('Version');
        }

        /** @var SiteTree $record */
        if ($versionID) {
            $record = Versioned::get_version($treeClass, $id, $versionID);
        } else {
            $record = DataObject::get_by_id($treeClass, $id);
        }

        // Then, try getting a record from the live site
        if (!$record) {
            // $record = Versioned::get_one_by_stage($treeClass, "Live", "\"$treeClass\".\"ID\" = $id");
            Versioned::set_stage(Versioned::LIVE);
            singleton($treeClass)->flushCache();

            $record = DataObject::get_by_id($treeClass, $id);
        }

        // Then, try getting a deleted record
        if (!$record) {
            $record = Versioned::get_latest_version($treeClass, $id);
        }

        // Set the reading mode back to what it was.
        Versioned::set_reading_mode($currentStage);

        return $record;
    }
869702
public function get($recordingId)
    {
        if (ArrayOperations::checkNull([$recordingId])) {
            throw
            new PlivoValidationException(
                'recording id is mandatory');
        }

        $response = $this->client->fetch(
            $this->uri . $recordingId .'/',
            []
        );

        return new Recording(
            $this->client, $response->getContent(),
            $this->pathParams['authId']);
    }
591842
def get(self, record_id):
        
        record_url = self.record_url(record_id)
        return self._get(record_url)
104155
public function get_file_by_id($fileid) {
        global $DB;

        $sql = "SELECT ".self::instance_sql_fields('f', 'r')."
                  FROM {files} f
             LEFT JOIN {files_reference} r
                       ON f.referencefileid = r.id
                 WHERE f.id = ?";
        if ($filerecord = $DB->get_record_sql($sql, array($fileid))) {
            return $this->get_file_instance($filerecord);
        } else {
            return false;
        }
    }
1076030
public function deleteRecord(int $recordID) {
        foreach ($this->getRecords() as $key => $record) {
            if ($record['id'] == $recordID) {
                $this->database->getReference()
                    ->getChild($this->table)
                    ->getChild($key)
                    ->set(null);

                return true;
            }
        }

        return false;
    }
728892
function get_record($id, $assoc = false)
    {
        // return cached result
        if ($this->result && ($first = $this->result->first()) && $first[$this->primary_key] == $id) {
            return $assoc ? $first : $this->result;
        }

        $this->db->query(
            "SELECT * FROM " . $this->db->table_name($this->db_name, true).
            " WHERE `contact_id` = ?".
                " AND `user_id` = ?".
                " AND `del` <> 1",
            $id,
            $this->user_id
        );

        $this->result = null;

        if ($sql_arr = $this->db->fetch_assoc()) {
            $record = $this->convert_db_data($sql_arr);
            $this->result = new rcube_result_set(1);
            $this->result->add($record);
        }

        return $assoc && $record ? $record : $this->result;
    }
1374139
public function format($id, $recordObj)
    {
        if (!isset($recordObj->metadata)) {
            throw new \Exception("Unexpected missing record metadata.");
        }

        $raw = trim($recordObj->metadata->asXML());

        // Extract the actual metadata from inside the <metadata></metadata> tags;
        // there is probably a cleaner way to do this, but this simple method avoids
        // the complexity of dealing with namespaces in SimpleXML.
        //
        // We should also apply global search and replace at this time, if
        // applicable.
        $record = $this->performGlobalReplace(
            preg_replace('/(^<metadata[^\>]*>)|(<\/metadata>$)/m', '', $raw)
        );

        // Collect attributes (for proper namespace resolution):
        $metadataAttributes = $this->extractMetadataAttributes($raw, $record);

        // If we are supposed to inject any values, do so now inside the first
        // tag of the file:
        $insert = $this->getIdAdditions($id)
            . $this->getHeaderAdditions($recordObj->header);
        $xml = !empty($insert)
            ? preg_replace('/>/', '>' . $insert, $record, 1) : $record;

        // Build the final record:
        return trim(
            $this->fixNamespaces(
                $xml, $recordObj->getDocNamespaces(), $metadataAttributes
            )
        );
    }