BaseCcScheduleQuery.php 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887
  1. <?php
  2. /**
  3. * Base class that represents a query for the 'cc_schedule' table.
  4. *
  5. *
  6. *
  7. * @method CcScheduleQuery orderByDbId($order = Criteria::ASC) Order by the id column
  8. * @method CcScheduleQuery orderByDbStarts($order = Criteria::ASC) Order by the starts column
  9. * @method CcScheduleQuery orderByDbEnds($order = Criteria::ASC) Order by the ends column
  10. * @method CcScheduleQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column
  11. * @method CcScheduleQuery orderByDbStreamId($order = Criteria::ASC) Order by the stream_id column
  12. * @method CcScheduleQuery orderByDbClipLength($order = Criteria::ASC) Order by the clip_length column
  13. * @method CcScheduleQuery orderByDbFadeIn($order = Criteria::ASC) Order by the fade_in column
  14. * @method CcScheduleQuery orderByDbFadeOut($order = Criteria::ASC) Order by the fade_out column
  15. * @method CcScheduleQuery orderByDbCueIn($order = Criteria::ASC) Order by the cue_in column
  16. * @method CcScheduleQuery orderByDbCueOut($order = Criteria::ASC) Order by the cue_out column
  17. * @method CcScheduleQuery orderByDbMediaItemPlayed($order = Criteria::ASC) Order by the media_item_played column
  18. * @method CcScheduleQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column
  19. * @method CcScheduleQuery orderByDbPlayoutStatus($order = Criteria::ASC) Order by the playout_status column
  20. * @method CcScheduleQuery orderByDbBroadcasted($order = Criteria::ASC) Order by the broadcasted column
  21. * @method CcScheduleQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
  22. *
  23. * @method CcScheduleQuery groupByDbId() Group by the id column
  24. * @method CcScheduleQuery groupByDbStarts() Group by the starts column
  25. * @method CcScheduleQuery groupByDbEnds() Group by the ends column
  26. * @method CcScheduleQuery groupByDbFileId() Group by the file_id column
  27. * @method CcScheduleQuery groupByDbStreamId() Group by the stream_id column
  28. * @method CcScheduleQuery groupByDbClipLength() Group by the clip_length column
  29. * @method CcScheduleQuery groupByDbFadeIn() Group by the fade_in column
  30. * @method CcScheduleQuery groupByDbFadeOut() Group by the fade_out column
  31. * @method CcScheduleQuery groupByDbCueIn() Group by the cue_in column
  32. * @method CcScheduleQuery groupByDbCueOut() Group by the cue_out column
  33. * @method CcScheduleQuery groupByDbMediaItemPlayed() Group by the media_item_played column
  34. * @method CcScheduleQuery groupByDbInstanceId() Group by the instance_id column
  35. * @method CcScheduleQuery groupByDbPlayoutStatus() Group by the playout_status column
  36. * @method CcScheduleQuery groupByDbBroadcasted() Group by the broadcasted column
  37. * @method CcScheduleQuery groupByDbPosition() Group by the position column
  38. *
  39. * @method CcScheduleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
  40. * @method CcScheduleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
  41. * @method CcScheduleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
  42. *
  43. * @method CcScheduleQuery leftJoinCcShowInstances($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowInstances relation
  44. * @method CcScheduleQuery rightJoinCcShowInstances($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowInstances relation
  45. * @method CcScheduleQuery innerJoinCcShowInstances($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowInstances relation
  46. *
  47. * @method CcScheduleQuery leftJoinCcFiles($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFiles relation
  48. * @method CcScheduleQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
  49. * @method CcScheduleQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
  50. *
  51. * @method CcScheduleQuery leftJoinCcWebstream($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcWebstream relation
  52. * @method CcScheduleQuery rightJoinCcWebstream($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcWebstream relation
  53. * @method CcScheduleQuery innerJoinCcWebstream($relationAlias = '') Adds a INNER JOIN clause to the query using the CcWebstream relation
  54. *
  55. * @method CcScheduleQuery leftJoinCcWebstreamMetadata($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcWebstreamMetadata relation
  56. * @method CcScheduleQuery rightJoinCcWebstreamMetadata($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcWebstreamMetadata relation
  57. * @method CcScheduleQuery innerJoinCcWebstreamMetadata($relationAlias = '') Adds a INNER JOIN clause to the query using the CcWebstreamMetadata relation
  58. *
  59. * @method CcSchedule findOne(PropelPDO $con = null) Return the first CcSchedule matching the query
  60. * @method CcSchedule findOneOrCreate(PropelPDO $con = null) Return the first CcSchedule matching the query, or a new CcSchedule object populated from the query conditions when no match is found
  61. *
  62. * @method CcSchedule findOneByDbId(int $id) Return the first CcSchedule filtered by the id column
  63. * @method CcSchedule findOneByDbStarts(string $starts) Return the first CcSchedule filtered by the starts column
  64. * @method CcSchedule findOneByDbEnds(string $ends) Return the first CcSchedule filtered by the ends column
  65. * @method CcSchedule findOneByDbFileId(int $file_id) Return the first CcSchedule filtered by the file_id column
  66. * @method CcSchedule findOneByDbStreamId(int $stream_id) Return the first CcSchedule filtered by the stream_id column
  67. * @method CcSchedule findOneByDbClipLength(string $clip_length) Return the first CcSchedule filtered by the clip_length column
  68. * @method CcSchedule findOneByDbFadeIn(string $fade_in) Return the first CcSchedule filtered by the fade_in column
  69. * @method CcSchedule findOneByDbFadeOut(string $fade_out) Return the first CcSchedule filtered by the fade_out column
  70. * @method CcSchedule findOneByDbCueIn(string $cue_in) Return the first CcSchedule filtered by the cue_in column
  71. * @method CcSchedule findOneByDbCueOut(string $cue_out) Return the first CcSchedule filtered by the cue_out column
  72. * @method CcSchedule findOneByDbMediaItemPlayed(boolean $media_item_played) Return the first CcSchedule filtered by the media_item_played column
  73. * @method CcSchedule findOneByDbInstanceId(int $instance_id) Return the first CcSchedule filtered by the instance_id column
  74. * @method CcSchedule findOneByDbPlayoutStatus(int $playout_status) Return the first CcSchedule filtered by the playout_status column
  75. * @method CcSchedule findOneByDbBroadcasted(int $broadcasted) Return the first CcSchedule filtered by the broadcasted column
  76. * @method CcSchedule findOneByDbPosition(int $position) Return the first CcSchedule filtered by the position column
  77. *
  78. * @method array findByDbId(int $id) Return CcSchedule objects filtered by the id column
  79. * @method array findByDbStarts(string $starts) Return CcSchedule objects filtered by the starts column
  80. * @method array findByDbEnds(string $ends) Return CcSchedule objects filtered by the ends column
  81. * @method array findByDbFileId(int $file_id) Return CcSchedule objects filtered by the file_id column
  82. * @method array findByDbStreamId(int $stream_id) Return CcSchedule objects filtered by the stream_id column
  83. * @method array findByDbClipLength(string $clip_length) Return CcSchedule objects filtered by the clip_length column
  84. * @method array findByDbFadeIn(string $fade_in) Return CcSchedule objects filtered by the fade_in column
  85. * @method array findByDbFadeOut(string $fade_out) Return CcSchedule objects filtered by the fade_out column
  86. * @method array findByDbCueIn(string $cue_in) Return CcSchedule objects filtered by the cue_in column
  87. * @method array findByDbCueOut(string $cue_out) Return CcSchedule objects filtered by the cue_out column
  88. * @method array findByDbMediaItemPlayed(boolean $media_item_played) Return CcSchedule objects filtered by the media_item_played column
  89. * @method array findByDbInstanceId(int $instance_id) Return CcSchedule objects filtered by the instance_id column
  90. * @method array findByDbPlayoutStatus(int $playout_status) Return CcSchedule objects filtered by the playout_status column
  91. * @method array findByDbBroadcasted(int $broadcasted) Return CcSchedule objects filtered by the broadcasted column
  92. * @method array findByDbPosition(int $position) Return CcSchedule objects filtered by the position column
  93. *
  94. * @package propel.generator.airtime.om
  95. */
  96. abstract class BaseCcScheduleQuery extends ModelCriteria
  97. {
  98. /**
  99. * Initializes internal state of BaseCcScheduleQuery object.
  100. *
  101. * @param string $dbName The dabase name
  102. * @param string $modelName The phpName of a model, e.g. 'Book'
  103. * @param string $modelAlias The alias for the model in this query, e.g. 'b'
  104. */
  105. public function __construct($dbName = 'airtime', $modelName = 'CcSchedule', $modelAlias = null)
  106. {
  107. parent::__construct($dbName, $modelName, $modelAlias);
  108. }
  109. /**
  110. * Returns a new CcScheduleQuery object.
  111. *
  112. * @param string $modelAlias The alias of a model in the query
  113. * @param Criteria $criteria Optional Criteria to build the query from
  114. *
  115. * @return CcScheduleQuery
  116. */
  117. public static function create($modelAlias = null, $criteria = null)
  118. {
  119. if ($criteria instanceof CcScheduleQuery) {
  120. return $criteria;
  121. }
  122. $query = new CcScheduleQuery();
  123. if (null !== $modelAlias) {
  124. $query->setModelAlias($modelAlias);
  125. }
  126. if ($criteria instanceof Criteria) {
  127. $query->mergeWith($criteria);
  128. }
  129. return $query;
  130. }
  131. /**
  132. * Find object by primary key
  133. * Use instance pooling to avoid a database query if the object exists
  134. * <code>
  135. * $obj = $c->findPk(12, $con);
  136. * </code>
  137. * @param mixed $key Primary key to use for the query
  138. * @param PropelPDO $con an optional connection object
  139. *
  140. * @return CcSchedule|array|mixed the result, formatted by the current formatter
  141. */
  142. public function findPk($key, $con = null)
  143. {
  144. if ((null !== ($obj = CcSchedulePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
  145. // the object is alredy in the instance pool
  146. return $obj;
  147. } else {
  148. // the object has not been requested yet, or the formatter is not an object formatter
  149. $criteria = $this->isKeepQuery() ? clone $this : $this;
  150. $stmt = $criteria
  151. ->filterByPrimaryKey($key)
  152. ->getSelectStatement($con);
  153. return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
  154. }
  155. }
  156. /**
  157. * Find objects by primary key
  158. * <code>
  159. * $objs = $c->findPks(array(12, 56, 832), $con);
  160. * </code>
  161. * @param array $keys Primary keys to use for the query
  162. * @param PropelPDO $con an optional connection object
  163. *
  164. * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
  165. */
  166. public function findPks($keys, $con = null)
  167. {
  168. $criteria = $this->isKeepQuery() ? clone $this : $this;
  169. return $this
  170. ->filterByPrimaryKeys($keys)
  171. ->find($con);
  172. }
  173. /**
  174. * Filter the query by primary key
  175. *
  176. * @param mixed $key Primary key to use for the query
  177. *
  178. * @return CcScheduleQuery The current query, for fluid interface
  179. */
  180. public function filterByPrimaryKey($key)
  181. {
  182. return $this->addUsingAlias(CcSchedulePeer::ID, $key, Criteria::EQUAL);
  183. }
  184. /**
  185. * Filter the query by a list of primary keys
  186. *
  187. * @param array $keys The list of primary key to use for the query
  188. *
  189. * @return CcScheduleQuery The current query, for fluid interface
  190. */
  191. public function filterByPrimaryKeys($keys)
  192. {
  193. return $this->addUsingAlias(CcSchedulePeer::ID, $keys, Criteria::IN);
  194. }
  195. /**
  196. * Filter the query on the id column
  197. *
  198. * @param int|array $dbId The value to use as filter.
  199. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  200. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  201. *
  202. * @return CcScheduleQuery The current query, for fluid interface
  203. */
  204. public function filterByDbId($dbId = null, $comparison = null)
  205. {
  206. if (is_array($dbId) && null === $comparison) {
  207. $comparison = Criteria::IN;
  208. }
  209. return $this->addUsingAlias(CcSchedulePeer::ID, $dbId, $comparison);
  210. }
  211. /**
  212. * Filter the query on the starts column
  213. *
  214. * @param string|array $dbStarts The value to use as filter.
  215. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  216. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  217. *
  218. * @return CcScheduleQuery The current query, for fluid interface
  219. */
  220. public function filterByDbStarts($dbStarts = null, $comparison = null)
  221. {
  222. if (is_array($dbStarts)) {
  223. $useMinMax = false;
  224. if (isset($dbStarts['min'])) {
  225. $this->addUsingAlias(CcSchedulePeer::STARTS, $dbStarts['min'], Criteria::GREATER_EQUAL);
  226. $useMinMax = true;
  227. }
  228. if (isset($dbStarts['max'])) {
  229. $this->addUsingAlias(CcSchedulePeer::STARTS, $dbStarts['max'], Criteria::LESS_EQUAL);
  230. $useMinMax = true;
  231. }
  232. if ($useMinMax) {
  233. return $this;
  234. }
  235. if (null === $comparison) {
  236. $comparison = Criteria::IN;
  237. }
  238. }
  239. return $this->addUsingAlias(CcSchedulePeer::STARTS, $dbStarts, $comparison);
  240. }
  241. /**
  242. * Filter the query on the ends column
  243. *
  244. * @param string|array $dbEnds The value to use as filter.
  245. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  246. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  247. *
  248. * @return CcScheduleQuery The current query, for fluid interface
  249. */
  250. public function filterByDbEnds($dbEnds = null, $comparison = null)
  251. {
  252. if (is_array($dbEnds)) {
  253. $useMinMax = false;
  254. if (isset($dbEnds['min'])) {
  255. $this->addUsingAlias(CcSchedulePeer::ENDS, $dbEnds['min'], Criteria::GREATER_EQUAL);
  256. $useMinMax = true;
  257. }
  258. if (isset($dbEnds['max'])) {
  259. $this->addUsingAlias(CcSchedulePeer::ENDS, $dbEnds['max'], Criteria::LESS_EQUAL);
  260. $useMinMax = true;
  261. }
  262. if ($useMinMax) {
  263. return $this;
  264. }
  265. if (null === $comparison) {
  266. $comparison = Criteria::IN;
  267. }
  268. }
  269. return $this->addUsingAlias(CcSchedulePeer::ENDS, $dbEnds, $comparison);
  270. }
  271. /**
  272. * Filter the query on the file_id column
  273. *
  274. * @param int|array $dbFileId The value to use as filter.
  275. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  276. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  277. *
  278. * @return CcScheduleQuery The current query, for fluid interface
  279. */
  280. public function filterByDbFileId($dbFileId = null, $comparison = null)
  281. {
  282. if (is_array($dbFileId)) {
  283. $useMinMax = false;
  284. if (isset($dbFileId['min'])) {
  285. $this->addUsingAlias(CcSchedulePeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL);
  286. $useMinMax = true;
  287. }
  288. if (isset($dbFileId['max'])) {
  289. $this->addUsingAlias(CcSchedulePeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL);
  290. $useMinMax = true;
  291. }
  292. if ($useMinMax) {
  293. return $this;
  294. }
  295. if (null === $comparison) {
  296. $comparison = Criteria::IN;
  297. }
  298. }
  299. return $this->addUsingAlias(CcSchedulePeer::FILE_ID, $dbFileId, $comparison);
  300. }
  301. /**
  302. * Filter the query on the stream_id column
  303. *
  304. * @param int|array $dbStreamId The value to use as filter.
  305. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  306. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  307. *
  308. * @return CcScheduleQuery The current query, for fluid interface
  309. */
  310. public function filterByDbStreamId($dbStreamId = null, $comparison = null)
  311. {
  312. if (is_array($dbStreamId)) {
  313. $useMinMax = false;
  314. if (isset($dbStreamId['min'])) {
  315. $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId['min'], Criteria::GREATER_EQUAL);
  316. $useMinMax = true;
  317. }
  318. if (isset($dbStreamId['max'])) {
  319. $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId['max'], Criteria::LESS_EQUAL);
  320. $useMinMax = true;
  321. }
  322. if ($useMinMax) {
  323. return $this;
  324. }
  325. if (null === $comparison) {
  326. $comparison = Criteria::IN;
  327. }
  328. }
  329. return $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId, $comparison);
  330. }
  331. /**
  332. * Filter the query on the clip_length column
  333. *
  334. * @param string $dbClipLength The value to use as filter.
  335. * Accepts wildcards (* and % trigger a LIKE)
  336. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  337. *
  338. * @return CcScheduleQuery The current query, for fluid interface
  339. */
  340. public function filterByDbClipLength($dbClipLength = null, $comparison = null)
  341. {
  342. if (null === $comparison) {
  343. if (is_array($dbClipLength)) {
  344. $comparison = Criteria::IN;
  345. } elseif (preg_match('/[\%\*]/', $dbClipLength)) {
  346. $dbClipLength = str_replace('*', '%', $dbClipLength);
  347. $comparison = Criteria::LIKE;
  348. }
  349. }
  350. return $this->addUsingAlias(CcSchedulePeer::CLIP_LENGTH, $dbClipLength, $comparison);
  351. }
  352. /**
  353. * Filter the query on the fade_in column
  354. *
  355. * @param string|array $dbFadeIn The value to use as filter.
  356. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  357. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  358. *
  359. * @return CcScheduleQuery The current query, for fluid interface
  360. */
  361. public function filterByDbFadeIn($dbFadeIn = null, $comparison = null)
  362. {
  363. if (is_array($dbFadeIn)) {
  364. $useMinMax = false;
  365. if (isset($dbFadeIn['min'])) {
  366. $this->addUsingAlias(CcSchedulePeer::FADE_IN, $dbFadeIn['min'], Criteria::GREATER_EQUAL);
  367. $useMinMax = true;
  368. }
  369. if (isset($dbFadeIn['max'])) {
  370. $this->addUsingAlias(CcSchedulePeer::FADE_IN, $dbFadeIn['max'], Criteria::LESS_EQUAL);
  371. $useMinMax = true;
  372. }
  373. if ($useMinMax) {
  374. return $this;
  375. }
  376. if (null === $comparison) {
  377. $comparison = Criteria::IN;
  378. }
  379. }
  380. return $this->addUsingAlias(CcSchedulePeer::FADE_IN, $dbFadeIn, $comparison);
  381. }
  382. /**
  383. * Filter the query on the fade_out column
  384. *
  385. * @param string|array $dbFadeOut The value to use as filter.
  386. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  387. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  388. *
  389. * @return CcScheduleQuery The current query, for fluid interface
  390. */
  391. public function filterByDbFadeOut($dbFadeOut = null, $comparison = null)
  392. {
  393. if (is_array($dbFadeOut)) {
  394. $useMinMax = false;
  395. if (isset($dbFadeOut['min'])) {
  396. $this->addUsingAlias(CcSchedulePeer::FADE_OUT, $dbFadeOut['min'], Criteria::GREATER_EQUAL);
  397. $useMinMax = true;
  398. }
  399. if (isset($dbFadeOut['max'])) {
  400. $this->addUsingAlias(CcSchedulePeer::FADE_OUT, $dbFadeOut['max'], Criteria::LESS_EQUAL);
  401. $useMinMax = true;
  402. }
  403. if ($useMinMax) {
  404. return $this;
  405. }
  406. if (null === $comparison) {
  407. $comparison = Criteria::IN;
  408. }
  409. }
  410. return $this->addUsingAlias(CcSchedulePeer::FADE_OUT, $dbFadeOut, $comparison);
  411. }
  412. /**
  413. * Filter the query on the cue_in column
  414. *
  415. * @param string $dbCueIn The value to use as filter.
  416. * Accepts wildcards (* and % trigger a LIKE)
  417. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  418. *
  419. * @return CcScheduleQuery The current query, for fluid interface
  420. */
  421. public function filterByDbCueIn($dbCueIn = null, $comparison = null)
  422. {
  423. if (null === $comparison) {
  424. if (is_array($dbCueIn)) {
  425. $comparison = Criteria::IN;
  426. } elseif (preg_match('/[\%\*]/', $dbCueIn)) {
  427. $dbCueIn = str_replace('*', '%', $dbCueIn);
  428. $comparison = Criteria::LIKE;
  429. }
  430. }
  431. return $this->addUsingAlias(CcSchedulePeer::CUE_IN, $dbCueIn, $comparison);
  432. }
  433. /**
  434. * Filter the query on the cue_out column
  435. *
  436. * @param string $dbCueOut The value to use as filter.
  437. * Accepts wildcards (* and % trigger a LIKE)
  438. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  439. *
  440. * @return CcScheduleQuery The current query, for fluid interface
  441. */
  442. public function filterByDbCueOut($dbCueOut = null, $comparison = null)
  443. {
  444. if (null === $comparison) {
  445. if (is_array($dbCueOut)) {
  446. $comparison = Criteria::IN;
  447. } elseif (preg_match('/[\%\*]/', $dbCueOut)) {
  448. $dbCueOut = str_replace('*', '%', $dbCueOut);
  449. $comparison = Criteria::LIKE;
  450. }
  451. }
  452. return $this->addUsingAlias(CcSchedulePeer::CUE_OUT, $dbCueOut, $comparison);
  453. }
  454. /**
  455. * Filter the query on the media_item_played column
  456. *
  457. * @param boolean|string $dbMediaItemPlayed The value to use as filter.
  458. * Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
  459. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  460. *
  461. * @return CcScheduleQuery The current query, for fluid interface
  462. */
  463. public function filterByDbMediaItemPlayed($dbMediaItemPlayed = null, $comparison = null)
  464. {
  465. if (is_string($dbMediaItemPlayed)) {
  466. $media_item_played = in_array(strtolower($dbMediaItemPlayed), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
  467. }
  468. return $this->addUsingAlias(CcSchedulePeer::MEDIA_ITEM_PLAYED, $dbMediaItemPlayed, $comparison);
  469. }
  470. /**
  471. * Filter the query on the instance_id column
  472. *
  473. * @param int|array $dbInstanceId The value to use as filter.
  474. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  475. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  476. *
  477. * @return CcScheduleQuery The current query, for fluid interface
  478. */
  479. public function filterByDbInstanceId($dbInstanceId = null, $comparison = null)
  480. {
  481. if (is_array($dbInstanceId)) {
  482. $useMinMax = false;
  483. if (isset($dbInstanceId['min'])) {
  484. $this->addUsingAlias(CcSchedulePeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL);
  485. $useMinMax = true;
  486. }
  487. if (isset($dbInstanceId['max'])) {
  488. $this->addUsingAlias(CcSchedulePeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL);
  489. $useMinMax = true;
  490. }
  491. if ($useMinMax) {
  492. return $this;
  493. }
  494. if (null === $comparison) {
  495. $comparison = Criteria::IN;
  496. }
  497. }
  498. return $this->addUsingAlias(CcSchedulePeer::INSTANCE_ID, $dbInstanceId, $comparison);
  499. }
  500. /**
  501. * Filter the query on the playout_status column
  502. *
  503. * @param int|array $dbPlayoutStatus The value to use as filter.
  504. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  505. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  506. *
  507. * @return CcScheduleQuery The current query, for fluid interface
  508. */
  509. public function filterByDbPlayoutStatus($dbPlayoutStatus = null, $comparison = null)
  510. {
  511. if (is_array($dbPlayoutStatus)) {
  512. $useMinMax = false;
  513. if (isset($dbPlayoutStatus['min'])) {
  514. $this->addUsingAlias(CcSchedulePeer::PLAYOUT_STATUS, $dbPlayoutStatus['min'], Criteria::GREATER_EQUAL);
  515. $useMinMax = true;
  516. }
  517. if (isset($dbPlayoutStatus['max'])) {
  518. $this->addUsingAlias(CcSchedulePeer::PLAYOUT_STATUS, $dbPlayoutStatus['max'], Criteria::LESS_EQUAL);
  519. $useMinMax = true;
  520. }
  521. if ($useMinMax) {
  522. return $this;
  523. }
  524. if (null === $comparison) {
  525. $comparison = Criteria::IN;
  526. }
  527. }
  528. return $this->addUsingAlias(CcSchedulePeer::PLAYOUT_STATUS, $dbPlayoutStatus, $comparison);
  529. }
  530. /**
  531. * Filter the query on the broadcasted column
  532. *
  533. * @param int|array $dbBroadcasted The value to use as filter.
  534. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  535. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  536. *
  537. * @return CcScheduleQuery The current query, for fluid interface
  538. */
  539. public function filterByDbBroadcasted($dbBroadcasted = null, $comparison = null)
  540. {
  541. if (is_array($dbBroadcasted)) {
  542. $useMinMax = false;
  543. if (isset($dbBroadcasted['min'])) {
  544. $this->addUsingAlias(CcSchedulePeer::BROADCASTED, $dbBroadcasted['min'], Criteria::GREATER_EQUAL);
  545. $useMinMax = true;
  546. }
  547. if (isset($dbBroadcasted['max'])) {
  548. $this->addUsingAlias(CcSchedulePeer::BROADCASTED, $dbBroadcasted['max'], Criteria::LESS_EQUAL);
  549. $useMinMax = true;
  550. }
  551. if ($useMinMax) {
  552. return $this;
  553. }
  554. if (null === $comparison) {
  555. $comparison = Criteria::IN;
  556. }
  557. }
  558. return $this->addUsingAlias(CcSchedulePeer::BROADCASTED, $dbBroadcasted, $comparison);
  559. }
  560. /**
  561. * Filter the query on the position column
  562. *
  563. * @param int|array $dbPosition The value to use as filter.
  564. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  565. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  566. *
  567. * @return CcScheduleQuery The current query, for fluid interface
  568. */
  569. public function filterByDbPosition($dbPosition = null, $comparison = null)
  570. {
  571. if (is_array($dbPosition)) {
  572. $useMinMax = false;
  573. if (isset($dbPosition['min'])) {
  574. $this->addUsingAlias(CcSchedulePeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
  575. $useMinMax = true;
  576. }
  577. if (isset($dbPosition['max'])) {
  578. $this->addUsingAlias(CcSchedulePeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
  579. $useMinMax = true;
  580. }
  581. if ($useMinMax) {
  582. return $this;
  583. }
  584. if (null === $comparison) {
  585. $comparison = Criteria::IN;
  586. }
  587. }
  588. return $this->addUsingAlias(CcSchedulePeer::POSITION, $dbPosition, $comparison);
  589. }
  590. /**
  591. * Filter the query by a related CcShowInstances object
  592. *
  593. * @param CcShowInstances $ccShowInstances the related object to use as filter
  594. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  595. *
  596. * @return CcScheduleQuery The current query, for fluid interface
  597. */
  598. public function filterByCcShowInstances($ccShowInstances, $comparison = null)
  599. {
  600. return $this
  601. ->addUsingAlias(CcSchedulePeer::INSTANCE_ID, $ccShowInstances->getDbId(), $comparison);
  602. }
  603. /**
  604. * Adds a JOIN clause to the query using the CcShowInstances relation
  605. *
  606. * @param string $relationAlias optional alias for the relation
  607. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  608. *
  609. * @return CcScheduleQuery The current query, for fluid interface
  610. */
  611. public function joinCcShowInstances($relationAlias = '', $joinType = Criteria::INNER_JOIN)
  612. {
  613. $tableMap = $this->getTableMap();
  614. $relationMap = $tableMap->getRelation('CcShowInstances');
  615. // create a ModelJoin object for this join
  616. $join = new ModelJoin();
  617. $join->setJoinType($joinType);
  618. $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
  619. if ($previousJoin = $this->getPreviousJoin()) {
  620. $join->setPreviousJoin($previousJoin);
  621. }
  622. // add the ModelJoin to the current object
  623. if($relationAlias) {
  624. $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
  625. $this->addJoinObject($join, $relationAlias);
  626. } else {
  627. $this->addJoinObject($join, 'CcShowInstances');
  628. }
  629. return $this;
  630. }
  631. /**
  632. * Use the CcShowInstances relation CcShowInstances object
  633. *
  634. * @see useQuery()
  635. *
  636. * @param string $relationAlias optional alias for the relation,
  637. * to be used as main alias in the secondary query
  638. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  639. *
  640. * @return CcShowInstancesQuery A secondary query class using the current class as primary query
  641. */
  642. public function useCcShowInstancesQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
  643. {
  644. return $this
  645. ->joinCcShowInstances($relationAlias, $joinType)
  646. ->useQuery($relationAlias ? $relationAlias : 'CcShowInstances', 'CcShowInstancesQuery');
  647. }
  648. /**
  649. * Filter the query by a related CcFiles object
  650. *
  651. * @param CcFiles $ccFiles the related object to use as filter
  652. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  653. *
  654. * @return CcScheduleQuery The current query, for fluid interface
  655. */
  656. public function filterByCcFiles($ccFiles, $comparison = null)
  657. {
  658. return $this
  659. ->addUsingAlias(CcSchedulePeer::FILE_ID, $ccFiles->getDbId(), $comparison);
  660. }
  661. /**
  662. * Adds a JOIN clause to the query using the CcFiles relation
  663. *
  664. * @param string $relationAlias optional alias for the relation
  665. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  666. *
  667. * @return CcScheduleQuery The current query, for fluid interface
  668. */
  669. public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
  670. {
  671. $tableMap = $this->getTableMap();
  672. $relationMap = $tableMap->getRelation('CcFiles');
  673. // create a ModelJoin object for this join
  674. $join = new ModelJoin();
  675. $join->setJoinType($joinType);
  676. $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
  677. if ($previousJoin = $this->getPreviousJoin()) {
  678. $join->setPreviousJoin($previousJoin);
  679. }
  680. // add the ModelJoin to the current object
  681. if($relationAlias) {
  682. $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
  683. $this->addJoinObject($join, $relationAlias);
  684. } else {
  685. $this->addJoinObject($join, 'CcFiles');
  686. }
  687. return $this;
  688. }
  689. /**
  690. * Use the CcFiles relation CcFiles object
  691. *
  692. * @see useQuery()
  693. *
  694. * @param string $relationAlias optional alias for the relation,
  695. * to be used as main alias in the secondary query
  696. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  697. *
  698. * @return CcFilesQuery A secondary query class using the current class as primary query
  699. */
  700. public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
  701. {
  702. return $this
  703. ->joinCcFiles($relationAlias, $joinType)
  704. ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
  705. }
  706. /**
  707. * Filter the query by a related CcWebstream object
  708. *
  709. * @param CcWebstream $ccWebstream the related object to use as filter
  710. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  711. *
  712. * @return CcScheduleQuery The current query, for fluid interface
  713. */
  714. public function filterByCcWebstream($ccWebstream, $comparison = null)
  715. {
  716. return $this
  717. ->addUsingAlias(CcSchedulePeer::STREAM_ID, $ccWebstream->getDbId(), $comparison);
  718. }
  719. /**
  720. * Adds a JOIN clause to the query using the CcWebstream relation
  721. *
  722. * @param string $relationAlias optional alias for the relation
  723. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  724. *
  725. * @return CcScheduleQuery The current query, for fluid interface
  726. */
  727. public function joinCcWebstream($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
  728. {
  729. $tableMap = $this->getTableMap();
  730. $relationMap = $tableMap->getRelation('CcWebstream');
  731. // create a ModelJoin object for this join
  732. $join = new ModelJoin();
  733. $join->setJoinType($joinType);
  734. $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
  735. if ($previousJoin = $this->getPreviousJoin()) {
  736. $join->setPreviousJoin($previousJoin);
  737. }
  738. // add the ModelJoin to the current object
  739. if($relationAlias) {
  740. $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
  741. $this->addJoinObject($join, $relationAlias);
  742. } else {
  743. $this->addJoinObject($join, 'CcWebstream');
  744. }
  745. return $this;
  746. }
  747. /**
  748. * Use the CcWebstream relation CcWebstream object
  749. *
  750. * @see useQuery()
  751. *
  752. * @param string $relationAlias optional alias for the relation,
  753. * to be used as main alias in the secondary query
  754. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  755. *
  756. * @return CcWebstreamQuery A secondary query class using the current class as primary query
  757. */
  758. public function useCcWebstreamQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
  759. {
  760. return $this
  761. ->joinCcWebstream($relationAlias, $joinType)
  762. ->useQuery($relationAlias ? $relationAlias : 'CcWebstream', 'CcWebstreamQuery');
  763. }
  764. /**
  765. * Filter the query by a related CcWebstreamMetadata object
  766. *
  767. * @param CcWebstreamMetadata $ccWebstreamMetadata the related object to use as filter
  768. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  769. *
  770. * @return CcScheduleQuery The current query, for fluid interface
  771. */
  772. public function filterByCcWebstreamMetadata($ccWebstreamMetadata, $comparison = null)
  773. {
  774. return $this
  775. ->addUsingAlias(CcSchedulePeer::ID, $ccWebstreamMetadata->getDbInstanceId(), $comparison);
  776. }
  777. /**
  778. * Adds a JOIN clause to the query using the CcWebstreamMetadata relation
  779. *
  780. * @param string $relationAlias optional alias for the relation
  781. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  782. *
  783. * @return CcScheduleQuery The current query, for fluid interface
  784. */
  785. public function joinCcWebstreamMetadata($relationAlias = '', $joinType = Criteria::INNER_JOIN)
  786. {
  787. $tableMap = $this->getTableMap();
  788. $relationMap = $tableMap->getRelation('CcWebstreamMetadata');
  789. // create a ModelJoin object for this join
  790. $join = new ModelJoin();
  791. $join->setJoinType($joinType);
  792. $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
  793. if ($previousJoin = $this->getPreviousJoin()) {
  794. $join->setPreviousJoin($previousJoin);
  795. }
  796. // add the ModelJoin to the current object
  797. if($relationAlias) {
  798. $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
  799. $this->addJoinObject($join, $relationAlias);
  800. } else {
  801. $this->addJoinObject($join, 'CcWebstreamMetadata');
  802. }
  803. return $this;
  804. }
  805. /**
  806. * Use the CcWebstreamMetadata relation CcWebstreamMetadata object
  807. *
  808. * @see useQuery()
  809. *
  810. * @param string $relationAlias optional alias for the relation,
  811. * to be used as main alias in the secondary query
  812. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  813. *
  814. * @return CcWebstreamMetadataQuery A secondary query class using the current class as primary query
  815. */
  816. public function useCcWebstreamMetadataQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
  817. {
  818. return $this
  819. ->joinCcWebstreamMetadata($relationAlias, $joinType)
  820. ->useQuery($relationAlias ? $relationAlias : 'CcWebstreamMetadata', 'CcWebstreamMetadataQuery');
  821. }
  822. /**
  823. * Exclude object from result
  824. *
  825. * @param CcSchedule $ccSchedule Object to remove from the list of results
  826. *
  827. * @return CcScheduleQuery The current query, for fluid interface
  828. */
  829. public function prune($ccSchedule = null)
  830. {
  831. if ($ccSchedule) {
  832. $this->addUsingAlias(CcSchedulePeer::ID, $ccSchedule->getDbId(), Criteria::NOT_EQUAL);
  833. }
  834. return $this;
  835. }
  836. } // BaseCcScheduleQuery