Exemple #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->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);
 }
Exemple #2
0
 /**
  * Filter the query by a related \CyberdenBundle\Model\Station object
  *
  * @param \CyberdenBundle\Model\Station|ObjectCollection $station 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 filterByStation($station, $comparison = null)
 {
     if ($station instanceof \CyberdenBundle\Model\Station) {
         return $this->addUsingAlias(SessionTableMap::COL_STATION_ID, $station->getId(), $comparison);
     } elseif ($station instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SessionTableMap::COL_STATION_ID, $station->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByStation() only accepts arguments of type \\CyberdenBundle\\Model\\Station or Collection');
     }
 }
Exemple #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildStation $station Object to remove from the list of results
  *
  * @return $this|ChildStationQuery The current query, for fluid interface
  */
 public function prune($station = null)
 {
     if ($station) {
         $this->addUsingAlias(StationTableMap::COL_ID, $station->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }