Пример #1
0
 /**
  * Filter the query by a related \Haus23\Dtp\Model\Ruleset object
  *
  * @param \Haus23\Dtp\Model\Ruleset|ObjectCollection $ruleset 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 ChildChampionshipQuery The current query, for fluid interface
  */
 public function filterByRuleset($ruleset, $comparison = null)
 {
     if ($ruleset instanceof \Haus23\Dtp\Model\Ruleset) {
         return $this->addUsingAlias(ChampionshipTableMap::COL_RULESET_ID, $ruleset->getId(), $comparison);
     } elseif ($ruleset instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ChampionshipTableMap::COL_RULESET_ID, $ruleset->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByRuleset() only accepts arguments of type \\Haus23\\Dtp\\Model\\Ruleset or Collection');
     }
 }
Пример #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildRuleset $ruleset Object to remove from the list of results
  *
  * @return $this|ChildRulesetQuery The current query, for fluid interface
  */
 public function prune($ruleset = null)
 {
     if ($ruleset) {
         $this->addUsingAlias(RulesetTableMap::COL_ID, $ruleset->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Пример #3
0
 /**
  * Declares an association between this object and a ChildRuleset object.
  *
  * @param  ChildRuleset $v
  * @return $this|\Haus23\Dtp\Model\Championship The current object (for fluent API support)
  * @throws PropelException
  */
 public function setRuleset(ChildRuleset $v = null)
 {
     if ($v === null) {
         $this->setRulesetId(NULL);
     } else {
         $this->setRulesetId($v->getId());
     }
     $this->aRuleset = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildRuleset object, it will not be re-added.
     if ($v !== null) {
         $v->addChampionship($this);
     }
     return $this;
 }