BaseCcPlayoutHistoryTemplateFieldQuery.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <?php
  2. /**
  3. * Base class that represents a query for the 'cc_playout_history_template_field' table.
  4. *
  5. *
  6. *
  7. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbId($order = Criteria::ASC) Order by the id column
  8. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbTemplateId($order = Criteria::ASC) Order by the template_id column
  9. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbName($order = Criteria::ASC) Order by the name column
  10. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbLabel($order = Criteria::ASC) Order by the label column
  11. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbType($order = Criteria::ASC) Order by the type column
  12. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbIsFileMD($order = Criteria::ASC) Order by the is_file_md column
  13. * @method CcPlayoutHistoryTemplateFieldQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
  14. *
  15. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbId() Group by the id column
  16. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbTemplateId() Group by the template_id column
  17. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbName() Group by the name column
  18. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbLabel() Group by the label column
  19. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbType() Group by the type column
  20. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbIsFileMD() Group by the is_file_md column
  21. * @method CcPlayoutHistoryTemplateFieldQuery groupByDbPosition() Group by the position column
  22. *
  23. * @method CcPlayoutHistoryTemplateFieldQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
  24. * @method CcPlayoutHistoryTemplateFieldQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
  25. * @method CcPlayoutHistoryTemplateFieldQuery innerJoin($relation) Adds a INNER JOIN clause to the query
  26. *
  27. * @method CcPlayoutHistoryTemplateFieldQuery leftJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
  28. * @method CcPlayoutHistoryTemplateFieldQuery rightJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
  29. * @method CcPlayoutHistoryTemplateFieldQuery innerJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplate relation
  30. *
  31. * @method CcPlayoutHistoryTemplateField findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateField matching the query
  32. * @method CcPlayoutHistoryTemplateField findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateField matching the query, or a new CcPlayoutHistoryTemplateField object populated from the query conditions when no match is found
  33. *
  34. * @method CcPlayoutHistoryTemplateField findOneByDbId(int $id) Return the first CcPlayoutHistoryTemplateField filtered by the id column
  35. * @method CcPlayoutHistoryTemplateField findOneByDbTemplateId(int $template_id) Return the first CcPlayoutHistoryTemplateField filtered by the template_id column
  36. * @method CcPlayoutHistoryTemplateField findOneByDbName(string $name) Return the first CcPlayoutHistoryTemplateField filtered by the name column
  37. * @method CcPlayoutHistoryTemplateField findOneByDbLabel(string $label) Return the first CcPlayoutHistoryTemplateField filtered by the label column
  38. * @method CcPlayoutHistoryTemplateField findOneByDbType(string $type) Return the first CcPlayoutHistoryTemplateField filtered by the type column
  39. * @method CcPlayoutHistoryTemplateField findOneByDbIsFileMD(boolean $is_file_md) Return the first CcPlayoutHistoryTemplateField filtered by the is_file_md column
  40. * @method CcPlayoutHistoryTemplateField findOneByDbPosition(int $position) Return the first CcPlayoutHistoryTemplateField filtered by the position column
  41. *
  42. * @method array findByDbId(int $id) Return CcPlayoutHistoryTemplateField objects filtered by the id column
  43. * @method array findByDbTemplateId(int $template_id) Return CcPlayoutHistoryTemplateField objects filtered by the template_id column
  44. * @method array findByDbName(string $name) Return CcPlayoutHistoryTemplateField objects filtered by the name column
  45. * @method array findByDbLabel(string $label) Return CcPlayoutHistoryTemplateField objects filtered by the label column
  46. * @method array findByDbType(string $type) Return CcPlayoutHistoryTemplateField objects filtered by the type column
  47. * @method array findByDbIsFileMD(boolean $is_file_md) Return CcPlayoutHistoryTemplateField objects filtered by the is_file_md column
  48. * @method array findByDbPosition(int $position) Return CcPlayoutHistoryTemplateField objects filtered by the position column
  49. *
  50. * @package propel.generator.airtime.om
  51. */
  52. abstract class BaseCcPlayoutHistoryTemplateFieldQuery extends ModelCriteria
  53. {
  54. /**
  55. * Initializes internal state of BaseCcPlayoutHistoryTemplateFieldQuery object.
  56. *
  57. * @param string $dbName The dabase name
  58. * @param string $modelName The phpName of a model, e.g. 'Book'
  59. * @param string $modelAlias The alias for the model in this query, e.g. 'b'
  60. */
  61. public function __construct($dbName = 'airtime', $modelName = 'CcPlayoutHistoryTemplateField', $modelAlias = null)
  62. {
  63. parent::__construct($dbName, $modelName, $modelAlias);
  64. }
  65. /**
  66. * Returns a new CcPlayoutHistoryTemplateFieldQuery object.
  67. *
  68. * @param string $modelAlias The alias of a model in the query
  69. * @param Criteria $criteria Optional Criteria to build the query from
  70. *
  71. * @return CcPlayoutHistoryTemplateFieldQuery
  72. */
  73. public static function create($modelAlias = null, $criteria = null)
  74. {
  75. if ($criteria instanceof CcPlayoutHistoryTemplateFieldQuery) {
  76. return $criteria;
  77. }
  78. $query = new CcPlayoutHistoryTemplateFieldQuery();
  79. if (null !== $modelAlias) {
  80. $query->setModelAlias($modelAlias);
  81. }
  82. if ($criteria instanceof Criteria) {
  83. $query->mergeWith($criteria);
  84. }
  85. return $query;
  86. }
  87. /**
  88. * Find object by primary key
  89. * Use instance pooling to avoid a database query if the object exists
  90. * <code>
  91. * $obj = $c->findPk(12, $con);
  92. * </code>
  93. * @param mixed $key Primary key to use for the query
  94. * @param PropelPDO $con an optional connection object
  95. *
  96. * @return CcPlayoutHistoryTemplateField|array|mixed the result, formatted by the current formatter
  97. */
  98. public function findPk($key, $con = null)
  99. {
  100. if ((null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
  101. // the object is alredy in the instance pool
  102. return $obj;
  103. } else {
  104. // the object has not been requested yet, or the formatter is not an object formatter
  105. $criteria = $this->isKeepQuery() ? clone $this : $this;
  106. $stmt = $criteria
  107. ->filterByPrimaryKey($key)
  108. ->getSelectStatement($con);
  109. return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
  110. }
  111. }
  112. /**
  113. * Find objects by primary key
  114. * <code>
  115. * $objs = $c->findPks(array(12, 56, 832), $con);
  116. * </code>
  117. * @param array $keys Primary keys to use for the query
  118. * @param PropelPDO $con an optional connection object
  119. *
  120. * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
  121. */
  122. public function findPks($keys, $con = null)
  123. {
  124. $criteria = $this->isKeepQuery() ? clone $this : $this;
  125. return $this
  126. ->filterByPrimaryKeys($keys)
  127. ->find($con);
  128. }
  129. /**
  130. * Filter the query by primary key
  131. *
  132. * @param mixed $key Primary key to use for the query
  133. *
  134. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  135. */
  136. public function filterByPrimaryKey($key)
  137. {
  138. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $key, Criteria::EQUAL);
  139. }
  140. /**
  141. * Filter the query by a list of primary keys
  142. *
  143. * @param array $keys The list of primary key to use for the query
  144. *
  145. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  146. */
  147. public function filterByPrimaryKeys($keys)
  148. {
  149. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $keys, Criteria::IN);
  150. }
  151. /**
  152. * Filter the query on the id column
  153. *
  154. * @param int|array $dbId The value to use as filter.
  155. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  156. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  157. *
  158. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  159. */
  160. public function filterByDbId($dbId = null, $comparison = null)
  161. {
  162. if (is_array($dbId) && null === $comparison) {
  163. $comparison = Criteria::IN;
  164. }
  165. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $dbId, $comparison);
  166. }
  167. /**
  168. * Filter the query on the template_id column
  169. *
  170. * @param int|array $dbTemplateId The value to use as filter.
  171. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  172. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  173. *
  174. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  175. */
  176. public function filterByDbTemplateId($dbTemplateId = null, $comparison = null)
  177. {
  178. if (is_array($dbTemplateId)) {
  179. $useMinMax = false;
  180. if (isset($dbTemplateId['min'])) {
  181. $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['min'], Criteria::GREATER_EQUAL);
  182. $useMinMax = true;
  183. }
  184. if (isset($dbTemplateId['max'])) {
  185. $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['max'], Criteria::LESS_EQUAL);
  186. $useMinMax = true;
  187. }
  188. if ($useMinMax) {
  189. return $this;
  190. }
  191. if (null === $comparison) {
  192. $comparison = Criteria::IN;
  193. }
  194. }
  195. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId, $comparison);
  196. }
  197. /**
  198. * Filter the query on the name column
  199. *
  200. * @param string $dbName The value to use as filter.
  201. * Accepts wildcards (* and % trigger a LIKE)
  202. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  203. *
  204. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  205. */
  206. public function filterByDbName($dbName = null, $comparison = null)
  207. {
  208. if (null === $comparison) {
  209. if (is_array($dbName)) {
  210. $comparison = Criteria::IN;
  211. } elseif (preg_match('/[\%\*]/', $dbName)) {
  212. $dbName = str_replace('*', '%', $dbName);
  213. $comparison = Criteria::LIKE;
  214. }
  215. }
  216. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::NAME, $dbName, $comparison);
  217. }
  218. /**
  219. * Filter the query on the label column
  220. *
  221. * @param string $dbLabel The value to use as filter.
  222. * Accepts wildcards (* and % trigger a LIKE)
  223. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  224. *
  225. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  226. */
  227. public function filterByDbLabel($dbLabel = null, $comparison = null)
  228. {
  229. if (null === $comparison) {
  230. if (is_array($dbLabel)) {
  231. $comparison = Criteria::IN;
  232. } elseif (preg_match('/[\%\*]/', $dbLabel)) {
  233. $dbLabel = str_replace('*', '%', $dbLabel);
  234. $comparison = Criteria::LIKE;
  235. }
  236. }
  237. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::LABEL, $dbLabel, $comparison);
  238. }
  239. /**
  240. * Filter the query on the type column
  241. *
  242. * @param string $dbType The value to use as filter.
  243. * Accepts wildcards (* and % trigger a LIKE)
  244. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  245. *
  246. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  247. */
  248. public function filterByDbType($dbType = null, $comparison = null)
  249. {
  250. if (null === $comparison) {
  251. if (is_array($dbType)) {
  252. $comparison = Criteria::IN;
  253. } elseif (preg_match('/[\%\*]/', $dbType)) {
  254. $dbType = str_replace('*', '%', $dbType);
  255. $comparison = Criteria::LIKE;
  256. }
  257. }
  258. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TYPE, $dbType, $comparison);
  259. }
  260. /**
  261. * Filter the query on the is_file_md column
  262. *
  263. * @param boolean|string $dbIsFileMD The value to use as filter.
  264. * Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
  265. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  266. *
  267. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  268. */
  269. public function filterByDbIsFileMD($dbIsFileMD = null, $comparison = null)
  270. {
  271. if (is_string($dbIsFileMD)) {
  272. $is_file_md = in_array(strtolower($dbIsFileMD), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
  273. }
  274. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD, $dbIsFileMD, $comparison);
  275. }
  276. /**
  277. * Filter the query on the position column
  278. *
  279. * @param int|array $dbPosition The value to use as filter.
  280. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  281. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  282. *
  283. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  284. */
  285. public function filterByDbPosition($dbPosition = null, $comparison = null)
  286. {
  287. if (is_array($dbPosition)) {
  288. $useMinMax = false;
  289. if (isset($dbPosition['min'])) {
  290. $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
  291. $useMinMax = true;
  292. }
  293. if (isset($dbPosition['max'])) {
  294. $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
  295. $useMinMax = true;
  296. }
  297. if ($useMinMax) {
  298. return $this;
  299. }
  300. if (null === $comparison) {
  301. $comparison = Criteria::IN;
  302. }
  303. }
  304. return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition, $comparison);
  305. }
  306. /**
  307. * Filter the query by a related CcPlayoutHistoryTemplate object
  308. *
  309. * @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate the related object to use as filter
  310. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  311. *
  312. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  313. */
  314. public function filterByCcPlayoutHistoryTemplate($ccPlayoutHistoryTemplate, $comparison = null)
  315. {
  316. return $this
  317. ->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->getDbId(), $comparison);
  318. }
  319. /**
  320. * Adds a JOIN clause to the query using the CcPlayoutHistoryTemplate relation
  321. *
  322. * @param string $relationAlias optional alias for the relation
  323. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  324. *
  325. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  326. */
  327. public function joinCcPlayoutHistoryTemplate($relationAlias = '', $joinType = Criteria::INNER_JOIN)
  328. {
  329. $tableMap = $this->getTableMap();
  330. $relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplate');
  331. // create a ModelJoin object for this join
  332. $join = new ModelJoin();
  333. $join->setJoinType($joinType);
  334. $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
  335. if ($previousJoin = $this->getPreviousJoin()) {
  336. $join->setPreviousJoin($previousJoin);
  337. }
  338. // add the ModelJoin to the current object
  339. if($relationAlias) {
  340. $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
  341. $this->addJoinObject($join, $relationAlias);
  342. } else {
  343. $this->addJoinObject($join, 'CcPlayoutHistoryTemplate');
  344. }
  345. return $this;
  346. }
  347. /**
  348. * Use the CcPlayoutHistoryTemplate relation CcPlayoutHistoryTemplate object
  349. *
  350. * @see useQuery()
  351. *
  352. * @param string $relationAlias optional alias for the relation,
  353. * to be used as main alias in the secondary query
  354. * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
  355. *
  356. * @return CcPlayoutHistoryTemplateQuery A secondary query class using the current class as primary query
  357. */
  358. public function useCcPlayoutHistoryTemplateQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
  359. {
  360. return $this
  361. ->joinCcPlayoutHistoryTemplate($relationAlias, $joinType)
  362. ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery');
  363. }
  364. /**
  365. * Exclude object from result
  366. *
  367. * @param CcPlayoutHistoryTemplateField $ccPlayoutHistoryTemplateField Object to remove from the list of results
  368. *
  369. * @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
  370. */
  371. public function prune($ccPlayoutHistoryTemplateField = null)
  372. {
  373. if ($ccPlayoutHistoryTemplateField) {
  374. $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $ccPlayoutHistoryTemplateField->getDbId(), Criteria::NOT_EQUAL);
  375. }
  376. return $this;
  377. }
  378. } // BaseCcPlayoutHistoryTemplateFieldQuery