/** * Filter the query by a related \ECP\ItemFilterDef object * * @param \ECP\ItemFilterDef|ObjectCollection $itemFilterDef 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 ChildItemFilterRuleQuery The current query, for fluid interface */ public function filterByItemFilterDef($itemFilterDef, $comparison = null) { if ($itemFilterDef instanceof \ECP\ItemFilterDef) { return $this->addUsingAlias(ItemFilterRuleTableMap::COL_ITEMFILTERDEFID, $itemFilterDef->getId(), $comparison); } elseif ($itemFilterDef instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ItemFilterRuleTableMap::COL_ITEMFILTERDEFID, $itemFilterDef->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByItemFilterDef() only accepts arguments of type \\ECP\\ItemFilterDef or Collection'); } }
/** * Declares an association between this object and a ChildItemFilterDef object. * * @param ChildItemFilterDef $v * @return $this|\ECP\ItemFilterRule The current object (for fluent API support) * @throws PropelException */ public function setItemFilterDef(ChildItemFilterDef $v = null) { if ($v === null) { $this->setItemfilterdefid(NULL); } else { $this->setItemfilterdefid($v->getId()); } $this->aItemFilterDef = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildItemFilterDef object, it will not be re-added. if ($v !== null) { $v->addItemFilterRule($this); } return $this; }
/** * Exclude object from result * * @param ChildItemFilterDef $itemFilterDef Object to remove from the list of results * * @return $this|ChildItemFilterDefQuery The current query, for fluid interface */ public function prune($itemFilterDef = null) { if ($itemFilterDef) { $this->addUsingAlias(ItemFilterDefTableMap::COL_ID, $itemFilterDef->getId(), Criteria::NOT_EQUAL); } return $this; }