Ejemplo n.º 1
0
 /**
  * Filter the query by a related \iuf\junia\model\Score object
  *
  * @param \iuf\junia\model\Score|ObjectCollection $score the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildJudgeQuery The current query, for fluid interface
  */
 public function filterByScore($score, $comparison = null)
 {
     if ($score instanceof \iuf\junia\model\Score) {
         return $this->addUsingAlias(JudgeTableMap::COL_ID, $score->getJudgeId(), $comparison);
     } elseif ($score instanceof ObjectCollection) {
         return $this->useScoreQuery()->filterByPrimaryKeys($score->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByScore() only accepts arguments of type \\iuf\\junia\\model\\Score or Collection');
     }
 }
Ejemplo n.º 2
0
 /**
  * @param ChildScore $score The ChildScore object to add.
  */
 protected function doAddScore(ChildScore $score)
 {
     $this->collScores[] = $score;
     $score->setRoutine($this);
 }
Ejemplo n.º 3
0
 /**
  * Get or Create the parent ChildScore object of the current object
  *
  * @return    ChildScore The parent object
  */
 public function getParentOrCreate($con = null)
 {
     if ($this->isNew()) {
         if ($this->isPrimaryKeyNull()) {
             $parent = new ChildScore();
             $parent->setDescendantClass('iuf\\junia\\model\\PerformanceScore');
             return $parent;
         } else {
             $parent = \iuf\junia\model\ScoreQuery::create()->findPk($this->getPrimaryKey(), $con);
             if (null === $parent || null !== $parent->getDescendantClass()) {
                 $parent = new ChildScore();
                 $parent->setPrimaryKey($this->getPrimaryKey());
                 $parent->setDescendantClass('iuf\\junia\\model\\PerformanceScore');
             }
             return $parent;
         }
     } else {
         return ChildScoreQuery::create()->findPk($this->getPrimaryKey(), $con);
     }
 }
Ejemplo n.º 4
0
 /**
  * Filter the query by a related \iuf\junia\model\Score object
  *
  * @param \iuf\junia\model\Score|ObjectCollection $score The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildPerformanceScoreQuery The current query, for fluid interface
  */
 public function filterByScore($score, $comparison = null)
 {
     if ($score instanceof \iuf\junia\model\Score) {
         return $this->addUsingAlias(PerformanceScoreTableMap::COL_ID, $score->getId(), $comparison);
     } elseif ($score instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PerformanceScoreTableMap::COL_ID, $score->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByScore() only accepts arguments of type \\iuf\\junia\\model\\Score or Collection');
     }
 }
Ejemplo n.º 5
0
 /**
  * Exclude object from result
  *
  * @param   ChildScore $score Object to remove from the list of results
  *
  * @return $this|ChildScoreQuery The current query, for fluid interface
  */
 public function prune($score = null)
 {
     if ($score) {
         $this->addUsingAlias(ScoreTableMap::COL_ID, $score->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }