コード例 #1
0
ファイル: BaseAgenda.php プロジェクト: eddypre/Quirofano
 /**
  * Declares an association between this object and a Salaquirurgica object.
  *
  * @param             Salaquirurgica $v
  * @return Agenda The current object (for fluent API support)
  * @throws PropelException
  */
 public function setSalaquirurgica(Salaquirurgica $v = null)
 {
     if ($v === null) {
         $this->setSalaId(NULL);
     } else {
         $this->setSalaId($v->getId());
     }
     $this->aSalaquirurgica = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Salaquirurgica object, it will not be re-added.
     if ($v !== null) {
         $v->addAgenda($this);
     }
     return $this;
 }
コード例 #2
0
ファイル: BaseAgendaQuery.php プロジェクト: eddypre/Quirofano
 /**
  * Filter the query by a related Salaquirurgica object
  *
  * @param   Salaquirurgica|PropelObjectCollection $salaquirurgica The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   AgendaQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterBySalaquirurgica($salaquirurgica, $comparison = null)
 {
     if ($salaquirurgica instanceof Salaquirurgica) {
         return $this->addUsingAlias(AgendaPeer::SALA_ID, $salaquirurgica->getId(), $comparison);
     } elseif ($salaquirurgica instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(AgendaPeer::SALA_ID, $salaquirurgica->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySalaquirurgica() only accepts arguments of type Salaquirurgica or PropelCollection');
     }
 }
コード例 #3
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Salaquirurgica $obj A Salaquirurgica object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         SalaquirurgicaPeer::$instances[$key] = $obj;
     }
 }
コード例 #4
0
ファイル: BaseQuirofano.php プロジェクト: eddypre/Quirofano
 /**
  * @param	Salaquirurgica $salaquirurgica The salaquirurgica object to add.
  */
 protected function doAddSalaquirurgica($salaquirurgica)
 {
     $this->collSalaquirurgicas[] = $salaquirurgica;
     $salaquirurgica->setQuirofano($this);
 }
コード例 #5
0
 /**
  * Exclude object from result
  *
  * @param   Salaquirurgica $salaquirurgica Object to remove from the list of results
  *
  * @return SalaquirurgicaQuery The current query, for fluid interface
  */
 public function prune($salaquirurgica = null)
 {
     if ($salaquirurgica) {
         $this->addUsingAlias(SalaquirurgicaPeer::ID, $salaquirurgica->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #6
0
 /**
  * Filter the query by a related Salaquirurgica object
  *
  * @param   Salaquirurgica|PropelObjectCollection $salaquirurgica  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   QuirofanoQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterBySalaquirurgica($salaquirurgica, $comparison = null)
 {
     if ($salaquirurgica instanceof Salaquirurgica) {
         return $this->addUsingAlias(QuirofanoPeer::ID, $salaquirurgica->getQuirofanoId(), $comparison);
     } elseif ($salaquirurgica instanceof PropelObjectCollection) {
         return $this->useSalaquirurgicaQuery()->filterByPrimaryKeys($salaquirurgica->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBySalaquirurgica() only accepts arguments of type Salaquirurgica or PropelCollection');
     }
 }