1: <?php
2:
3: namespace cli_db\propel\om;
4:
5: use \Criteria;
6: use \Exception;
7: use \ModelCriteria;
8: use \ModelJoin;
9: use \PDO;
10: use \Propel;
11: use \PropelCollection;
12: use \PropelException;
13: use \PropelObjectCollection;
14: use \PropelPDO;
15: use cli_db\propel\Acquisition;
16: use cli_db\propel\Analysis;
17: use cli_db\propel\Contact;
18: use cli_db\propel\Protocol;
19: use cli_db\propel\Quantification;
20: use cli_db\propel\QuantificationPeer;
21: use cli_db\propel\QuantificationQuery;
22:
23: /**
24: * Base class that represents a query for the 'quantification' table.
25: *
26: *
27: *
28: * @method QuantificationQuery orderByQuantificationId($order = Criteria::ASC) Order by the quantification_id column
29: * @method QuantificationQuery orderByAcquisitionId($order = Criteria::ASC) Order by the acquisition_id column
30: * @method QuantificationQuery orderByOperatorId($order = Criteria::ASC) Order by the operator_id column
31: * @method QuantificationQuery orderByProtocolId($order = Criteria::ASC) Order by the protocol_id column
32: * @method QuantificationQuery orderByAnalysisId($order = Criteria::ASC) Order by the analysis_id column
33: * @method QuantificationQuery orderByQuantificationdate($order = Criteria::ASC) Order by the quantificationdate column
34: * @method QuantificationQuery orderByName($order = Criteria::ASC) Order by the name column
35: * @method QuantificationQuery orderByUri($order = Criteria::ASC) Order by the uri column
36: *
37: * @method QuantificationQuery groupByQuantificationId() Group by the quantification_id column
38: * @method QuantificationQuery groupByAcquisitionId() Group by the acquisition_id column
39: * @method QuantificationQuery groupByOperatorId() Group by the operator_id column
40: * @method QuantificationQuery groupByProtocolId() Group by the protocol_id column
41: * @method QuantificationQuery groupByAnalysisId() Group by the analysis_id column
42: * @method QuantificationQuery groupByQuantificationdate() Group by the quantificationdate column
43: * @method QuantificationQuery groupByName() Group by the name column
44: * @method QuantificationQuery groupByUri() Group by the uri column
45: *
46: * @method QuantificationQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
47: * @method QuantificationQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
48: * @method QuantificationQuery innerJoin($relation) Adds a INNER JOIN clause to the query
49: *
50: * @method QuantificationQuery leftJoinAcquisition($relationAlias = null) Adds a LEFT JOIN clause to the query using the Acquisition relation
51: * @method QuantificationQuery rightJoinAcquisition($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Acquisition relation
52: * @method QuantificationQuery innerJoinAcquisition($relationAlias = null) Adds a INNER JOIN clause to the query using the Acquisition relation
53: *
54: * @method QuantificationQuery leftJoinAnalysis($relationAlias = null) Adds a LEFT JOIN clause to the query using the Analysis relation
55: * @method QuantificationQuery rightJoinAnalysis($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Analysis relation
56: * @method QuantificationQuery innerJoinAnalysis($relationAlias = null) Adds a INNER JOIN clause to the query using the Analysis relation
57: *
58: * @method QuantificationQuery leftJoinContact($relationAlias = null) Adds a LEFT JOIN clause to the query using the Contact relation
59: * @method QuantificationQuery rightJoinContact($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Contact relation
60: * @method QuantificationQuery innerJoinContact($relationAlias = null) Adds a INNER JOIN clause to the query using the Contact relation
61: *
62: * @method QuantificationQuery leftJoinProtocol($relationAlias = null) Adds a LEFT JOIN clause to the query using the Protocol relation
63: * @method QuantificationQuery rightJoinProtocol($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Protocol relation
64: * @method QuantificationQuery innerJoinProtocol($relationAlias = null) Adds a INNER JOIN clause to the query using the Protocol relation
65: *
66: * @method Quantification findOne(PropelPDO $con = null) Return the first Quantification matching the query
67: * @method Quantification findOneOrCreate(PropelPDO $con = null) Return the first Quantification matching the query, or a new Quantification object populated from the query conditions when no match is found
68: *
69: * @method Quantification findOneByAcquisitionId(int $acquisition_id) Return the first Quantification filtered by the acquisition_id column
70: * @method Quantification findOneByOperatorId(int $operator_id) Return the first Quantification filtered by the operator_id column
71: * @method Quantification findOneByProtocolId(int $protocol_id) Return the first Quantification filtered by the protocol_id column
72: * @method Quantification findOneByAnalysisId(int $analysis_id) Return the first Quantification filtered by the analysis_id column
73: * @method Quantification findOneByQuantificationdate(string $quantificationdate) Return the first Quantification filtered by the quantificationdate column
74: * @method Quantification findOneByName(string $name) Return the first Quantification filtered by the name column
75: * @method Quantification findOneByUri(string $uri) Return the first Quantification filtered by the uri column
76: *
77: * @method array findByQuantificationId(int $quantification_id) Return Quantification objects filtered by the quantification_id column
78: * @method array findByAcquisitionId(int $acquisition_id) Return Quantification objects filtered by the acquisition_id column
79: * @method array findByOperatorId(int $operator_id) Return Quantification objects filtered by the operator_id column
80: * @method array findByProtocolId(int $protocol_id) Return Quantification objects filtered by the protocol_id column
81: * @method array findByAnalysisId(int $analysis_id) Return Quantification objects filtered by the analysis_id column
82: * @method array findByQuantificationdate(string $quantificationdate) Return Quantification objects filtered by the quantificationdate column
83: * @method array findByName(string $name) Return Quantification objects filtered by the name column
84: * @method array findByUri(string $uri) Return Quantification objects filtered by the uri column
85: *
86: * @package propel.generator.cli_db.om
87: */
88: abstract class BaseQuantificationQuery extends ModelCriteria
89: {
90: /**
91: * Initializes internal state of BaseQuantificationQuery object.
92: *
93: * @param string $dbName The dabase name
94: * @param string $modelName The phpName of a model, e.g. 'Book'
95: * @param string $modelAlias The alias for the model in this query, e.g. 'b'
96: */
97: public function __construct($dbName = 'cli_db', $modelName = 'cli_db\\propel\\Quantification', $modelAlias = null)
98: {
99: parent::__construct($dbName, $modelName, $modelAlias);
100: }
101:
102: /**
103: * Returns a new QuantificationQuery object.
104: *
105: * @param string $modelAlias The alias of a model in the query
106: * @param QuantificationQuery|Criteria $criteria Optional Criteria to build the query from
107: *
108: * @return QuantificationQuery
109: */
110: public static function create($modelAlias = null, $criteria = null)
111: {
112: if ($criteria instanceof QuantificationQuery) {
113: return $criteria;
114: }
115: $query = new QuantificationQuery();
116: if (null !== $modelAlias) {
117: $query->setModelAlias($modelAlias);
118: }
119: if ($criteria instanceof Criteria) {
120: $query->mergeWith($criteria);
121: }
122:
123: return $query;
124: }
125:
126: /**
127: * Find object by primary key.
128: * Propel uses the instance pool to skip the database if the object exists.
129: * Go fast if the query is untouched.
130: *
131: * <code>
132: * $obj = $c->findPk(12, $con);
133: * </code>
134: *
135: * @param mixed $key Primary key to use for the query
136: * @param PropelPDO $con an optional connection object
137: *
138: * @return Quantification|Quantification[]|mixed the result, formatted by the current formatter
139: */
140: public function findPk($key, $con = null)
141: {
142: if ($key === null) {
143: return null;
144: }
145: if ((null !== ($obj = QuantificationPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
146: // the object is alredy in the instance pool
147: return $obj;
148: }
149: if ($con === null) {
150: $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
151: }
152: $this->basePreSelect($con);
153: if ($this->formatter || $this->modelAlias || $this->with || $this->select
154: || $this->selectColumns || $this->asColumns || $this->selectModifiers
155: || $this->map || $this->having || $this->joins) {
156: return $this->findPkComplex($key, $con);
157: } else {
158: return $this->findPkSimple($key, $con);
159: }
160: }
161:
162: /**
163: * Alias of findPk to use instance pooling
164: *
165: * @param mixed $key Primary key to use for the query
166: * @param PropelPDO $con A connection object
167: *
168: * @return Quantification A model object, or null if the key is not found
169: * @throws PropelException
170: */
171: public function findOneByQuantificationId($key, $con = null)
172: {
173: return $this->findPk($key, $con);
174: }
175:
176: /**
177: * Find object by primary key using raw SQL to go fast.
178: * Bypass doSelect() and the object formatter by using generated code.
179: *
180: * @param mixed $key Primary key to use for the query
181: * @param PropelPDO $con A connection object
182: *
183: * @return Quantification A model object, or null if the key is not found
184: * @throws PropelException
185: */
186: protected function findPkSimple($key, $con)
187: {
188: $sql = 'SELECT "quantification_id", "acquisition_id", "operator_id", "protocol_id", "analysis_id", "quantificationdate", "name", "uri" FROM "quantification" WHERE "quantification_id" = :p0';
189: try {
190: $stmt = $con->prepare($sql);
191: $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
192: $stmt->execute();
193: } catch (Exception $e) {
194: Propel::log($e->getMessage(), Propel::LOG_ERR);
195: throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
196: }
197: $obj = null;
198: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
199: $obj = new Quantification();
200: $obj->hydrate($row);
201: QuantificationPeer::addInstanceToPool($obj, (string) $key);
202: }
203: $stmt->closeCursor();
204:
205: return $obj;
206: }
207:
208: /**
209: * Find object by primary key.
210: *
211: * @param mixed $key Primary key to use for the query
212: * @param PropelPDO $con A connection object
213: *
214: * @return Quantification|Quantification[]|mixed the result, formatted by the current formatter
215: */
216: protected function findPkComplex($key, $con)
217: {
218: // As the query uses a PK condition, no limit(1) is necessary.
219: $criteria = $this->isKeepQuery() ? clone $this : $this;
220: $stmt = $criteria
221: ->filterByPrimaryKey($key)
222: ->doSelect($con);
223:
224: return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
225: }
226:
227: /**
228: * Find objects by primary key
229: * <code>
230: * $objs = $c->findPks(array(12, 56, 832), $con);
231: * </code>
232: * @param array $keys Primary keys to use for the query
233: * @param PropelPDO $con an optional connection object
234: *
235: * @return PropelObjectCollection|Quantification[]|mixed the list of results, formatted by the current formatter
236: */
237: public function findPks($keys, $con = null)
238: {
239: if ($con === null) {
240: $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
241: }
242: $this->basePreSelect($con);
243: $criteria = $this->isKeepQuery() ? clone $this : $this;
244: $stmt = $criteria
245: ->filterByPrimaryKeys($keys)
246: ->doSelect($con);
247:
248: return $criteria->getFormatter()->init($criteria)->format($stmt);
249: }
250:
251: /**
252: * Filter the query by primary key
253: *
254: * @param mixed $key Primary key to use for the query
255: *
256: * @return QuantificationQuery The current query, for fluid interface
257: */
258: public function filterByPrimaryKey($key)
259: {
260:
261: return $this->addUsingAlias(QuantificationPeer::QUANTIFICATION_ID, $key, Criteria::EQUAL);
262: }
263:
264: /**
265: * Filter the query by a list of primary keys
266: *
267: * @param array $keys The list of primary key to use for the query
268: *
269: * @return QuantificationQuery The current query, for fluid interface
270: */
271: public function filterByPrimaryKeys($keys)
272: {
273:
274: return $this->addUsingAlias(QuantificationPeer::QUANTIFICATION_ID, $keys, Criteria::IN);
275: }
276:
277: /**
278: * Filter the query on the quantification_id column
279: *
280: * Example usage:
281: * <code>
282: * $query->filterByQuantificationId(1234); // WHERE quantification_id = 1234
283: * $query->filterByQuantificationId(array(12, 34)); // WHERE quantification_id IN (12, 34)
284: * $query->filterByQuantificationId(array('min' => 12)); // WHERE quantification_id >= 12
285: * $query->filterByQuantificationId(array('max' => 12)); // WHERE quantification_id <= 12
286: * </code>
287: *
288: * @param mixed $quantificationId The value to use as filter.
289: * Use scalar values for equality.
290: * Use array values for in_array() equivalent.
291: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
292: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
293: *
294: * @return QuantificationQuery The current query, for fluid interface
295: */
296: public function filterByQuantificationId($quantificationId = null, $comparison = null)
297: {
298: if (is_array($quantificationId)) {
299: $useMinMax = false;
300: if (isset($quantificationId['min'])) {
301: $this->addUsingAlias(QuantificationPeer::QUANTIFICATION_ID, $quantificationId['min'], Criteria::GREATER_EQUAL);
302: $useMinMax = true;
303: }
304: if (isset($quantificationId['max'])) {
305: $this->addUsingAlias(QuantificationPeer::QUANTIFICATION_ID, $quantificationId['max'], Criteria::LESS_EQUAL);
306: $useMinMax = true;
307: }
308: if ($useMinMax) {
309: return $this;
310: }
311: if (null === $comparison) {
312: $comparison = Criteria::IN;
313: }
314: }
315:
316: return $this->addUsingAlias(QuantificationPeer::QUANTIFICATION_ID, $quantificationId, $comparison);
317: }
318:
319: /**
320: * Filter the query on the acquisition_id column
321: *
322: * Example usage:
323: * <code>
324: * $query->filterByAcquisitionId(1234); // WHERE acquisition_id = 1234
325: * $query->filterByAcquisitionId(array(12, 34)); // WHERE acquisition_id IN (12, 34)
326: * $query->filterByAcquisitionId(array('min' => 12)); // WHERE acquisition_id >= 12
327: * $query->filterByAcquisitionId(array('max' => 12)); // WHERE acquisition_id <= 12
328: * </code>
329: *
330: * @see filterByAcquisition()
331: *
332: * @param mixed $acquisitionId The value to use as filter.
333: * Use scalar values for equality.
334: * Use array values for in_array() equivalent.
335: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
336: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
337: *
338: * @return QuantificationQuery The current query, for fluid interface
339: */
340: public function filterByAcquisitionId($acquisitionId = null, $comparison = null)
341: {
342: if (is_array($acquisitionId)) {
343: $useMinMax = false;
344: if (isset($acquisitionId['min'])) {
345: $this->addUsingAlias(QuantificationPeer::ACQUISITION_ID, $acquisitionId['min'], Criteria::GREATER_EQUAL);
346: $useMinMax = true;
347: }
348: if (isset($acquisitionId['max'])) {
349: $this->addUsingAlias(QuantificationPeer::ACQUISITION_ID, $acquisitionId['max'], Criteria::LESS_EQUAL);
350: $useMinMax = true;
351: }
352: if ($useMinMax) {
353: return $this;
354: }
355: if (null === $comparison) {
356: $comparison = Criteria::IN;
357: }
358: }
359:
360: return $this->addUsingAlias(QuantificationPeer::ACQUISITION_ID, $acquisitionId, $comparison);
361: }
362:
363: /**
364: * Filter the query on the operator_id column
365: *
366: * Example usage:
367: * <code>
368: * $query->filterByOperatorId(1234); // WHERE operator_id = 1234
369: * $query->filterByOperatorId(array(12, 34)); // WHERE operator_id IN (12, 34)
370: * $query->filterByOperatorId(array('min' => 12)); // WHERE operator_id >= 12
371: * $query->filterByOperatorId(array('max' => 12)); // WHERE operator_id <= 12
372: * </code>
373: *
374: * @see filterByContact()
375: *
376: * @param mixed $operatorId The value to use as filter.
377: * Use scalar values for equality.
378: * Use array values for in_array() equivalent.
379: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
380: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
381: *
382: * @return QuantificationQuery The current query, for fluid interface
383: */
384: public function filterByOperatorId($operatorId = null, $comparison = null)
385: {
386: if (is_array($operatorId)) {
387: $useMinMax = false;
388: if (isset($operatorId['min'])) {
389: $this->addUsingAlias(QuantificationPeer::OPERATOR_ID, $operatorId['min'], Criteria::GREATER_EQUAL);
390: $useMinMax = true;
391: }
392: if (isset($operatorId['max'])) {
393: $this->addUsingAlias(QuantificationPeer::OPERATOR_ID, $operatorId['max'], Criteria::LESS_EQUAL);
394: $useMinMax = true;
395: }
396: if ($useMinMax) {
397: return $this;
398: }
399: if (null === $comparison) {
400: $comparison = Criteria::IN;
401: }
402: }
403:
404: return $this->addUsingAlias(QuantificationPeer::OPERATOR_ID, $operatorId, $comparison);
405: }
406:
407: /**
408: * Filter the query on the protocol_id column
409: *
410: * Example usage:
411: * <code>
412: * $query->filterByProtocolId(1234); // WHERE protocol_id = 1234
413: * $query->filterByProtocolId(array(12, 34)); // WHERE protocol_id IN (12, 34)
414: * $query->filterByProtocolId(array('min' => 12)); // WHERE protocol_id >= 12
415: * $query->filterByProtocolId(array('max' => 12)); // WHERE protocol_id <= 12
416: * </code>
417: *
418: * @see filterByProtocol()
419: *
420: * @param mixed $protocolId The value to use as filter.
421: * Use scalar values for equality.
422: * Use array values for in_array() equivalent.
423: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
424: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
425: *
426: * @return QuantificationQuery The current query, for fluid interface
427: */
428: public function filterByProtocolId($protocolId = null, $comparison = null)
429: {
430: if (is_array($protocolId)) {
431: $useMinMax = false;
432: if (isset($protocolId['min'])) {
433: $this->addUsingAlias(QuantificationPeer::PROTOCOL_ID, $protocolId['min'], Criteria::GREATER_EQUAL);
434: $useMinMax = true;
435: }
436: if (isset($protocolId['max'])) {
437: $this->addUsingAlias(QuantificationPeer::PROTOCOL_ID, $protocolId['max'], Criteria::LESS_EQUAL);
438: $useMinMax = true;
439: }
440: if ($useMinMax) {
441: return $this;
442: }
443: if (null === $comparison) {
444: $comparison = Criteria::IN;
445: }
446: }
447:
448: return $this->addUsingAlias(QuantificationPeer::PROTOCOL_ID, $protocolId, $comparison);
449: }
450:
451: /**
452: * Filter the query on the analysis_id column
453: *
454: * Example usage:
455: * <code>
456: * $query->filterByAnalysisId(1234); // WHERE analysis_id = 1234
457: * $query->filterByAnalysisId(array(12, 34)); // WHERE analysis_id IN (12, 34)
458: * $query->filterByAnalysisId(array('min' => 12)); // WHERE analysis_id >= 12
459: * $query->filterByAnalysisId(array('max' => 12)); // WHERE analysis_id <= 12
460: * </code>
461: *
462: * @see filterByAnalysis()
463: *
464: * @param mixed $analysisId The value to use as filter.
465: * Use scalar values for equality.
466: * Use array values for in_array() equivalent.
467: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
468: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
469: *
470: * @return QuantificationQuery The current query, for fluid interface
471: */
472: public function filterByAnalysisId($analysisId = null, $comparison = null)
473: {
474: if (is_array($analysisId)) {
475: $useMinMax = false;
476: if (isset($analysisId['min'])) {
477: $this->addUsingAlias(QuantificationPeer::ANALYSIS_ID, $analysisId['min'], Criteria::GREATER_EQUAL);
478: $useMinMax = true;
479: }
480: if (isset($analysisId['max'])) {
481: $this->addUsingAlias(QuantificationPeer::ANALYSIS_ID, $analysisId['max'], Criteria::LESS_EQUAL);
482: $useMinMax = true;
483: }
484: if ($useMinMax) {
485: return $this;
486: }
487: if (null === $comparison) {
488: $comparison = Criteria::IN;
489: }
490: }
491:
492: return $this->addUsingAlias(QuantificationPeer::ANALYSIS_ID, $analysisId, $comparison);
493: }
494:
495: /**
496: * Filter the query on the quantificationdate column
497: *
498: * Example usage:
499: * <code>
500: * $query->filterByQuantificationdate('2011-03-14'); // WHERE quantificationdate = '2011-03-14'
501: * $query->filterByQuantificationdate('now'); // WHERE quantificationdate = '2011-03-14'
502: * $query->filterByQuantificationdate(array('max' => 'yesterday')); // WHERE quantificationdate > '2011-03-13'
503: * </code>
504: *
505: * @param mixed $quantificationdate The value to use as filter.
506: * Values can be integers (unix timestamps), DateTime objects, or strings.
507: * Empty strings are treated as NULL.
508: * Use scalar values for equality.
509: * Use array values for in_array() equivalent.
510: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
511: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
512: *
513: * @return QuantificationQuery The current query, for fluid interface
514: */
515: public function filterByQuantificationdate($quantificationdate = null, $comparison = null)
516: {
517: if (is_array($quantificationdate)) {
518: $useMinMax = false;
519: if (isset($quantificationdate['min'])) {
520: $this->addUsingAlias(QuantificationPeer::QUANTIFICATIONDATE, $quantificationdate['min'], Criteria::GREATER_EQUAL);
521: $useMinMax = true;
522: }
523: if (isset($quantificationdate['max'])) {
524: $this->addUsingAlias(QuantificationPeer::QUANTIFICATIONDATE, $quantificationdate['max'], Criteria::LESS_EQUAL);
525: $useMinMax = true;
526: }
527: if ($useMinMax) {
528: return $this;
529: }
530: if (null === $comparison) {
531: $comparison = Criteria::IN;
532: }
533: }
534:
535: return $this->addUsingAlias(QuantificationPeer::QUANTIFICATIONDATE, $quantificationdate, $comparison);
536: }
537:
538: /**
539: * Filter the query on the name column
540: *
541: * Example usage:
542: * <code>
543: * $query->filterByName('fooValue'); // WHERE name = 'fooValue'
544: * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%'
545: * </code>
546: *
547: * @param string $name The value to use as filter.
548: * Accepts wildcards (* and % trigger a LIKE)
549: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
550: *
551: * @return QuantificationQuery The current query, for fluid interface
552: */
553: public function filterByName($name = null, $comparison = null)
554: {
555: if (null === $comparison) {
556: if (is_array($name)) {
557: $comparison = Criteria::IN;
558: } elseif (preg_match('/[\%\*]/', $name)) {
559: $name = str_replace('*', '%', $name);
560: $comparison = Criteria::LIKE;
561: }
562: }
563:
564: return $this->addUsingAlias(QuantificationPeer::NAME, $name, $comparison);
565: }
566:
567: /**
568: * Filter the query on the uri column
569: *
570: * Example usage:
571: * <code>
572: * $query->filterByUri('fooValue'); // WHERE uri = 'fooValue'
573: * $query->filterByUri('%fooValue%'); // WHERE uri LIKE '%fooValue%'
574: * </code>
575: *
576: * @param string $uri The value to use as filter.
577: * Accepts wildcards (* and % trigger a LIKE)
578: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
579: *
580: * @return QuantificationQuery The current query, for fluid interface
581: */
582: public function filterByUri($uri = null, $comparison = null)
583: {
584: if (null === $comparison) {
585: if (is_array($uri)) {
586: $comparison = Criteria::IN;
587: } elseif (preg_match('/[\%\*]/', $uri)) {
588: $uri = str_replace('*', '%', $uri);
589: $comparison = Criteria::LIKE;
590: }
591: }
592:
593: return $this->addUsingAlias(QuantificationPeer::URI, $uri, $comparison);
594: }
595:
596: /**
597: * Filter the query by a related Acquisition object
598: *
599: * @param Acquisition|PropelObjectCollection $acquisition The related object(s) to use as filter
600: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
601: *
602: * @return QuantificationQuery The current query, for fluid interface
603: * @throws PropelException - if the provided filter is invalid.
604: */
605: public function filterByAcquisition($acquisition, $comparison = null)
606: {
607: if ($acquisition instanceof Acquisition) {
608: return $this
609: ->addUsingAlias(QuantificationPeer::ACQUISITION_ID, $acquisition->getAcquisitionId(), $comparison);
610: } elseif ($acquisition instanceof PropelObjectCollection) {
611: if (null === $comparison) {
612: $comparison = Criteria::IN;
613: }
614:
615: return $this
616: ->addUsingAlias(QuantificationPeer::ACQUISITION_ID, $acquisition->toKeyValue('PrimaryKey', 'AcquisitionId'), $comparison);
617: } else {
618: throw new PropelException('filterByAcquisition() only accepts arguments of type Acquisition or PropelCollection');
619: }
620: }
621:
622: /**
623: * Adds a JOIN clause to the query using the Acquisition relation
624: *
625: * @param string $relationAlias optional alias for the relation
626: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
627: *
628: * @return QuantificationQuery The current query, for fluid interface
629: */
630: public function joinAcquisition($relationAlias = null, $joinType = Criteria::INNER_JOIN)
631: {
632: $tableMap = $this->getTableMap();
633: $relationMap = $tableMap->getRelation('Acquisition');
634:
635: // create a ModelJoin object for this join
636: $join = new ModelJoin();
637: $join->setJoinType($joinType);
638: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
639: if ($previousJoin = $this->getPreviousJoin()) {
640: $join->setPreviousJoin($previousJoin);
641: }
642:
643: // add the ModelJoin to the current object
644: if ($relationAlias) {
645: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
646: $this->addJoinObject($join, $relationAlias);
647: } else {
648: $this->addJoinObject($join, 'Acquisition');
649: }
650:
651: return $this;
652: }
653:
654: /**
655: * Use the Acquisition relation Acquisition object
656: *
657: * @see useQuery()
658: *
659: * @param string $relationAlias optional alias for the relation,
660: * to be used as main alias in the secondary query
661: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
662: *
663: * @return \cli_db\propel\AcquisitionQuery A secondary query class using the current class as primary query
664: */
665: public function useAcquisitionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
666: {
667: return $this
668: ->joinAcquisition($relationAlias, $joinType)
669: ->useQuery($relationAlias ? $relationAlias : 'Acquisition', '\cli_db\propel\AcquisitionQuery');
670: }
671:
672: /**
673: * Filter the query by a related Analysis object
674: *
675: * @param Analysis|PropelObjectCollection $analysis The related object(s) to use as filter
676: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
677: *
678: * @return QuantificationQuery The current query, for fluid interface
679: * @throws PropelException - if the provided filter is invalid.
680: */
681: public function filterByAnalysis($analysis, $comparison = null)
682: {
683: if ($analysis instanceof Analysis) {
684: return $this
685: ->addUsingAlias(QuantificationPeer::ANALYSIS_ID, $analysis->getAnalysisId(), $comparison);
686: } elseif ($analysis instanceof PropelObjectCollection) {
687: if (null === $comparison) {
688: $comparison = Criteria::IN;
689: }
690:
691: return $this
692: ->addUsingAlias(QuantificationPeer::ANALYSIS_ID, $analysis->toKeyValue('PrimaryKey', 'AnalysisId'), $comparison);
693: } else {
694: throw new PropelException('filterByAnalysis() only accepts arguments of type Analysis or PropelCollection');
695: }
696: }
697:
698: /**
699: * Adds a JOIN clause to the query using the Analysis relation
700: *
701: * @param string $relationAlias optional alias for the relation
702: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
703: *
704: * @return QuantificationQuery The current query, for fluid interface
705: */
706: public function joinAnalysis($relationAlias = null, $joinType = Criteria::INNER_JOIN)
707: {
708: $tableMap = $this->getTableMap();
709: $relationMap = $tableMap->getRelation('Analysis');
710:
711: // create a ModelJoin object for this join
712: $join = new ModelJoin();
713: $join->setJoinType($joinType);
714: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
715: if ($previousJoin = $this->getPreviousJoin()) {
716: $join->setPreviousJoin($previousJoin);
717: }
718:
719: // add the ModelJoin to the current object
720: if ($relationAlias) {
721: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
722: $this->addJoinObject($join, $relationAlias);
723: } else {
724: $this->addJoinObject($join, 'Analysis');
725: }
726:
727: return $this;
728: }
729:
730: /**
731: * Use the Analysis relation Analysis object
732: *
733: * @see useQuery()
734: *
735: * @param string $relationAlias optional alias for the relation,
736: * to be used as main alias in the secondary query
737: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
738: *
739: * @return \cli_db\propel\AnalysisQuery A secondary query class using the current class as primary query
740: */
741: public function useAnalysisQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
742: {
743: return $this
744: ->joinAnalysis($relationAlias, $joinType)
745: ->useQuery($relationAlias ? $relationAlias : 'Analysis', '\cli_db\propel\AnalysisQuery');
746: }
747:
748: /**
749: * Filter the query by a related Contact object
750: *
751: * @param Contact|PropelObjectCollection $contact The related object(s) to use as filter
752: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
753: *
754: * @return QuantificationQuery The current query, for fluid interface
755: * @throws PropelException - if the provided filter is invalid.
756: */
757: public function filterByContact($contact, $comparison = null)
758: {
759: if ($contact instanceof Contact) {
760: return $this
761: ->addUsingAlias(QuantificationPeer::OPERATOR_ID, $contact->getContactId(), $comparison);
762: } elseif ($contact instanceof PropelObjectCollection) {
763: if (null === $comparison) {
764: $comparison = Criteria::IN;
765: }
766:
767: return $this
768: ->addUsingAlias(QuantificationPeer::OPERATOR_ID, $contact->toKeyValue('PrimaryKey', 'ContactId'), $comparison);
769: } else {
770: throw new PropelException('filterByContact() only accepts arguments of type Contact or PropelCollection');
771: }
772: }
773:
774: /**
775: * Adds a JOIN clause to the query using the Contact relation
776: *
777: * @param string $relationAlias optional alias for the relation
778: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
779: *
780: * @return QuantificationQuery The current query, for fluid interface
781: */
782: public function joinContact($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
783: {
784: $tableMap = $this->getTableMap();
785: $relationMap = $tableMap->getRelation('Contact');
786:
787: // create a ModelJoin object for this join
788: $join = new ModelJoin();
789: $join->setJoinType($joinType);
790: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
791: if ($previousJoin = $this->getPreviousJoin()) {
792: $join->setPreviousJoin($previousJoin);
793: }
794:
795: // add the ModelJoin to the current object
796: if ($relationAlias) {
797: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
798: $this->addJoinObject($join, $relationAlias);
799: } else {
800: $this->addJoinObject($join, 'Contact');
801: }
802:
803: return $this;
804: }
805:
806: /**
807: * Use the Contact relation Contact object
808: *
809: * @see useQuery()
810: *
811: * @param string $relationAlias optional alias for the relation,
812: * to be used as main alias in the secondary query
813: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
814: *
815: * @return \cli_db\propel\ContactQuery A secondary query class using the current class as primary query
816: */
817: public function useContactQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
818: {
819: return $this
820: ->joinContact($relationAlias, $joinType)
821: ->useQuery($relationAlias ? $relationAlias : 'Contact', '\cli_db\propel\ContactQuery');
822: }
823:
824: /**
825: * Filter the query by a related Protocol object
826: *
827: * @param Protocol|PropelObjectCollection $protocol The related object(s) to use as filter
828: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
829: *
830: * @return QuantificationQuery The current query, for fluid interface
831: * @throws PropelException - if the provided filter is invalid.
832: */
833: public function filterByProtocol($protocol, $comparison = null)
834: {
835: if ($protocol instanceof Protocol) {
836: return $this
837: ->addUsingAlias(QuantificationPeer::PROTOCOL_ID, $protocol->getProtocolId(), $comparison);
838: } elseif ($protocol instanceof PropelObjectCollection) {
839: if (null === $comparison) {
840: $comparison = Criteria::IN;
841: }
842:
843: return $this
844: ->addUsingAlias(QuantificationPeer::PROTOCOL_ID, $protocol->toKeyValue('PrimaryKey', 'ProtocolId'), $comparison);
845: } else {
846: throw new PropelException('filterByProtocol() only accepts arguments of type Protocol or PropelCollection');
847: }
848: }
849:
850: /**
851: * Adds a JOIN clause to the query using the Protocol relation
852: *
853: * @param string $relationAlias optional alias for the relation
854: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
855: *
856: * @return QuantificationQuery The current query, for fluid interface
857: */
858: public function joinProtocol($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
859: {
860: $tableMap = $this->getTableMap();
861: $relationMap = $tableMap->getRelation('Protocol');
862:
863: // create a ModelJoin object for this join
864: $join = new ModelJoin();
865: $join->setJoinType($joinType);
866: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
867: if ($previousJoin = $this->getPreviousJoin()) {
868: $join->setPreviousJoin($previousJoin);
869: }
870:
871: // add the ModelJoin to the current object
872: if ($relationAlias) {
873: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
874: $this->addJoinObject($join, $relationAlias);
875: } else {
876: $this->addJoinObject($join, 'Protocol');
877: }
878:
879: return $this;
880: }
881:
882: /**
883: * Use the Protocol relation Protocol object
884: *
885: * @see useQuery()
886: *
887: * @param string $relationAlias optional alias for the relation,
888: * to be used as main alias in the secondary query
889: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
890: *
891: * @return \cli_db\propel\ProtocolQuery A secondary query class using the current class as primary query
892: */
893: public function useProtocolQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
894: {
895: return $this
896: ->joinProtocol($relationAlias, $joinType)
897: ->useQuery($relationAlias ? $relationAlias : 'Protocol', '\cli_db\propel\ProtocolQuery');
898: }
899:
900: /**
901: * Exclude object from result
902: *
903: * @param Quantification $quantification Object to remove from the list of results
904: *
905: * @return QuantificationQuery The current query, for fluid interface
906: */
907: public function prune($quantification = null)
908: {
909: if ($quantification) {
910: $this->addUsingAlias(QuantificationPeer::QUANTIFICATION_ID, $quantification->getQuantificationId(), Criteria::NOT_EQUAL);
911: }
912:
913: return $this;
914: }
915:
916: }
917: