/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->aStructureNodeRelatedByStructureNodeId) { $this->aStructureNodeRelatedByStructureNodeId->removeStructureNodeParentRelatedByStructureNodeId($this); } if (null !== $this->aStructureNodeRelatedByParentId) { $this->aStructureNodeRelatedByParentId->removeStructureNodeParentRelatedByParentId($this); } $this->structure_node_id = null; $this->parent_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Filter the query by a related \gossi\trixionary\model\StructureNode object * * @param \gossi\trixionary\model\StructureNode|ObjectCollection $structureNode 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 ChildFunctionPhaseQuery The current query, for fluid interface */ public function filterByStructureNode($structureNode, $comparison = null) { if ($structureNode instanceof \gossi\trixionary\model\StructureNode) { return $this->addUsingAlias(FunctionPhaseTableMap::COL_ID, $structureNode->getId(), $comparison); } elseif ($structureNode instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(FunctionPhaseTableMap::COL_ID, $structureNode->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByStructureNode() only accepts arguments of type \\gossi\\trixionary\\model\\StructureNode or Collection'); } }
/** * Filter the query by a related \gossi\trixionary\model\StructureNode object * * @param \gossi\trixionary\model\StructureNode|ObjectCollection $structureNode the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildSkillQuery The current query, for fluid interface */ public function filterByStructureNode($structureNode, $comparison = null) { if ($structureNode instanceof \gossi\trixionary\model\StructureNode) { return $this->addUsingAlias(SkillTableMap::COL_ID, $structureNode->getSkillId(), $comparison); } elseif ($structureNode instanceof ObjectCollection) { return $this->useStructureNodeQuery()->filterByPrimaryKeys($structureNode->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByStructureNode() only accepts arguments of type \\gossi\\trixionary\\model\\StructureNode or Collection'); } }
/** * Get or Create the parent ChildStructureNode object of the current object * * @return ChildStructureNode The parent object */ public function getParentOrCreate($con = null) { if ($this->isNew()) { if ($this->isPrimaryKeyNull()) { $parent = new ChildStructureNode(); $parent->setDescendantClass('gossi\\trixionary\\model\\Kstruktur'); return $parent; } else { $parent = \gossi\trixionary\model\StructureNodeQuery::create()->findPk($this->getPrimaryKey(), $con); if (null === $parent || null !== $parent->getDescendantClass()) { $parent = new ChildStructureNode(); $parent->setPrimaryKey($this->getPrimaryKey()); $parent->setDescendantClass('gossi\\trixionary\\model\\Kstruktur'); } return $parent; } } else { return ChildStructureNodeQuery::create()->findPk($this->getPrimaryKey(), $con); } }
/** * Exclude object from result * * @param ChildStructureNode $structureNode Object to remove from the list of results * * @return $this|ChildStructureNodeQuery The current query, for fluid interface */ public function prune($structureNode = null) { if ($structureNode) { $this->addUsingAlias(StructureNodeTableMap::COL_ID, $structureNode->getId(), Criteria::NOT_EQUAL); } return $this; }