BaseCcWebstreamQuery.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <?php
  2. /**
  3. * Base class that represents a query for the 'cc_webstream' table.
  4. *
  5. *
  6. *
  7. * @method CcWebstreamQuery orderByDbId($order = Criteria::ASC) Order by the id column
  8. * @method CcWebstreamQuery orderByDbName($order = Criteria::ASC) Order by the name column
  9. * @method CcWebstreamQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
  10. * @method CcWebstreamQuery orderByDbUrl($order = Criteria::ASC) Order by the url column
  11. * @method CcWebstreamQuery orderByDbLength($order = Criteria::ASC) Order by the length column
  12. * @method CcWebstreamQuery orderByDbCreatorId($order = Criteria::ASC) Order by the creator_id column
  13. * @method CcWebstreamQuery orderByDbMtime($order = Criteria::ASC) Order by the mtime column
  14. * @method CcWebstreamQuery orderByDbUtime($order = Criteria::ASC) Order by the utime column
  15. * @method CcWebstreamQuery orderByDbLPtime($order = Criteria::ASC) Order by the lptime column
  16. * @method CcWebstreamQuery orderByDbMime($order = Criteria::ASC) Order by the mime column
  17. *
  18. * @method CcWebstreamQuery groupByDbId() Group by the id column
  19. * @method CcWebstreamQuery groupByDbName() Group by the name column
  20. * @method CcWebstreamQuery groupByDbDescription() Group by the description column
  21. * @method CcWebstreamQuery groupByDbUrl() Group by the url column
  22. * @method CcWebstreamQuery groupByDbLength() Group by the length column
  23. * @method CcWebstreamQuery groupByDbCreatorId() Group by the creator_id column
  24. * @method CcWebstreamQuery groupByDbMtime() Group by the mtime column
  25. * @method CcWebstreamQuery groupByDbUtime() Group by the utime column
  26. * @method CcWebstreamQuery groupByDbLPtime() Group by the lptime column
  27. * @method CcWebstreamQuery groupByDbMime() Group by the mime column
  28. *
  29. * @method CcWebstreamQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
  30. * @method CcWebstreamQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
  31. * @method CcWebstreamQuery innerJoin($relation) Adds a INNER JOIN clause to the query
  32. *
  33. * @method CcWebstreamQuery leftJoinCcSchedule($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSchedule relation
  34. * @method CcWebstreamQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation
  35. * @method CcWebstreamQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation
  36. *
  37. * @method CcWebstream findOne(PropelPDO $con = null) Return the first CcWebstream matching the query
  38. * @method CcWebstream findOneOrCreate(PropelPDO $con = null) Return the first CcWebstream matching the query, or a new CcWebstream object populated from the query conditions when no match is found
  39. *
  40. * @method CcWebstream findOneByDbId(int $id) Return the first CcWebstream filtered by the id column
  41. * @method CcWebstream findOneByDbName(string $name) Return the first CcWebstream filtered by the name column
  42. * @method CcWebstream findOneByDbDescription(string $description) Return the first CcWebstream filtered by the description column
  43. * @method CcWebstream findOneByDbUrl(string $url) Return the first CcWebstream filtered by the url column
  44. * @method CcWebstream findOneByDbLength(string $length) Return the first CcWebstream filtered by the length column
  45. * @method CcWebstream findOneByDbCreatorId(int $creator_id) Return the first CcWebstream filtered by the creator_id column
  46. * @method CcWebstream findOneByDbMtime(string $mtime) Return the first CcWebstream filtered by the mtime column
  47. * @method CcWebstream findOneByDbUtime(string $utime) Return the first CcWebstream filtered by the utime column
  48. * @method CcWebstream findOneByDbLPtime(string $lptime) Return the first CcWebstream filtered by the lptime column
  49. * @method CcWebstream findOneByDbMime(string $mime) Return the first CcWebstream filtered by the mime column
  50. *
  51. * @method array findByDbId(int $id) Return CcWebstream objects filtered by the id column
  52. * @method array findByDbName(string $name) Return CcWebstream objects filtered by the name column
  53. * @method array findByDbDescription(string $description) Return CcWebstream objects filtered by the description column
  54. * @method array findByDbUrl(string $url) Return CcWebstream objects filtered by the url column
  55. * @method array findByDbLength(string $length) Return CcWebstream objects filtered by the length column
  56. * @method array findByDbCreatorId(int $creator_id) Return CcWebstream objects filtered by the creator_id column
  57. * @method array findByDbMtime(string $mtime) Return CcWebstream objects filtered by the mtime column
  58. * @method array findByDbUtime(string $utime) Return CcWebstream objects filtered by the utime column
  59. * @method array findByDbLPtime(string $lptime) Return CcWebstream objects filtered by the lptime column
  60. * @method array findByDbMime(string $mime) Return CcWebstream objects filtered by the mime column
  61. *
  62. * @package propel.generator.airtime.om
  63. */
  64. abstract class BaseCcWebstreamQuery extends ModelCriteria
  65. {
  66. /**
  67. * Initializes internal state of BaseCcWebstreamQuery object.
  68. *
  69. * @param string $dbName The dabase name
  70. * @param string $modelName The phpName of a model, e.g. 'Book'
  71. * @param string $modelAlias The alias for the model in this query, e.g. 'b'
  72. */
  73. public function __construct($dbName = 'airtime', $modelName = 'CcWebstream', $modelAlias = null)
  74. {
  75. parent::__construct($dbName, $modelName, $modelAlias);
  76. }
  77. /**
  78. * Returns a new CcWebstreamQuery object.
  79. *
  80. * @param string $modelAlias The alias of a model in the query
  81. * @param Criteria $criteria Optional Criteria to build the query from
  82. *
  83. * @return CcWebstreamQuery
  84. */
  85. public static function create($modelAlias = null, $criteria = null)
  86. {
  87. if ($criteria instanceof CcWebstreamQuery) {
  88. return $criteria;
  89. }
  90. $query = new CcWebstreamQuery();
  91. if (null !== $modelAlias) {
  92. $query->setModelAlias($modelAlias);
  93. }
  94. if ($criteria instanceof Criteria) {
  95. $query->mergeWith($criteria);
  96. }
  97. return $query;
  98. }
  99. /**
  100. * Find object by primary key
  101. * Use instance pooling to avoid a database query if the object exists
  102. * <code>
  103. * $obj = $c->findPk(12, $con);
  104. * </code>
  105. * @param mixed $key Primary key to use for the query
  106. * @param PropelPDO $con an optional connection object
  107. *
  108. * @return CcWebstream|array|mixed the result, formatted by the current formatter
  109. */
  110. public function findPk($key, $con = null)
  111. {
  112. if ((null !== ($obj = CcWebstreamPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
  113. // the object is alredy in the instance pool
  114. return $obj;
  115. } else {
  116. // the object has not been requested yet, or the formatter is not an object formatter
  117. $criteria = $this->isKeepQuery() ? clone $this : $this;
  118. $stmt = $criteria
  119. ->filterByPrimaryKey($key)
  120. ->getSelectStatement($con);
  121. return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
  122. }
  123. }
  124. /**
  125. * Find objects by primary key
  126. * <code>
  127. * $objs = $c->findPks(array(12, 56, 832), $con);
  128. * </code>
  129. * @param array $keys Primary keys to use for the query
  130. * @param PropelPDO $con an optional connection object
  131. *
  132. * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
  133. */
  134. public function findPks($keys, $con = null)
  135. {
  136. $criteria = $this->isKeepQuery() ? clone $this : $this;
  137. return $this
  138. ->filterByPrimaryKeys($keys)
  139. ->find($con);
  140. }
  141. /**
  142. * Filter the query by primary key
  143. *
  144. * @param mixed $key Primary key to use for the query
  145. *
  146. * @return CcWebstreamQuery The current query, for fluid interface
  147. */
  148. public function filterByPrimaryKey($key)
  149. {
  150. return $this->addUsingAlias(CcWebstreamPeer::ID, $key, Criteria::EQUAL);
  151. }
  152. /**
  153. * Filter the query by a list of primary keys
  154. *
  155. * @param array $keys The list of primary key to use for the query
  156. *
  157. * @return CcWebstreamQuery The current query, for fluid interface
  158. */
  159. public function filterByPrimaryKeys($keys)
  160. {
  161. return $this->addUsingAlias(CcWebstreamPeer::ID, $keys, Criteria::IN);
  162. }
  163. /**
  164. * Filter the query on the id column
  165. *
  166. * @param int|array $dbId The value to use as filter.
  167. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  168. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  169. *
  170. * @return CcWebstreamQuery The current query, for fluid interface
  171. */
  172. public function filterByDbId($dbId = null, $comparison = null)
  173. {
  174. if (is_array($dbId) && null === $comparison) {
  175. $comparison = Criteria::IN;
  176. }
  177. return $this->addUsingAlias(CcWebstreamPeer::ID, $dbId, $comparison);
  178. }
  179. /**
  180. * Filter the query on the name column
  181. *
  182. * @param string $dbName The value to use as filter.
  183. * Accepts wildcards (* and % trigger a LIKE)
  184. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  185. *
  186. * @return CcWebstreamQuery The current query, for fluid interface
  187. */
  188. public function filterByDbName($dbName = null, $comparison = null)
  189. {
  190. if (null === $comparison) {
  191. if (is_array($dbName)) {
  192. $comparison = Criteria::IN;
  193. } elseif (preg_match('/[\%\*]/', $dbName)) {
  194. $dbName = str_replace('*', '%', $dbName);
  195. $comparison = Criteria::LIKE;
  196. }
  197. }
  198. return $this->addUsingAlias(CcWebstreamPeer::NAME, $dbName, $comparison);
  199. }
  200. /**
  201. * Filter the query on the description column
  202. *
  203. * @param string $dbDescription The value to use as filter.
  204. * Accepts wildcards (* and % trigger a LIKE)
  205. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  206. *
  207. * @return CcWebstreamQuery The current query, for fluid interface
  208. */
  209. public function filterByDbDescription($dbDescription = null, $comparison = null)
  210. {
  211. if (null === $comparison) {
  212. if (is_array($dbDescription)) {
  213. $comparison = Criteria::IN;
  214. } elseif (preg_match('/[\%\*]/', $dbDescription)) {
  215. $dbDescription = str_replace('*', '%', $dbDescription);
  216. $comparison = Criteria::LIKE;
  217. }
  218. }
  219. return $this->addUsingAlias(CcWebstreamPeer::DESCRIPTION, $dbDescription, $comparison);
  220. }
  221. /**
  222. * Filter the query on the url column
  223. *
  224. * @param string $dbUrl The value to use as filter.
  225. * Accepts wildcards (* and % trigger a LIKE)
  226. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  227. *
  228. * @return CcWebstreamQuery The current query, for fluid interface
  229. */
  230. public function filterByDbUrl($dbUrl = null, $comparison = null)
  231. {
  232. if (null === $comparison) {
  233. if (is_array($dbUrl)) {
  234. $comparison = Criteria::IN;
  235. } elseif (preg_match('/[\%\*]/', $dbUrl)) {
  236. $dbUrl = str_replace('*', '%', $dbUrl);
  237. $comparison = Criteria::LIKE;
  238. }
  239. }
  240. return $this->addUsingAlias(CcWebstreamPeer::URL, $dbUrl, $comparison);
  241. }
  242. /**
  243. * Filter the query on the length column
  244. *
  245. * @param string $dbLength The value to use as filter.
  246. * Accepts wildcards (* and % trigger a LIKE)
  247. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  248. *
  249. * @return CcWebstreamQuery The current query, for fluid interface
  250. */
  251. public function filterByDbLength($dbLength = null, $comparison = null)
  252. {
  253. if (null === $comparison) {
  254. if (is_array($dbLength)) {
  255. $comparison = Criteria::IN;
  256. } elseif (preg_match('/[\%\*]/', $dbLength)) {
  257. $dbLength = str_replace('*', '%', $dbLength);
  258. $comparison = Criteria::LIKE;
  259. }
  260. }
  261. return $this->addUsingAlias(CcWebstreamPeer::LENGTH, $dbLength, $comparison);
  262. }
  263. /**
  264. * Filter the query on the creator_id column
  265. *
  266. * @param int|array $dbCreatorId The value to use as filter.
  267. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  268. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  269. *
  270. * @return CcWebstreamQuery The current query, for fluid interface
  271. */
  272. public function filterByDbCreatorId($dbCreatorId = null, $comparison = null)
  273. {
  274. if (is_array($dbCreatorId)) {
  275. $useMinMax = false;
  276. if (isset($dbCreatorId['min'])) {
  277. $this->addUsingAlias(CcWebstreamPeer::CREATOR_ID, $dbCreatorId['min'], Criteria::GREATER_EQUAL);
  278. $useMinMax = true;
  279. }
  280. if (isset($dbCreatorId['max'])) {
  281. $this->addUsingAlias(CcWebstreamPeer::CREATOR_ID, $dbCreatorId['max'], Criteria::LESS_EQUAL);
  282. $useMinMax = true;
  283. }
  284. if ($useMinMax) {
  285. return $this;
  286. }
  287. if (null === $comparison) {
  288. $comparison = Criteria::IN;
  289. }
  290. }
  291. return $this->addUsingAlias(CcWebstreamPeer::CREATOR_ID, $dbCreatorId, $comparison);
  292. }
  293. /**
  294. * Filter the query on the mtime column
  295. *
  296. * @param string|array $dbMtime The value to use as filter.
  297. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  298. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  299. *
  300. * @return CcWebstreamQuery The current query, for fluid interface
  301. */
  302. public function filterByDbMtime($dbMtime = null, $comparison = null)
  303. {
  304. if (is_array($dbMtime)) {
  305. $useMinMax = false;
  306. if (isset($dbMtime['min'])) {
  307. $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime['min'], Criteria::GREATER_EQUAL);
  308. $useMinMax = true;
  309. }
  310. if (isset($dbMtime['max'])) {
  311. $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime['max'], Criteria::LESS_EQUAL);
  312. $useMinMax = true;
  313. }
  314. if ($useMinMax) {
  315. return $this;
  316. }
  317. if (null === $comparison) {
  318. $comparison = Criteria::IN;
  319. }
  320. }
  321. return $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime, $comparison);
  322. }
  323. /**
  324. * Filter the query on the utime column
  325. *
  326. * @param string|array $dbUtime The value to use as filter.
  327. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  328. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  329. *
  330. * @return CcWebstreamQuery The current query, for fluid interface
  331. */
  332. public function filterByDbUtime($dbUtime = null, $comparison = null)
  333. {
  334. if (is_array($dbUtime)) {
  335. $useMinMax = false;
  336. if (isset($dbUtime['min'])) {
  337. $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL);
  338. $useMinMax = true;
  339. }
  340. if (isset($dbUtime['max'])) {
  341. $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL);
  342. $useMinMax = true;
  343. }
  344. if ($useMinMax) {
  345. return $this;
  346. }
  347. if (null === $comparison) {
  348. $comparison = Criteria::IN;
  349. }
  350. }
  351. return $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime, $comparison);
  352. }
  353. /**
  354. * Filter the query on the lptime column
  355. *
  356. * @param string|array $dbLPtime The value to use as filter.
  357. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  358. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  359. *
  360. * @return CcWebstreamQuery The current query, for fluid interface
  361. */
  362. public function filterByDbLPtime($dbLPtime = null, $comparison = null)
  363. {
  364. if (is_array($dbLPtime)) {
  365. $useMinMax = false;
  366. if (isset($dbLPtime['min'])) {
  367. $this->addUsingAlias(CcWebstreamPeer::LPTIME, $dbLPtime['min'], Criteria::GREATER_EQUAL);
  368. $useMinMax = true;
  369. }
  370. if (isset($dbLPtime['max'])) {
  371. $this->addUsingAlias(CcWebstreamPeer::LPTIME, $dbLPtime['max'], Criteria::LESS_EQUAL);
  372. $useMinMax = true;
  373. }
  374. if ($useMinMax) {
  375. return $this;
  376. }
  377. if (null === $comparison) {
  378. $comparison = Criteria::IN;
  379. }
  380. }
  381. return $this->addUsingAlias(CcWebstreamPeer::LPTIME, $dbLPtime, $comparison);
  382. }
  383. /**
  384. * Filter the query on the mime column
  385. *
  386. * @param string $dbMime The value to use as filter.
  387. * Accepts wildcards (* and % trigger a LIKE)
  388. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  389. *
  390. * @return CcWebstreamQuery The current query, for fluid interface
  391. */
  392. public function filterByDbMime($dbMime = null, $comparison = null)
  393. {
  394. if (null === $comparison) {
  395. if (is_array($dbMime)) {
  396. $comparison = Criteria::IN;
  397. } elseif (preg_match('/[\%\*]/', $dbMime)) {
  398. $dbMime = str_replace('*', '%', $dbMime);
  399. $comparison = Criteria::LIKE;
  400. }
  401. }
  402. return $this->addUsingAlias(CcWebstreamPeer::MIME, $dbMime, $comparison);
  403. }
  404. /**
  405. * Filter the query by a related CcSchedule object
  406. *
  407. * @param CcSchedule $ccSchedule the related object to use as filter
  408. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  409. *
  410. * @return CcWebstreamQuery The current query, for fluid interface
  411. */
  412. public function filterByCcSchedule($ccSchedule, $comparison = null)
  413. {
  414. return $this
  415. ->addUsingAlias(CcWebstreamPeer::ID, $ccSchedule->getDbStreamId(), $comparison);
  416. }
  417. /**
  418. * Adds a JOIN clause to the query using the CcSchedule relation
  419. *
  420. * @param string $relationAlias optional alias for the relation
  421. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  422. *
  423. * @return CcWebstreamQuery The current query, for fluid interface
  424. */
  425. public function joinCcSchedule($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
  426. {
  427. $tableMap = $this->getTableMap();
  428. $relationMap = $tableMap->getRelation('CcSchedule');
  429. // create a ModelJoin object for this join
  430. $join = new ModelJoin();
  431. $join->setJoinType($joinType);
  432. $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
  433. if ($previousJoin = $this->getPreviousJoin()) {
  434. $join->setPreviousJoin($previousJoin);
  435. }
  436. // add the ModelJoin to the current object
  437. if($relationAlias) {
  438. $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
  439. $this->addJoinObject($join, $relationAlias);
  440. } else {
  441. $this->addJoinObject($join, 'CcSchedule');
  442. }
  443. return $this;
  444. }
  445. /**
  446. * Use the CcSchedule relation CcSchedule object
  447. *
  448. * @see useQuery()
  449. *
  450. * @param string $relationAlias optional alias for the relation,
  451. * to be used as main alias in the secondary query
  452. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  453. *
  454. * @return CcScheduleQuery A secondary query class using the current class as primary query
  455. */
  456. public function useCcScheduleQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
  457. {
  458. return $this
  459. ->joinCcSchedule($relationAlias, $joinType)
  460. ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
  461. }
  462. /**
  463. * Exclude object from result
  464. *
  465. * @param CcWebstream $ccWebstream Object to remove from the list of results
  466. *
  467. * @return CcWebstreamQuery The current query, for fluid interface
  468. */
  469. public function prune($ccWebstream = null)
  470. {
  471. if ($ccWebstream) {
  472. $this->addUsingAlias(CcWebstreamPeer::ID, $ccWebstream->getDbId(), Criteria::NOT_EQUAL);
  473. }
  474. return $this;
  475. }
  476. } // BaseCcWebstreamQuery