Retrieves one row by primary key value provided

@param   mixed  $id  The primary key field value to use to retrieve one row
@return  \Hubzero\Database\Relational|static
@since   2.0.0
161581
public static function one($id)
	{
		$instance = self::blank();
		return $instance->whereEquals($instance->getPrimaryKey(), $id)->rows()->seek($id);
	}
746485
public function retrieve(string $id)
    {
        $data = $this->retrieveAll();

        if (!array_key_exists($id, $data)) {
            throw new \RuntimeException(sprintf('Unable to load object of type "%s" with ID "%s"', $this->className, $id));
        }

        $object = $data[$id];

        Assertion::isInstanceOf($object, $this->className);

        return $object;
    }
684176
public function findOneById($id)
    {
        $persister = $this->entityManager->getEntityPersister($this->className);

        return $persister->loadOneById($id);
    }
1092131
public static function One($id) {
    $class = get_called_class();
    
    if (! isset(self::$refs[$class][$id])) {
      $file = self::File($id);
      $obj = unserialize(file_get_contents($file));
      self::$refs[$class][$id] = $obj;
    }
    
    return self::$refs[$class][$id];
  }
1057895
public function getByOrderId($id)
    {
        $connection = $this->getConnection();
        $select     = $connection->select()->from($this->getMainTable())->where('order_id = :internal_order_id');
        $bind       = [':internal_order_id' => (string) $id];

        return $connection->fetchRow($select, $bind);
    }
1216046
public function getById($id)
    {
        $this->_db->query(
            'SELECT * FROM '.$this->_dbConfig['table']
                          .' WHERE '.$this->_dbConfig['id'].' = :id',
            [':id'=>$id]
        );
        $row = $this->_db->result();
        if (isset($row[0])) {
            $row = $row[0]->getAll();

            $this->_login = true; //Setando LOGIN como válido/logado

            foreach ($this->_data as $i => $d) {
                if (isset($row[$this->_dbConfig[$i]])) {
                    $this->_data[$i] = $row[$this->_dbConfig[$i]];
                }
            }
            return $this->_data;
        }
        return false;
    }
1363569
protected function getUser($id)
    {
        if (!isset($this->retrievedUsers[$id])) {
            $user = $this->userMapper->findById($id);
            $this->retrievedUsers[$id] = $user;
        }

        return $this->retrievedUsers[$id];
    }
1036355
public function read($id)
    {
        $sql = 'SELECT ' . $this->config['dataColumn'] . ' FROM ' . $this->config['name']
            . ' WHERE ' . $this->config['primary'] . ' = ?'
            . ' AND ' . $this->config['modifiedColumn'] . ' + ' . $this->config['lifetimeColumn'] . ' >= ?';

        $result = $this->fetchOne($sql, array($id, time()));

        if (!$result) {
            $result = '';
        }

        return $result;
    }
96072
public static function find($id) 
    {
        self::_checkLoaded();

        $pk               = self::isIgnoringCase() ? strtolower(self::getPK()) : self::getPK();
        $builder          = self::_makeBuilder();
        $builder->fields  = self::extractColumns();
        $builder->where   = self::_extractWhereConditions(array($pk=>$id));
        $builder->limit   = 1;

        $cls  = get_called_class();
        $stmt = self::executePrepared($builder, array($id));
        $data = $stmt->fetch(\PDO::FETCH_ASSOC);

        if (!$data) {
            return null;
        }
        return new $cls($data);
    }
995988
static public function find($id)
    {
        $model = new static;
        $result = $model->execute('SELECT * FROM '.$model->table.' WHERE '.$model->key.' = ?', [$id]);
        if (is_array($result)) {
            $result = current($result);
        }
        return $result;
    }
378743
public function get($id)
    {
        if (isset($this->values[$id])) {
            return $this->values[$id];
        }

        $callback = $this->getCallback($id);
        $value = call_user_func($callback);

        return $this->values[$id] = $value;
    }
266310
public function fetchById($id) {
        $select = $this->select()->where('id = ?', $id);
        return $this->fetchRow($select);
    }
1152002
public function findById($id) {
        $this->sqlBuilder->addWhere($this->primaryKey, $id);
        $sql = $this->sqlBuilder->buildQueryString();
        return $this->db->getOneRow($sql);
    }
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());
    }
967176
protected function getPosition($id)
    {
        $cols = [
            self::COLUMN_LEFT,
            self::COLUMN_RIGHT,
            'width' => new Expression(self::COLUMN_RIGHT . ' - ' . self::COLUMN_LEFT . ' + 1'),
        ];

        $select = $this->getSelect();

        $where = new Where;
        $where->equalTo($this->getPrimaryKey(), $id);
        $select->columns($cols)->where($where);

        $row = $this->fetchResult($select)->current();

        return $row;
    }
310123
public function get($id = null){
        if(!is_null($id)){
            return $this->find($id);
        }
        return $this->model->get();
    }
1192333
public function getByID($id)
    {
        $pkey = $this->getPrimaryKey();
        if ($pkey === null)
            throw new DAOException("A primary key is required to select a record by ID");

        // If there's a unary primary key, the value can be specified as a
        // single scalar, rather than an array
        if (count($pkey) === 1 && is_scalar($id))
            foreach ($pkey as $colname => $def)
                $id = [$colname => $id];


        $condition = $this->getSelector($pkey, $id);
        $rec = $this->fetchSingle(QB::where($condition));
        if (empty($rec))
            throw new DAOEXception("Object not found with " . WF::str($id));

        $model = new $this->model_class;
        $model->assignRecord($rec, $this->db);
        return $model;
    }