setModelAlias($modelAlias); } if ($criteria instanceof Criteria) { $query->mergeWith($criteria); } return $query; } /** * Find object by primary key * Use instance pooling to avoid a database query if the object exists * * $obj = $c->findPk(12, $con); * * @param mixed $key Primary key to use for the query * @param PropelPDO $con an optional connection object * * @return CcSchedule|array|mixed the result, formatted by the current formatter */ public function findPk($key, $con = null) { if ((null !== ($obj = CcSchedulePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { // the object is alredy in the instance pool return $obj; } else { // the object has not been requested yet, or the formatter is not an object formatter $criteria = $this->isKeepQuery() ? clone $this : $this; $stmt = $criteria ->filterByPrimaryKey($key) ->getSelectStatement($con); return $criteria->getFormatter()->init($criteria)->formatOne($stmt); } } /** * Find objects by primary key * * $objs = $c->findPks(array(12, 56, 832), $con); * * @param array $keys Primary keys to use for the query * @param PropelPDO $con an optional connection object * * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter */ public function findPks($keys, $con = null) { $criteria = $this->isKeepQuery() ? clone $this : $this; return $this ->filterByPrimaryKeys($keys) ->find($con); } /** * Filter the query by primary key * * @param mixed $key Primary key to use for the query * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { return $this->addUsingAlias(CcSchedulePeer::ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * * @param array $keys The list of primary key to use for the query * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { return $this->addUsingAlias(CcSchedulePeer::ID, $keys, Criteria::IN); } /** * Filter the query on the id column * * @param string|array $id The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterById($id = null, $comparison = null) { if (is_array($id) && null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CcSchedulePeer::ID, $id, $comparison); } /** * Filter the query on the playlist_id column * * @param int|array $playlistId The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByPlaylistId($playlistId = null, $comparison = null) { if (is_array($playlistId)) { $useMinMax = false; if (isset($playlistId['min'])) { $this->addUsingAlias(CcSchedulePeer::PLAYLIST_ID, $playlistId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($playlistId['max'])) { $this->addUsingAlias(CcSchedulePeer::PLAYLIST_ID, $playlistId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::PLAYLIST_ID, $playlistId, $comparison); } /** * Filter the query on the starts column * * @param string|array $starts The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByStarts($starts = null, $comparison = null) { if (is_array($starts)) { $useMinMax = false; if (isset($starts['min'])) { $this->addUsingAlias(CcSchedulePeer::STARTS, $starts['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($starts['max'])) { $this->addUsingAlias(CcSchedulePeer::STARTS, $starts['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::STARTS, $starts, $comparison); } /** * Filter the query on the ends column * * @param string|array $ends The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByEnds($ends = null, $comparison = null) { if (is_array($ends)) { $useMinMax = false; if (isset($ends['min'])) { $this->addUsingAlias(CcSchedulePeer::ENDS, $ends['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($ends['max'])) { $this->addUsingAlias(CcSchedulePeer::ENDS, $ends['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::ENDS, $ends, $comparison); } /** * Filter the query on the group_id column * * @param int|array $groupId The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByGroupId($groupId = null, $comparison = null) { if (is_array($groupId)) { $useMinMax = false; if (isset($groupId['min'])) { $this->addUsingAlias(CcSchedulePeer::GROUP_ID, $groupId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($groupId['max'])) { $this->addUsingAlias(CcSchedulePeer::GROUP_ID, $groupId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::GROUP_ID, $groupId, $comparison); } /** * Filter the query on the file_id column * * @param int|array $fileId The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByFileId($fileId = null, $comparison = null) { if (is_array($fileId)) { $useMinMax = false; if (isset($fileId['min'])) { $this->addUsingAlias(CcSchedulePeer::FILE_ID, $fileId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($fileId['max'])) { $this->addUsingAlias(CcSchedulePeer::FILE_ID, $fileId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::FILE_ID, $fileId, $comparison); } /** * Filter the query on the clip_length column * * @param string|array $clipLength The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByClipLength($clipLength = null, $comparison = null) { if (is_array($clipLength)) { $useMinMax = false; if (isset($clipLength['min'])) { $this->addUsingAlias(CcSchedulePeer::CLIP_LENGTH, $clipLength['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($clipLength['max'])) { $this->addUsingAlias(CcSchedulePeer::CLIP_LENGTH, $clipLength['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::CLIP_LENGTH, $clipLength, $comparison); } /** * Filter the query on the fade_in column * * @param string|array $fadeIn The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByFadeIn($fadeIn = null, $comparison = null) { if (is_array($fadeIn)) { $useMinMax = false; if (isset($fadeIn['min'])) { $this->addUsingAlias(CcSchedulePeer::FADE_IN, $fadeIn['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($fadeIn['max'])) { $this->addUsingAlias(CcSchedulePeer::FADE_IN, $fadeIn['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::FADE_IN, $fadeIn, $comparison); } /** * Filter the query on the fade_out column * * @param string|array $fadeOut The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByFadeOut($fadeOut = null, $comparison = null) { if (is_array($fadeOut)) { $useMinMax = false; if (isset($fadeOut['min'])) { $this->addUsingAlias(CcSchedulePeer::FADE_OUT, $fadeOut['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($fadeOut['max'])) { $this->addUsingAlias(CcSchedulePeer::FADE_OUT, $fadeOut['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::FADE_OUT, $fadeOut, $comparison); } /** * Filter the query on the cue_in column * * @param string|array $cueIn The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByCueIn($cueIn = null, $comparison = null) { if (is_array($cueIn)) { $useMinMax = false; if (isset($cueIn['min'])) { $this->addUsingAlias(CcSchedulePeer::CUE_IN, $cueIn['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($cueIn['max'])) { $this->addUsingAlias(CcSchedulePeer::CUE_IN, $cueIn['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::CUE_IN, $cueIn, $comparison); } /** * Filter the query on the cue_out column * * @param string|array $cueOut The value to use as filter. * Accepts an associative array('min' => $minValue, 'max' => $maxValue) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByCueOut($cueOut = null, $comparison = null) { if (is_array($cueOut)) { $useMinMax = false; if (isset($cueOut['min'])) { $this->addUsingAlias(CcSchedulePeer::CUE_OUT, $cueOut['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($cueOut['max'])) { $this->addUsingAlias(CcSchedulePeer::CUE_OUT, $cueOut['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(CcSchedulePeer::CUE_OUT, $cueOut, $comparison); } /** * Exclude object from result * * @param CcSchedule $ccSchedule Object to remove from the list of results * * @return CcScheduleQuery The current query, for fluid interface */ public function prune($ccSchedule = null) { if ($ccSchedule) { $this->addUsingAlias(CcSchedulePeer::ID, $ccSchedule->getId(), Criteria::NOT_EQUAL); } return $this; } } // BaseCcScheduleQuery