Esempio n. 1
0
 /**
  * Filter the query by a related \gossi\trixionary\model\StructureNodeParent object
  *
  * @param \gossi\trixionary\model\StructureNodeParent|ObjectCollection $structureNodeParent the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildStructureNodeQuery The current query, for fluid interface
  */
 public function filterByStructureNodeParentRelatedByStructureNodeId($structureNodeParent, $comparison = null)
 {
     if ($structureNodeParent instanceof \gossi\trixionary\model\StructureNodeParent) {
         return $this->addUsingAlias(StructureNodeTableMap::COL_ID, $structureNodeParent->getStructureNodeId(), $comparison);
     } elseif ($structureNodeParent instanceof ObjectCollection) {
         return $this->useStructureNodeParentRelatedByStructureNodeIdQuery()->filterByPrimaryKeys($structureNodeParent->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByStructureNodeParentRelatedByStructureNodeId() only accepts arguments of type \\gossi\\trixionary\\model\\StructureNodeParent or Collection');
     }
 }
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database. In some cases you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by find*()
  * and findPk*() calls.
  *
  * @param \gossi\trixionary\model\StructureNodeParent $obj A \gossi\trixionary\model\StructureNodeParent object.
  * @param string $key             (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if (null === $key) {
             $key = serialize(array((string) $obj->getStructureNodeId(), (string) $obj->getParentId()));
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildStructureNodeParent $structureNodeParent Object to remove from the list of results
  *
  * @return $this|ChildStructureNodeParentQuery The current query, for fluid interface
  */
 public function prune($structureNodeParent = null)
 {
     if ($structureNodeParent) {
         $this->addCond('pruneCond0', $this->getAliasedColName(StructureNodeParentTableMap::COL_STRUCTURE_NODE_ID), $structureNodeParent->getStructureNodeId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(StructureNodeParentTableMap::COL_PARENT_ID), $structureNodeParent->getParentId(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }