Ejemplo n.º 1
0
 /**
  * Filter the query by a related \CyberdenBundle\Model\Administrator object
  *
  * @param \CyberdenBundle\Model\Administrator|ObjectCollection $administrator 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 ChildSessionQuery The current query, for fluid interface
  */
 public function filterByAdministrator($administrator, $comparison = null)
 {
     if ($administrator instanceof \CyberdenBundle\Model\Administrator) {
         return $this->addUsingAlias(SessionTableMap::COL_ADMINISTRATOR_ID, $administrator->getId(), $comparison);
     } elseif ($administrator instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SessionTableMap::COL_ADMINISTRATOR_ID, $administrator->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAdministrator() only accepts arguments of type \\CyberdenBundle\\Model\\Administrator or Collection');
     }
 }
Ejemplo n.º 2
0
 /**
  * Exclude object from result
  *
  * @param   ChildAdministrator $administrator Object to remove from the list of results
  *
  * @return $this|ChildAdministratorQuery The current query, for fluid interface
  */
 public function prune($administrator = null)
 {
     if ($administrator) {
         $this->addUsingAlias(AdministratorTableMap::COL_ID, $administrator->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Ejemplo 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->aStation) {
         $this->aStation->removeSession($this);
     }
     if (null !== $this->aAdministrator) {
         $this->aAdministrator->removeSession($this);
     }
     $this->id = null;
     $this->station_id = null;
     $this->administrator_id = null;
     $this->duration = null;
     $this->duration_end_time = null;
     $this->start_time = null;
     $this->end_time = null;
     $this->cost = null;
     $this->is_paid = null;
     $this->comment = null;
     $this->is_in_session = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }