Example #1
0
 /**
  * Declares an association between this object and a ChildStation object.
  *
  * @param  ChildStation $v
  * @return $this|\CyberdenBundle\Model\Session The current object (for fluent API support)
  * @throws PropelException
  */
 public function setStation(ChildStation $v = null)
 {
     if ($v === null) {
         $this->setStationId(NULL);
     } else {
         $this->setStationId($v->getId());
     }
     $this->aStation = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildStation object, it will not be re-added.
     if ($v !== null) {
         $v->addSession($this);
     }
     return $this;
 }
Example #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');
     }
 }
Example #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;
 }