예제 #1
0
파일: JudgeQuery.php 프로젝트: iuf/junia
 /**
  * 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');
     }
 }
예제 #2
0
파일: Routine.php 프로젝트: iuf/junia
 /**
  * @param ChildScore $score The ChildScore object to add.
  */
 protected function doAddScore(ChildScore $score)
 {
     $this->collScores[] = $score;
     $score->setRoutine($this);
 }
예제 #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);
     }
 }
예제 #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');
     }
 }
예제 #5
0
파일: ScoreQuery.php 프로젝트: iuf/junia
 /**
  * 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;
 }