BaseCcSmembQuery.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <?php
  2. /**
  3. * Base class that represents a query for the 'cc_smemb' table.
  4. *
  5. *
  6. *
  7. * @method CcSmembQuery orderById($order = Criteria::ASC) Order by the id column
  8. * @method CcSmembQuery orderByUid($order = Criteria::ASC) Order by the uid column
  9. * @method CcSmembQuery orderByGid($order = Criteria::ASC) Order by the gid column
  10. * @method CcSmembQuery orderByLevel($order = Criteria::ASC) Order by the level column
  11. * @method CcSmembQuery orderByMid($order = Criteria::ASC) Order by the mid column
  12. *
  13. * @method CcSmembQuery groupById() Group by the id column
  14. * @method CcSmembQuery groupByUid() Group by the uid column
  15. * @method CcSmembQuery groupByGid() Group by the gid column
  16. * @method CcSmembQuery groupByLevel() Group by the level column
  17. * @method CcSmembQuery groupByMid() Group by the mid column
  18. *
  19. * @method CcSmembQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
  20. * @method CcSmembQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
  21. * @method CcSmembQuery innerJoin($relation) Adds a INNER JOIN clause to the query
  22. *
  23. * @method CcSmemb findOne(PropelPDO $con = null) Return the first CcSmemb matching the query
  24. * @method CcSmemb findOneOrCreate(PropelPDO $con = null) Return the first CcSmemb matching the query, or a new CcSmemb object populated from the query conditions when no match is found
  25. *
  26. * @method CcSmemb findOneById(int $id) Return the first CcSmemb filtered by the id column
  27. * @method CcSmemb findOneByUid(int $uid) Return the first CcSmemb filtered by the uid column
  28. * @method CcSmemb findOneByGid(int $gid) Return the first CcSmemb filtered by the gid column
  29. * @method CcSmemb findOneByLevel(int $level) Return the first CcSmemb filtered by the level column
  30. * @method CcSmemb findOneByMid(int $mid) Return the first CcSmemb filtered by the mid column
  31. *
  32. * @method array findById(int $id) Return CcSmemb objects filtered by the id column
  33. * @method array findByUid(int $uid) Return CcSmemb objects filtered by the uid column
  34. * @method array findByGid(int $gid) Return CcSmemb objects filtered by the gid column
  35. * @method array findByLevel(int $level) Return CcSmemb objects filtered by the level column
  36. * @method array findByMid(int $mid) Return CcSmemb objects filtered by the mid column
  37. *
  38. * @package propel.generator.airtime.om
  39. */
  40. abstract class BaseCcSmembQuery extends ModelCriteria
  41. {
  42. /**
  43. * Initializes internal state of BaseCcSmembQuery object.
  44. *
  45. * @param string $dbName The dabase name
  46. * @param string $modelName The phpName of a model, e.g. 'Book'
  47. * @param string $modelAlias The alias for the model in this query, e.g. 'b'
  48. */
  49. public function __construct($dbName = 'airtime', $modelName = 'CcSmemb', $modelAlias = null)
  50. {
  51. parent::__construct($dbName, $modelName, $modelAlias);
  52. }
  53. /**
  54. * Returns a new CcSmembQuery object.
  55. *
  56. * @param string $modelAlias The alias of a model in the query
  57. * @param Criteria $criteria Optional Criteria to build the query from
  58. *
  59. * @return CcSmembQuery
  60. */
  61. public static function create($modelAlias = null, $criteria = null)
  62. {
  63. if ($criteria instanceof CcSmembQuery) {
  64. return $criteria;
  65. }
  66. $query = new CcSmembQuery();
  67. if (null !== $modelAlias) {
  68. $query->setModelAlias($modelAlias);
  69. }
  70. if ($criteria instanceof Criteria) {
  71. $query->mergeWith($criteria);
  72. }
  73. return $query;
  74. }
  75. /**
  76. * Find object by primary key
  77. * Use instance pooling to avoid a database query if the object exists
  78. * <code>
  79. * $obj = $c->findPk(12, $con);
  80. * </code>
  81. * @param mixed $key Primary key to use for the query
  82. * @param PropelPDO $con an optional connection object
  83. *
  84. * @return CcSmemb|array|mixed the result, formatted by the current formatter
  85. */
  86. public function findPk($key, $con = null)
  87. {
  88. if ((null !== ($obj = CcSmembPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
  89. // the object is alredy in the instance pool
  90. return $obj;
  91. } else {
  92. // the object has not been requested yet, or the formatter is not an object formatter
  93. $criteria = $this->isKeepQuery() ? clone $this : $this;
  94. $stmt = $criteria
  95. ->filterByPrimaryKey($key)
  96. ->getSelectStatement($con);
  97. return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
  98. }
  99. }
  100. /**
  101. * Find objects by primary key
  102. * <code>
  103. * $objs = $c->findPks(array(12, 56, 832), $con);
  104. * </code>
  105. * @param array $keys Primary keys to use for the query
  106. * @param PropelPDO $con an optional connection object
  107. *
  108. * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
  109. */
  110. public function findPks($keys, $con = null)
  111. {
  112. $criteria = $this->isKeepQuery() ? clone $this : $this;
  113. return $this
  114. ->filterByPrimaryKeys($keys)
  115. ->find($con);
  116. }
  117. /**
  118. * Filter the query by primary key
  119. *
  120. * @param mixed $key Primary key to use for the query
  121. *
  122. * @return CcSmembQuery The current query, for fluid interface
  123. */
  124. public function filterByPrimaryKey($key)
  125. {
  126. return $this->addUsingAlias(CcSmembPeer::ID, $key, Criteria::EQUAL);
  127. }
  128. /**
  129. * Filter the query by a list of primary keys
  130. *
  131. * @param array $keys The list of primary key to use for the query
  132. *
  133. * @return CcSmembQuery The current query, for fluid interface
  134. */
  135. public function filterByPrimaryKeys($keys)
  136. {
  137. return $this->addUsingAlias(CcSmembPeer::ID, $keys, Criteria::IN);
  138. }
  139. /**
  140. * Filter the query on the id column
  141. *
  142. * @param int|array $id The value to use as filter.
  143. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  144. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  145. *
  146. * @return CcSmembQuery The current query, for fluid interface
  147. */
  148. public function filterById($id = null, $comparison = null)
  149. {
  150. if (is_array($id) && null === $comparison) {
  151. $comparison = Criteria::IN;
  152. }
  153. return $this->addUsingAlias(CcSmembPeer::ID, $id, $comparison);
  154. }
  155. /**
  156. * Filter the query on the uid column
  157. *
  158. * @param int|array $uid The value to use as filter.
  159. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  160. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  161. *
  162. * @return CcSmembQuery The current query, for fluid interface
  163. */
  164. public function filterByUid($uid = null, $comparison = null)
  165. {
  166. if (is_array($uid)) {
  167. $useMinMax = false;
  168. if (isset($uid['min'])) {
  169. $this->addUsingAlias(CcSmembPeer::UID, $uid['min'], Criteria::GREATER_EQUAL);
  170. $useMinMax = true;
  171. }
  172. if (isset($uid['max'])) {
  173. $this->addUsingAlias(CcSmembPeer::UID, $uid['max'], Criteria::LESS_EQUAL);
  174. $useMinMax = true;
  175. }
  176. if ($useMinMax) {
  177. return $this;
  178. }
  179. if (null === $comparison) {
  180. $comparison = Criteria::IN;
  181. }
  182. }
  183. return $this->addUsingAlias(CcSmembPeer::UID, $uid, $comparison);
  184. }
  185. /**
  186. * Filter the query on the gid column
  187. *
  188. * @param int|array $gid The value to use as filter.
  189. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  190. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  191. *
  192. * @return CcSmembQuery The current query, for fluid interface
  193. */
  194. public function filterByGid($gid = null, $comparison = null)
  195. {
  196. if (is_array($gid)) {
  197. $useMinMax = false;
  198. if (isset($gid['min'])) {
  199. $this->addUsingAlias(CcSmembPeer::GID, $gid['min'], Criteria::GREATER_EQUAL);
  200. $useMinMax = true;
  201. }
  202. if (isset($gid['max'])) {
  203. $this->addUsingAlias(CcSmembPeer::GID, $gid['max'], Criteria::LESS_EQUAL);
  204. $useMinMax = true;
  205. }
  206. if ($useMinMax) {
  207. return $this;
  208. }
  209. if (null === $comparison) {
  210. $comparison = Criteria::IN;
  211. }
  212. }
  213. return $this->addUsingAlias(CcSmembPeer::GID, $gid, $comparison);
  214. }
  215. /**
  216. * Filter the query on the level column
  217. *
  218. * @param int|array $level The value to use as filter.
  219. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  220. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  221. *
  222. * @return CcSmembQuery The current query, for fluid interface
  223. */
  224. public function filterByLevel($level = null, $comparison = null)
  225. {
  226. if (is_array($level)) {
  227. $useMinMax = false;
  228. if (isset($level['min'])) {
  229. $this->addUsingAlias(CcSmembPeer::LEVEL, $level['min'], Criteria::GREATER_EQUAL);
  230. $useMinMax = true;
  231. }
  232. if (isset($level['max'])) {
  233. $this->addUsingAlias(CcSmembPeer::LEVEL, $level['max'], Criteria::LESS_EQUAL);
  234. $useMinMax = true;
  235. }
  236. if ($useMinMax) {
  237. return $this;
  238. }
  239. if (null === $comparison) {
  240. $comparison = Criteria::IN;
  241. }
  242. }
  243. return $this->addUsingAlias(CcSmembPeer::LEVEL, $level, $comparison);
  244. }
  245. /**
  246. * Filter the query on the mid column
  247. *
  248. * @param int|array $mid The value to use as filter.
  249. * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
  250. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  251. *
  252. * @return CcSmembQuery The current query, for fluid interface
  253. */
  254. public function filterByMid($mid = null, $comparison = null)
  255. {
  256. if (is_array($mid)) {
  257. $useMinMax = false;
  258. if (isset($mid['min'])) {
  259. $this->addUsingAlias(CcSmembPeer::MID, $mid['min'], Criteria::GREATER_EQUAL);
  260. $useMinMax = true;
  261. }
  262. if (isset($mid['max'])) {
  263. $this->addUsingAlias(CcSmembPeer::MID, $mid['max'], Criteria::LESS_EQUAL);
  264. $useMinMax = true;
  265. }
  266. if ($useMinMax) {
  267. return $this;
  268. }
  269. if (null === $comparison) {
  270. $comparison = Criteria::IN;
  271. }
  272. }
  273. return $this->addUsingAlias(CcSmembPeer::MID, $mid, $comparison);
  274. }
  275. /**
  276. * Exclude object from result
  277. *
  278. * @param CcSmemb $ccSmemb Object to remove from the list of results
  279. *
  280. * @return CcSmembQuery The current query, for fluid interface
  281. */
  282. public function prune($ccSmemb = null)
  283. {
  284. if ($ccSmemb) {
  285. $this->addUsingAlias(CcSmembPeer::ID, $ccSmemb->getId(), Criteria::NOT_EQUAL);
  286. }
  287. return $this;
  288. }
  289. } // BaseCcSmembQuery