public function findOneById($id)
    {
        try {
            return $this->_documentHandler->getById($this->_collectionName, $id);
        } catch (ServerException $e) {
            if ($e->getServerMessage() === 'document not found') {
                return null;
            }
            throw $e;
        }
    }
public function findOneById($id)
    {
        try {
            return $this->_documentHandler->getById($this->_collectionName, $id);
        } catch (ServerException $e) {
            if ($e->getServerMessage() === 'document not found') {
                return null;
            }
            throw $e;
        }
    }
public function findOneById ( $ id ) { try { return $ this -> _documentHandler -> getById ( $ this -> _collectionName , $ id ) ; } catch ( ServerException $ e ) { if ( $ e -> getServerMessage ( ) === 'document not found' ) { return null ; } throw $ e ; } }
Gets one document by given ID

@param string|int $id

@return AbstractEntity|null
@throws ServerException
Gets one document by given ID