src/Graviton/RestBundle/Model/DocumentModel.php
public function find($documentId, $forceClear = false)
    {
        if ($forceClear) {
            $this->repository->clear();
        }
        $result = $this->repository->find($documentId);

        if (empty($result)) {
            throw new NotFoundException("Entry with id " . $documentId . " not found!");
        }

        return $result;
    }
public function find($documentId, $forceClear = false)
    {
        if ($forceClear) {
            $this->repository->clear();
        }
        $result = $this->repository->find($documentId);

        if (empty($result)) {
            throw new NotFoundException("Entry with id " . $documentId . " not found!");
        }

        return $result;
    }
public function find ( $ documentId , $ forceClear = false ) { if ( $ forceClear ) { $ this -> repository -> clear ( ) ; } $ result = $ this -> repository -> find ( $ documentId ) ; if ( empty ( $ result ) ) { throw new NotFoundException ( "Entry with id " . $ documentId . " not found!" ) ; } return $ result ; }
finds a single entity

@param string  $documentId id of entity to find
@param boolean $forceClear if we should clear the repository prior to fetching

@throws NotFoundException
@return Object
finds a single entity