コード例 #1
0
 /**
  * Filter the query by a related \ECP\RulesetEntity object
  *
  * @param \ECP\RulesetEntity|ObjectCollection $rulesetEntity 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 ChildRulesetShipQuery The current query, for fluid interface
  */
 public function filterByRulesetEntity($rulesetEntity, $comparison = null)
 {
     if ($rulesetEntity instanceof \ECP\RulesetEntity) {
         return $this->addUsingAlias(RulesetShipTableMap::COL_RULESETENTITYID, $rulesetEntity->getId(), $comparison);
     } elseif ($rulesetEntity instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(RulesetShipTableMap::COL_RULESETENTITYID, $rulesetEntity->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByRulesetEntity() only accepts arguments of type \\ECP\\RulesetEntity or Collection');
     }
 }
コード例 #2
0
 /**
  * Declares an association between this object and a ChildRulesetEntity object.
  *
  * @param  ChildRulesetEntity $v
  * @return $this|\ECP\RulesetShip The current object (for fluent API support)
  * @throws PropelException
  */
 public function setRulesetEntity(ChildRulesetEntity $v = null)
 {
     if ($v === null) {
         $this->setRulesetentityid(NULL);
     } else {
         $this->setRulesetentityid($v->getId());
     }
     $this->aRulesetEntity = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildRulesetEntity object, it will not be re-added.
     if ($v !== null) {
         $v->addRulesetShip($this);
     }
     return $this;
 }
コード例 #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildRulesetEntity $rulesetEntity Object to remove from the list of results
  *
  * @return $this|ChildRulesetEntityQuery The current query, for fluid interface
  */
 public function prune($rulesetEntity = null)
 {
     if ($rulesetEntity) {
         $this->addUsingAlias(RulesetEntityTableMap::COL_ID, $rulesetEntity->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }