BaseCcStreamSettingQuery.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <?php
  2. /**
  3. * Base class that represents a query for the 'cc_stream_setting' table.
  4. *
  5. *
  6. *
  7. * @method CcStreamSettingQuery orderByDbKeyName($order = Criteria::ASC) Order by the keyname column
  8. * @method CcStreamSettingQuery orderByDbValue($order = Criteria::ASC) Order by the value column
  9. * @method CcStreamSettingQuery orderByDbType($order = Criteria::ASC) Order by the type column
  10. *
  11. * @method CcStreamSettingQuery groupByDbKeyName() Group by the keyname column
  12. * @method CcStreamSettingQuery groupByDbValue() Group by the value column
  13. * @method CcStreamSettingQuery groupByDbType() Group by the type column
  14. *
  15. * @method CcStreamSettingQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
  16. * @method CcStreamSettingQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
  17. * @method CcStreamSettingQuery innerJoin($relation) Adds a INNER JOIN clause to the query
  18. *
  19. * @method CcStreamSetting findOne(PropelPDO $con = null) Return the first CcStreamSetting matching the query
  20. * @method CcStreamSetting findOneOrCreate(PropelPDO $con = null) Return the first CcStreamSetting matching the query, or a new CcStreamSetting object populated from the query conditions when no match is found
  21. *
  22. * @method CcStreamSetting findOneByDbKeyName(string $keyname) Return the first CcStreamSetting filtered by the keyname column
  23. * @method CcStreamSetting findOneByDbValue(string $value) Return the first CcStreamSetting filtered by the value column
  24. * @method CcStreamSetting findOneByDbType(string $type) Return the first CcStreamSetting filtered by the type column
  25. *
  26. * @method array findByDbKeyName(string $keyname) Return CcStreamSetting objects filtered by the keyname column
  27. * @method array findByDbValue(string $value) Return CcStreamSetting objects filtered by the value column
  28. * @method array findByDbType(string $type) Return CcStreamSetting objects filtered by the type column
  29. *
  30. * @package propel.generator.airtime.om
  31. */
  32. abstract class BaseCcStreamSettingQuery extends ModelCriteria
  33. {
  34. /**
  35. * Initializes internal state of BaseCcStreamSettingQuery object.
  36. *
  37. * @param string $dbName The dabase name
  38. * @param string $modelName The phpName of a model, e.g. 'Book'
  39. * @param string $modelAlias The alias for the model in this query, e.g. 'b'
  40. */
  41. public function __construct($dbName = 'airtime', $modelName = 'CcStreamSetting', $modelAlias = null)
  42. {
  43. parent::__construct($dbName, $modelName, $modelAlias);
  44. }
  45. /**
  46. * Returns a new CcStreamSettingQuery object.
  47. *
  48. * @param string $modelAlias The alias of a model in the query
  49. * @param Criteria $criteria Optional Criteria to build the query from
  50. *
  51. * @return CcStreamSettingQuery
  52. */
  53. public static function create($modelAlias = null, $criteria = null)
  54. {
  55. if ($criteria instanceof CcStreamSettingQuery) {
  56. return $criteria;
  57. }
  58. $query = new CcStreamSettingQuery();
  59. if (null !== $modelAlias) {
  60. $query->setModelAlias($modelAlias);
  61. }
  62. if ($criteria instanceof Criteria) {
  63. $query->mergeWith($criteria);
  64. }
  65. return $query;
  66. }
  67. /**
  68. * Find object by primary key
  69. * Use instance pooling to avoid a database query if the object exists
  70. * <code>
  71. * $obj = $c->findPk(12, $con);
  72. * </code>
  73. * @param mixed $key Primary key to use for the query
  74. * @param PropelPDO $con an optional connection object
  75. *
  76. * @return CcStreamSetting|array|mixed the result, formatted by the current formatter
  77. */
  78. public function findPk($key, $con = null)
  79. {
  80. if ((null !== ($obj = CcStreamSettingPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
  81. // the object is alredy in the instance pool
  82. return $obj;
  83. } else {
  84. // the object has not been requested yet, or the formatter is not an object formatter
  85. $criteria = $this->isKeepQuery() ? clone $this : $this;
  86. $stmt = $criteria
  87. ->filterByPrimaryKey($key)
  88. ->getSelectStatement($con);
  89. return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
  90. }
  91. }
  92. /**
  93. * Find objects by primary key
  94. * <code>
  95. * $objs = $c->findPks(array(12, 56, 832), $con);
  96. * </code>
  97. * @param array $keys Primary keys to use for the query
  98. * @param PropelPDO $con an optional connection object
  99. *
  100. * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
  101. */
  102. public function findPks($keys, $con = null)
  103. {
  104. $criteria = $this->isKeepQuery() ? clone $this : $this;
  105. return $this
  106. ->filterByPrimaryKeys($keys)
  107. ->find($con);
  108. }
  109. /**
  110. * Filter the query by primary key
  111. *
  112. * @param mixed $key Primary key to use for the query
  113. *
  114. * @return CcStreamSettingQuery The current query, for fluid interface
  115. */
  116. public function filterByPrimaryKey($key)
  117. {
  118. return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $key, Criteria::EQUAL);
  119. }
  120. /**
  121. * Filter the query by a list of primary keys
  122. *
  123. * @param array $keys The list of primary key to use for the query
  124. *
  125. * @return CcStreamSettingQuery The current query, for fluid interface
  126. */
  127. public function filterByPrimaryKeys($keys)
  128. {
  129. return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $keys, Criteria::IN);
  130. }
  131. /**
  132. * Filter the query on the keyname column
  133. *
  134. * @param string $dbKeyName The value to use as filter.
  135. * Accepts wildcards (* and % trigger a LIKE)
  136. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  137. *
  138. * @return CcStreamSettingQuery The current query, for fluid interface
  139. */
  140. public function filterByDbKeyName($dbKeyName = null, $comparison = null)
  141. {
  142. if (null === $comparison) {
  143. if (is_array($dbKeyName)) {
  144. $comparison = Criteria::IN;
  145. } elseif (preg_match('/[\%\*]/', $dbKeyName)) {
  146. $dbKeyName = str_replace('*', '%', $dbKeyName);
  147. $comparison = Criteria::LIKE;
  148. }
  149. }
  150. return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $dbKeyName, $comparison);
  151. }
  152. /**
  153. * Filter the query on the value column
  154. *
  155. * @param string $dbValue The value to use as filter.
  156. * Accepts wildcards (* and % trigger a LIKE)
  157. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  158. *
  159. * @return CcStreamSettingQuery The current query, for fluid interface
  160. */
  161. public function filterByDbValue($dbValue = null, $comparison = null)
  162. {
  163. if (null === $comparison) {
  164. if (is_array($dbValue)) {
  165. $comparison = Criteria::IN;
  166. } elseif (preg_match('/[\%\*]/', $dbValue)) {
  167. $dbValue = str_replace('*', '%', $dbValue);
  168. $comparison = Criteria::LIKE;
  169. }
  170. }
  171. return $this->addUsingAlias(CcStreamSettingPeer::VALUE, $dbValue, $comparison);
  172. }
  173. /**
  174. * Filter the query on the type column
  175. *
  176. * @param string $dbType The value to use as filter.
  177. * Accepts wildcards (* and % trigger a LIKE)
  178. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  179. *
  180. * @return CcStreamSettingQuery The current query, for fluid interface
  181. */
  182. public function filterByDbType($dbType = null, $comparison = null)
  183. {
  184. if (null === $comparison) {
  185. if (is_array($dbType)) {
  186. $comparison = Criteria::IN;
  187. } elseif (preg_match('/[\%\*]/', $dbType)) {
  188. $dbType = str_replace('*', '%', $dbType);
  189. $comparison = Criteria::LIKE;
  190. }
  191. }
  192. return $this->addUsingAlias(CcStreamSettingPeer::TYPE, $dbType, $comparison);
  193. }
  194. /**
  195. * Exclude object from result
  196. *
  197. * @param CcStreamSetting $ccStreamSetting Object to remove from the list of results
  198. *
  199. * @return CcStreamSettingQuery The current query, for fluid interface
  200. */
  201. public function prune($ccStreamSetting = null)
  202. {
  203. if ($ccStreamSetting) {
  204. $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $ccStreamSetting->getDbKeyName(), Criteria::NOT_EQUAL);
  205. }
  206. return $this;
  207. }
  208. } // BaseCcStreamSettingQuery