Exemplo n.º 1
0
 /**
  * @param ChildProject $project The ChildProject object to add.
  */
 protected function doAddProject(ChildProject $project)
 {
     $this->collProjects[] = $project;
     $project->setEmployee($this);
 }
Exemplo n.º 2
0
 /**
  * Filter the query by a related \Project object
  *
  * @param \Project|ObjectCollection $project 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 ChildTaskQuery The current query, for fluid interface
  */
 public function filterByProject($project, $comparison = null)
 {
     if ($project instanceof \Project) {
         return $this->addUsingAlias(TaskTableMap::COL_PROJECT_ID, $project->getId(), $comparison);
     } elseif ($project instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TaskTableMap::COL_PROJECT_ID, $project->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByProject() only accepts arguments of type \\Project or Collection');
     }
 }
Exemplo n.º 3
0
 /**
  * Filter the query by a related \Project object
  *
  * @param \Project|ObjectCollection $project the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCustomerQuery The current query, for fluid interface
  */
 public function filterByProject($project, $comparison = null)
 {
     if ($project instanceof \Project) {
         return $this->addUsingAlias(CustomerTableMap::COL_ID, $project->getCustomerId(), $comparison);
     } elseif ($project instanceof ObjectCollection) {
         return $this->useProjectQuery()->filterByPrimaryKeys($project->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProject() only accepts arguments of type \\Project or Collection');
     }
 }
Exemplo n.º 4
0
 /**
  * Exclude object from result
  *
  * @param   ChildProject $project Object to remove from the list of results
  *
  * @return $this|ChildProjectQuery The current query, for fluid interface
  */
 public function prune($project = null)
 {
     if ($project) {
         $this->addUsingAlias(ProjectTableMap::COL_ID, $project->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemplo n.º 5
0
 /**
  * @param ChildProject $project The ChildProject object to add.
  */
 protected function doAddProject(ChildProject $project)
 {
     $this->collProjects[] = $project;
     $project->setCustomer($this);
 }
Exemplo n.º 6
0
 /**
  * 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->aEmployee) {
         $this->aEmployee->removeTask($this);
     }
     if (null !== $this->aProject) {
         $this->aProject->removeTask($this);
     }
     $this->id = null;
     $this->title = null;
     $this->description = null;
     $this->worktime = null;
     $this->project_id = null;
     $this->employee_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }