public function find(DataRequest $dataRequest)
    {
        try {
            $dataRequest->setSelectedFields(array('*'));
            
            $queryBuilder = $this->entityManager->getQueryBuilder();
            $this->entityManager->buildDataRequestQuery($dataRequest, $queryBuilder, $this->getEntityClass(), 'e');
            
            $entities = $queryBuilder->getQuery()->getResult();
            if ($entities == null) {
                return array();
            }
            
            return $entities;
        } catch (\Exception $e) {
            throw new Exception('Cannot load the entities for the given data request.', 0, $e);
        }
    }
public function find(DataRequest $dataRequest)
    {
        try {
            $dataRequest->setSelectedFields(array('*'));
            
            $queryBuilder = $this->entityManager->getQueryBuilder();
            $this->entityManager->buildDataRequestQuery($dataRequest, $queryBuilder, $this->getEntityClass(), 'e');
            
            $entities = $queryBuilder->getQuery()->getResult();
            if ($entities == null) {
                return array();
            }
            
            return $entities;
        } catch (\Exception $e) {
            throw new Exception('Cannot load the entities for the given data request.', 0, $e);
        }
    }
public function find ( DataRequest $ dataRequest ) { try { $ dataRequest -> setSelectedFields ( array ( '*' ) ) ; $ queryBuilder = $ this -> entityManager -> getQueryBuilder ( ) ; $ this -> entityManager -> buildDataRequestQuery ( $ dataRequest , $ queryBuilder , $ this -> getEntityClass ( ) , 'e' ) ; $ entities = $ queryBuilder -> getQuery ( ) -> getResult ( ) ; if ( $ entities == null ) { return array ( ) ; } return $ entities ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot load the entities for the given data request.' , 0 , $ e ) ; } }
Returns an array with all found entities for the given DataRequest
object.

@param \Zepi\Core\Utils\DataRequest $dataRequest
@return array

@throws \Zepi\DataSource\Doctrine\Exception Cannot load the entities for the given data request.
Returns an array with all found entities for the given DataRequest object .