BaseCcShowInstancesQuery.php 38 KB

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