Changeset 1617

Show
Ignore:
Timestamp:
06/03/08 07:31:41 (4 months ago)
Author:
mikey
Message:

update entity manager with last changes from finder: remove constructor argument support, add order by overruling

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/rdbms/persistence/stubDefaultEntityManager.php

    r1510 r1617  
    4242     * @param   stubBaseReflectionClass      $entityClass  class information about the entity 
    4343     * @param   array                        $primaryKeys  list of primary keys (name => value) 
    44      * @param   array                        $arguments    arguments for the constructor 
    4544     * @return  object 
    4645     * @throws  stubDatabaseFinderException 
    4746     * @throws  stubPersistenceException 
    4847     */ 
    49     public function findByPrimaryKey(stubBaseReflectionClass $entityClass, array $primaryKeys, array $arguments = null
     48    public function findByPrimaryKey(stubBaseReflectionClass $entityClass, array $primaryKeys
    5049    { 
    5150        return stubDatabaseFinder::getInstance($this->connection) 
    52                                  ->findByPrimaryKeys($entityClass, $primaryKeys, $arguments); 
     51                                 ->findByPrimaryKeys($entityClass, $primaryKeys); 
    5352    } 
    5453 
     
    5857     * @param   stubCriterion                $criterion 
    5958     * @param   string                       $entityClass  entity class to find instances of 
    60      * @param   array                        $arguments    optional  arguments for constructor 
     59     * @param   string                       $orderBy      optional  overrule default order of entity 
    6160     * @return  stubDatabaseFinderResult     list of instances of $entityClass found with $criterion 
    6261     * @throws  stubDatabaseFinderException 
    6362     * @throws  stubPersistenceException 
    6463     */ 
    65     public function findByCriterion(stubCriterion $criterion, stubBaseReflectionClass $entityClass, array $arguments = null) 
     64    public function findByCriterion(stubCriterion $criterion, stubBaseReflectionClass $entityClass, $orderBy = null) 
    6665    { 
    6766        return stubDatabaseFinder::getInstance($this->connection) 
    68                                  ->findByCriterion($criterion, $entityClass, $arguments); 
     67                                 ->findByCriterion($criterion, $entityClass, $orderBy); 
    6968    } 
    7069 
     
    7372     * 
    7473     * @param   string                       $entityClass  entity class to find instances of 
    75      * @param   array                        $arguments    optional  arguments for constructor 
     74     * @param   string                       $orderBy      optional  overrule default order of entity 
    7675     * @return  stubDatabaseFinderResult     list of instances of $entityClass found 
    7776     * @throws  stubDatabaseFinderException 
    7877     * @throws  stubPersistenceException 
    7978     */ 
    80     public function findAll(stubBaseReflectionClass $entityClass, array $arguments = null) 
     79    public function findAll(stubBaseReflectionClass $entityClass, $orderBy = null) 
    8180    { 
    8281        return stubDatabaseFinder::getInstance($this->connection) 
    83                                  ->findAll($entityClass, $arguments); 
     82                                 ->findAll($entityClass, $orderBy); 
    8483    } 
    8584 
  • trunk/src/main/php/net/stubbles/rdbms/persistence/stubEntityManager.php

    r1470 r1617  
    2828     * @param   stubBaseReflectionClass      $entityClass  class information about the entity 
    2929     * @param   array                        $primaryKeys  list of primary keys (name => value) 
    30      * @param   array                        $arguments    arguments for the constructor 
    3130     * @return  object 
    3231     * @throws  stubDatabaseFinderException 
    3332     * @throws  stubPersistenceException 
    3433     */ 
    35     public function findByPrimaryKey(stubBaseReflectionClass $entityClass, array $primaryKeys, array $arguments = null); 
     34    public function findByPrimaryKey(stubBaseReflectionClass $entityClass, array $primaryKeys); 
    3635 
    3736    /** 
     
    4039     * @param   stubCriterion                $criterion 
    4140     * @param   string                       $entityClass  entity class to find instances of 
    42      * @param   array                        $arguments    optional  arguments for constructor 
     41     * @param   string                       $orderBy      optional  overrule default order of entity 
    4342     * @return  stubDatabaseFinderResult     list of instances of $entityClass found with $criterion 
    4443     * @throws  stubDatabaseFinderException 
    4544     * @throws  stubPersistenceException 
    4645     */ 
    47     public function findByCriterion(stubCriterion $criterion, stubBaseReflectionClass $entityClass, array $arguments = null); 
     46    public function findByCriterion(stubCriterion $criterion, stubBaseReflectionClass $entityClass, $orderBy = null); 
    4847 
    4948    /** 
     
    5150     * 
    5251     * @param   string                       $entityClass  entity class to find instances of 
    53      * @param   array                        $arguments    optional  arguments for constructor 
     52     * @param   string                       $orderBy      optional  overrule default order of entity 
    5453     * @return  stubDatabaseFinderResult     list of instances of $entityClass found 
    5554     * @throws  stubDatabaseFinderException 
    5655     * @throws  stubPersistenceException 
    5756     */ 
    58     public function findAll(stubBaseReflectionClass $entityClass, array $arguments = null); 
     57    public function findAll(stubBaseReflectionClass $entityClass, $orderBy = null); 
    5958 
    6059    /**