Exemplo n.º 1
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->aCustomer) {
         $this->aCustomer->removeProject($this);
     }
     if (null !== $this->aEmployee) {
         $this->aEmployee->removeProject($this);
     }
     $this->id = null;
     $this->name = null;
     $this->limit = null;
     $this->rate = null;
     $this->employee_id = null;
     $this->customer_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Exemplo n.º 2
0
 /**
  * Filter the query by a related \Employee object
  *
  * @param \Employee|ObjectCollection $employee 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 filterByEmployee($employee, $comparison = null)
 {
     if ($employee instanceof \Employee) {
         return $this->addUsingAlias(TaskTableMap::COL_EMPLOYEE_ID, $employee->getId(), $comparison);
     } elseif ($employee instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TaskTableMap::COL_EMPLOYEE_ID, $employee->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByEmployee() only accepts arguments of type \\Employee or Collection');
     }
 }
Exemplo n.º 3
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);
 }
Exemplo n.º 4
0
 /**
  * Filter the query by a related \Employee object
  *
  * @param \Employee|ObjectCollection $employee the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPersonQuery The current query, for fluid interface
  */
 public function filterByEmployee($employee, $comparison = null)
 {
     if ($employee instanceof \Employee) {
         return $this->addUsingAlias(PersonTableMap::COL_ID, $employee->getPersonId(), $comparison);
     } elseif ($employee instanceof ObjectCollection) {
         return $this->useEmployeeQuery()->filterByPrimaryKeys($employee->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByEmployee() only accepts arguments of type \\Employee or Collection');
     }
 }
Exemplo n.º 5
0
 /**
  * Exclude object from result
  *
  * @param   ChildEmployee $employee Object to remove from the list of results
  *
  * @return $this|ChildEmployeeQuery The current query, for fluid interface
  */
 public function prune($employee = null)
 {
     if ($employee) {
         $this->addUsingAlias(EmployeeTableMap::COL_ID, $employee->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemplo n.º 6
0
 /**
  * @param ChildEmployee $employee The ChildEmployee object to add.
  */
 protected function doAddEmployee(ChildEmployee $employee)
 {
     $this->collEmployees[] = $employee;
     $employee->setPerson($this);
 }