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\Assay;
16: use cli_db\propel\AssayBiomaterial;
17: use cli_db\propel\AssayBiomaterialPeer;
18: use cli_db\propel\AssayBiomaterialQuery;
19: use cli_db\propel\Biomaterial;
20:
21: /**
22: * Base class that represents a query for the 'assay_biomaterial' table.
23: *
24: *
25: *
26: * @method AssayBiomaterialQuery orderByAssayBiomaterialId($order = Criteria::ASC) Order by the assay_biomaterial_id column
27: * @method AssayBiomaterialQuery orderByAssayId($order = Criteria::ASC) Order by the assay_id column
28: * @method AssayBiomaterialQuery orderByBiomaterialId($order = Criteria::ASC) Order by the biomaterial_id column
29: * @method AssayBiomaterialQuery orderByChannelId($order = Criteria::ASC) Order by the channel_id column
30: * @method AssayBiomaterialQuery orderByRank($order = Criteria::ASC) Order by the rank column
31: *
32: * @method AssayBiomaterialQuery groupByAssayBiomaterialId() Group by the assay_biomaterial_id column
33: * @method AssayBiomaterialQuery groupByAssayId() Group by the assay_id column
34: * @method AssayBiomaterialQuery groupByBiomaterialId() Group by the biomaterial_id column
35: * @method AssayBiomaterialQuery groupByChannelId() Group by the channel_id column
36: * @method AssayBiomaterialQuery groupByRank() Group by the rank column
37: *
38: * @method AssayBiomaterialQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
39: * @method AssayBiomaterialQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
40: * @method AssayBiomaterialQuery innerJoin($relation) Adds a INNER JOIN clause to the query
41: *
42: * @method AssayBiomaterialQuery leftJoinAssay($relationAlias = null) Adds a LEFT JOIN clause to the query using the Assay relation
43: * @method AssayBiomaterialQuery rightJoinAssay($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Assay relation
44: * @method AssayBiomaterialQuery innerJoinAssay($relationAlias = null) Adds a INNER JOIN clause to the query using the Assay relation
45: *
46: * @method AssayBiomaterialQuery leftJoinBiomaterial($relationAlias = null) Adds a LEFT JOIN clause to the query using the Biomaterial relation
47: * @method AssayBiomaterialQuery rightJoinBiomaterial($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Biomaterial relation
48: * @method AssayBiomaterialQuery innerJoinBiomaterial($relationAlias = null) Adds a INNER JOIN clause to the query using the Biomaterial relation
49: *
50: * @method AssayBiomaterial findOne(PropelPDO $con = null) Return the first AssayBiomaterial matching the query
51: * @method AssayBiomaterial findOneOrCreate(PropelPDO $con = null) Return the first AssayBiomaterial matching the query, or a new AssayBiomaterial object populated from the query conditions when no match is found
52: *
53: * @method AssayBiomaterial findOneByAssayId(int $assay_id) Return the first AssayBiomaterial filtered by the assay_id column
54: * @method AssayBiomaterial findOneByBiomaterialId(int $biomaterial_id) Return the first AssayBiomaterial filtered by the biomaterial_id column
55: * @method AssayBiomaterial findOneByChannelId(int $channel_id) Return the first AssayBiomaterial filtered by the channel_id column
56: * @method AssayBiomaterial findOneByRank(int $rank) Return the first AssayBiomaterial filtered by the rank column
57: *
58: * @method array findByAssayBiomaterialId(int $assay_biomaterial_id) Return AssayBiomaterial objects filtered by the assay_biomaterial_id column
59: * @method array findByAssayId(int $assay_id) Return AssayBiomaterial objects filtered by the assay_id column
60: * @method array findByBiomaterialId(int $biomaterial_id) Return AssayBiomaterial objects filtered by the biomaterial_id column
61: * @method array findByChannelId(int $channel_id) Return AssayBiomaterial objects filtered by the channel_id column
62: * @method array findByRank(int $rank) Return AssayBiomaterial objects filtered by the rank column
63: *
64: * @package propel.generator.cli_db.om
65: */
66: abstract class BaseAssayBiomaterialQuery extends ModelCriteria
67: {
68: /**
69: * Initializes internal state of BaseAssayBiomaterialQuery object.
70: *
71: * @param string $dbName The dabase name
72: * @param string $modelName The phpName of a model, e.g. 'Book'
73: * @param string $modelAlias The alias for the model in this query, e.g. 'b'
74: */
75: public function __construct($dbName = 'cli_db', $modelName = 'cli_db\\propel\\AssayBiomaterial', $modelAlias = null)
76: {
77: parent::__construct($dbName, $modelName, $modelAlias);
78: }
79:
80: /**
81: * Returns a new AssayBiomaterialQuery object.
82: *
83: * @param string $modelAlias The alias of a model in the query
84: * @param AssayBiomaterialQuery|Criteria $criteria Optional Criteria to build the query from
85: *
86: * @return AssayBiomaterialQuery
87: */
88: public static function create($modelAlias = null, $criteria = null)
89: {
90: if ($criteria instanceof AssayBiomaterialQuery) {
91: return $criteria;
92: }
93: $query = new AssayBiomaterialQuery();
94: if (null !== $modelAlias) {
95: $query->setModelAlias($modelAlias);
96: }
97: if ($criteria instanceof Criteria) {
98: $query->mergeWith($criteria);
99: }
100:
101: return $query;
102: }
103:
104: /**
105: * Find object by primary key.
106: * Propel uses the instance pool to skip the database if the object exists.
107: * Go fast if the query is untouched.
108: *
109: * <code>
110: * $obj = $c->findPk(12, $con);
111: * </code>
112: *
113: * @param mixed $key Primary key to use for the query
114: * @param PropelPDO $con an optional connection object
115: *
116: * @return AssayBiomaterial|AssayBiomaterial[]|mixed the result, formatted by the current formatter
117: */
118: public function findPk($key, $con = null)
119: {
120: if ($key === null) {
121: return null;
122: }
123: if ((null !== ($obj = AssayBiomaterialPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
124: // the object is alredy in the instance pool
125: return $obj;
126: }
127: if ($con === null) {
128: $con = Propel::getConnection(AssayBiomaterialPeer::DATABASE_NAME, Propel::CONNECTION_READ);
129: }
130: $this->basePreSelect($con);
131: if ($this->formatter || $this->modelAlias || $this->with || $this->select
132: || $this->selectColumns || $this->asColumns || $this->selectModifiers
133: || $this->map || $this->having || $this->joins) {
134: return $this->findPkComplex($key, $con);
135: } else {
136: return $this->findPkSimple($key, $con);
137: }
138: }
139:
140: /**
141: * Alias of findPk to use instance pooling
142: *
143: * @param mixed $key Primary key to use for the query
144: * @param PropelPDO $con A connection object
145: *
146: * @return AssayBiomaterial A model object, or null if the key is not found
147: * @throws PropelException
148: */
149: public function findOneByAssayBiomaterialId($key, $con = null)
150: {
151: return $this->findPk($key, $con);
152: }
153:
154: /**
155: * Find object by primary key using raw SQL to go fast.
156: * Bypass doSelect() and the object formatter by using generated code.
157: *
158: * @param mixed $key Primary key to use for the query
159: * @param PropelPDO $con A connection object
160: *
161: * @return AssayBiomaterial A model object, or null if the key is not found
162: * @throws PropelException
163: */
164: protected function findPkSimple($key, $con)
165: {
166: $sql = 'SELECT "assay_biomaterial_id", "assay_id", "biomaterial_id", "channel_id", "rank" FROM "assay_biomaterial" WHERE "assay_biomaterial_id" = :p0';
167: try {
168: $stmt = $con->prepare($sql);
169: $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
170: $stmt->execute();
171: } catch (Exception $e) {
172: Propel::log($e->getMessage(), Propel::LOG_ERR);
173: throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
174: }
175: $obj = null;
176: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
177: $obj = new AssayBiomaterial();
178: $obj->hydrate($row);
179: AssayBiomaterialPeer::addInstanceToPool($obj, (string) $key);
180: }
181: $stmt->closeCursor();
182:
183: return $obj;
184: }
185:
186: /**
187: * Find object by primary key.
188: *
189: * @param mixed $key Primary key to use for the query
190: * @param PropelPDO $con A connection object
191: *
192: * @return AssayBiomaterial|AssayBiomaterial[]|mixed the result, formatted by the current formatter
193: */
194: protected function findPkComplex($key, $con)
195: {
196: // As the query uses a PK condition, no limit(1) is necessary.
197: $criteria = $this->isKeepQuery() ? clone $this : $this;
198: $stmt = $criteria
199: ->filterByPrimaryKey($key)
200: ->doSelect($con);
201:
202: return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
203: }
204:
205: /**
206: * Find objects by primary key
207: * <code>
208: * $objs = $c->findPks(array(12, 56, 832), $con);
209: * </code>
210: * @param array $keys Primary keys to use for the query
211: * @param PropelPDO $con an optional connection object
212: *
213: * @return PropelObjectCollection|AssayBiomaterial[]|mixed the list of results, formatted by the current formatter
214: */
215: public function findPks($keys, $con = null)
216: {
217: if ($con === null) {
218: $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
219: }
220: $this->basePreSelect($con);
221: $criteria = $this->isKeepQuery() ? clone $this : $this;
222: $stmt = $criteria
223: ->filterByPrimaryKeys($keys)
224: ->doSelect($con);
225:
226: return $criteria->getFormatter()->init($criteria)->format($stmt);
227: }
228:
229: /**
230: * Filter the query by primary key
231: *
232: * @param mixed $key Primary key to use for the query
233: *
234: * @return AssayBiomaterialQuery The current query, for fluid interface
235: */
236: public function filterByPrimaryKey($key)
237: {
238:
239: return $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_BIOMATERIAL_ID, $key, Criteria::EQUAL);
240: }
241:
242: /**
243: * Filter the query by a list of primary keys
244: *
245: * @param array $keys The list of primary key to use for the query
246: *
247: * @return AssayBiomaterialQuery The current query, for fluid interface
248: */
249: public function filterByPrimaryKeys($keys)
250: {
251:
252: return $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_BIOMATERIAL_ID, $keys, Criteria::IN);
253: }
254:
255: /**
256: * Filter the query on the assay_biomaterial_id column
257: *
258: * Example usage:
259: * <code>
260: * $query->filterByAssayBiomaterialId(1234); // WHERE assay_biomaterial_id = 1234
261: * $query->filterByAssayBiomaterialId(array(12, 34)); // WHERE assay_biomaterial_id IN (12, 34)
262: * $query->filterByAssayBiomaterialId(array('min' => 12)); // WHERE assay_biomaterial_id >= 12
263: * $query->filterByAssayBiomaterialId(array('max' => 12)); // WHERE assay_biomaterial_id <= 12
264: * </code>
265: *
266: * @param mixed $assayBiomaterialId The value to use as filter.
267: * Use scalar values for equality.
268: * Use array values for in_array() equivalent.
269: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
270: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
271: *
272: * @return AssayBiomaterialQuery The current query, for fluid interface
273: */
274: public function filterByAssayBiomaterialId($assayBiomaterialId = null, $comparison = null)
275: {
276: if (is_array($assayBiomaterialId)) {
277: $useMinMax = false;
278: if (isset($assayBiomaterialId['min'])) {
279: $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_BIOMATERIAL_ID, $assayBiomaterialId['min'], Criteria::GREATER_EQUAL);
280: $useMinMax = true;
281: }
282: if (isset($assayBiomaterialId['max'])) {
283: $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_BIOMATERIAL_ID, $assayBiomaterialId['max'], Criteria::LESS_EQUAL);
284: $useMinMax = true;
285: }
286: if ($useMinMax) {
287: return $this;
288: }
289: if (null === $comparison) {
290: $comparison = Criteria::IN;
291: }
292: }
293:
294: return $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_BIOMATERIAL_ID, $assayBiomaterialId, $comparison);
295: }
296:
297: /**
298: * Filter the query on the assay_id column
299: *
300: * Example usage:
301: * <code>
302: * $query->filterByAssayId(1234); // WHERE assay_id = 1234
303: * $query->filterByAssayId(array(12, 34)); // WHERE assay_id IN (12, 34)
304: * $query->filterByAssayId(array('min' => 12)); // WHERE assay_id >= 12
305: * $query->filterByAssayId(array('max' => 12)); // WHERE assay_id <= 12
306: * </code>
307: *
308: * @see filterByAssay()
309: *
310: * @param mixed $assayId The value to use as filter.
311: * Use scalar values for equality.
312: * Use array values for in_array() equivalent.
313: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
314: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
315: *
316: * @return AssayBiomaterialQuery The current query, for fluid interface
317: */
318: public function filterByAssayId($assayId = null, $comparison = null)
319: {
320: if (is_array($assayId)) {
321: $useMinMax = false;
322: if (isset($assayId['min'])) {
323: $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_ID, $assayId['min'], Criteria::GREATER_EQUAL);
324: $useMinMax = true;
325: }
326: if (isset($assayId['max'])) {
327: $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_ID, $assayId['max'], Criteria::LESS_EQUAL);
328: $useMinMax = true;
329: }
330: if ($useMinMax) {
331: return $this;
332: }
333: if (null === $comparison) {
334: $comparison = Criteria::IN;
335: }
336: }
337:
338: return $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_ID, $assayId, $comparison);
339: }
340:
341: /**
342: * Filter the query on the biomaterial_id column
343: *
344: * Example usage:
345: * <code>
346: * $query->filterByBiomaterialId(1234); // WHERE biomaterial_id = 1234
347: * $query->filterByBiomaterialId(array(12, 34)); // WHERE biomaterial_id IN (12, 34)
348: * $query->filterByBiomaterialId(array('min' => 12)); // WHERE biomaterial_id >= 12
349: * $query->filterByBiomaterialId(array('max' => 12)); // WHERE biomaterial_id <= 12
350: * </code>
351: *
352: * @see filterByBiomaterial()
353: *
354: * @param mixed $biomaterialId The value to use as filter.
355: * Use scalar values for equality.
356: * Use array values for in_array() equivalent.
357: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
358: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
359: *
360: * @return AssayBiomaterialQuery The current query, for fluid interface
361: */
362: public function filterByBiomaterialId($biomaterialId = null, $comparison = null)
363: {
364: if (is_array($biomaterialId)) {
365: $useMinMax = false;
366: if (isset($biomaterialId['min'])) {
367: $this->addUsingAlias(AssayBiomaterialPeer::BIOMATERIAL_ID, $biomaterialId['min'], Criteria::GREATER_EQUAL);
368: $useMinMax = true;
369: }
370: if (isset($biomaterialId['max'])) {
371: $this->addUsingAlias(AssayBiomaterialPeer::BIOMATERIAL_ID, $biomaterialId['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:
382: return $this->addUsingAlias(AssayBiomaterialPeer::BIOMATERIAL_ID, $biomaterialId, $comparison);
383: }
384:
385: /**
386: * Filter the query on the channel_id column
387: *
388: * Example usage:
389: * <code>
390: * $query->filterByChannelId(1234); // WHERE channel_id = 1234
391: * $query->filterByChannelId(array(12, 34)); // WHERE channel_id IN (12, 34)
392: * $query->filterByChannelId(array('min' => 12)); // WHERE channel_id >= 12
393: * $query->filterByChannelId(array('max' => 12)); // WHERE channel_id <= 12
394: * </code>
395: *
396: * @param mixed $channelId The value to use as filter.
397: * Use scalar values for equality.
398: * Use array values for in_array() equivalent.
399: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
400: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
401: *
402: * @return AssayBiomaterialQuery The current query, for fluid interface
403: */
404: public function filterByChannelId($channelId = null, $comparison = null)
405: {
406: if (is_array($channelId)) {
407: $useMinMax = false;
408: if (isset($channelId['min'])) {
409: $this->addUsingAlias(AssayBiomaterialPeer::CHANNEL_ID, $channelId['min'], Criteria::GREATER_EQUAL);
410: $useMinMax = true;
411: }
412: if (isset($channelId['max'])) {
413: $this->addUsingAlias(AssayBiomaterialPeer::CHANNEL_ID, $channelId['max'], Criteria::LESS_EQUAL);
414: $useMinMax = true;
415: }
416: if ($useMinMax) {
417: return $this;
418: }
419: if (null === $comparison) {
420: $comparison = Criteria::IN;
421: }
422: }
423:
424: return $this->addUsingAlias(AssayBiomaterialPeer::CHANNEL_ID, $channelId, $comparison);
425: }
426:
427: /**
428: * Filter the query on the rank column
429: *
430: * Example usage:
431: * <code>
432: * $query->filterByRank(1234); // WHERE rank = 1234
433: * $query->filterByRank(array(12, 34)); // WHERE rank IN (12, 34)
434: * $query->filterByRank(array('min' => 12)); // WHERE rank >= 12
435: * $query->filterByRank(array('max' => 12)); // WHERE rank <= 12
436: * </code>
437: *
438: * @param mixed $rank The value to use as filter.
439: * Use scalar values for equality.
440: * Use array values for in_array() equivalent.
441: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
442: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
443: *
444: * @return AssayBiomaterialQuery The current query, for fluid interface
445: */
446: public function filterByRank($rank = null, $comparison = null)
447: {
448: if (is_array($rank)) {
449: $useMinMax = false;
450: if (isset($rank['min'])) {
451: $this->addUsingAlias(AssayBiomaterialPeer::RANK, $rank['min'], Criteria::GREATER_EQUAL);
452: $useMinMax = true;
453: }
454: if (isset($rank['max'])) {
455: $this->addUsingAlias(AssayBiomaterialPeer::RANK, $rank['max'], Criteria::LESS_EQUAL);
456: $useMinMax = true;
457: }
458: if ($useMinMax) {
459: return $this;
460: }
461: if (null === $comparison) {
462: $comparison = Criteria::IN;
463: }
464: }
465:
466: return $this->addUsingAlias(AssayBiomaterialPeer::RANK, $rank, $comparison);
467: }
468:
469: /**
470: * Filter the query by a related Assay object
471: *
472: * @param Assay|PropelObjectCollection $assay The related object(s) to use as filter
473: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
474: *
475: * @return AssayBiomaterialQuery The current query, for fluid interface
476: * @throws PropelException - if the provided filter is invalid.
477: */
478: public function filterByAssay($assay, $comparison = null)
479: {
480: if ($assay instanceof Assay) {
481: return $this
482: ->addUsingAlias(AssayBiomaterialPeer::ASSAY_ID, $assay->getAssayId(), $comparison);
483: } elseif ($assay instanceof PropelObjectCollection) {
484: if (null === $comparison) {
485: $comparison = Criteria::IN;
486: }
487:
488: return $this
489: ->addUsingAlias(AssayBiomaterialPeer::ASSAY_ID, $assay->toKeyValue('PrimaryKey', 'AssayId'), $comparison);
490: } else {
491: throw new PropelException('filterByAssay() only accepts arguments of type Assay or PropelCollection');
492: }
493: }
494:
495: /**
496: * Adds a JOIN clause to the query using the Assay relation
497: *
498: * @param string $relationAlias optional alias for the relation
499: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
500: *
501: * @return AssayBiomaterialQuery The current query, for fluid interface
502: */
503: public function joinAssay($relationAlias = null, $joinType = Criteria::INNER_JOIN)
504: {
505: $tableMap = $this->getTableMap();
506: $relationMap = $tableMap->getRelation('Assay');
507:
508: // create a ModelJoin object for this join
509: $join = new ModelJoin();
510: $join->setJoinType($joinType);
511: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
512: if ($previousJoin = $this->getPreviousJoin()) {
513: $join->setPreviousJoin($previousJoin);
514: }
515:
516: // add the ModelJoin to the current object
517: if ($relationAlias) {
518: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
519: $this->addJoinObject($join, $relationAlias);
520: } else {
521: $this->addJoinObject($join, 'Assay');
522: }
523:
524: return $this;
525: }
526:
527: /**
528: * Use the Assay relation Assay object
529: *
530: * @see useQuery()
531: *
532: * @param string $relationAlias optional alias for the relation,
533: * to be used as main alias in the secondary query
534: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
535: *
536: * @return \cli_db\propel\AssayQuery A secondary query class using the current class as primary query
537: */
538: public function useAssayQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
539: {
540: return $this
541: ->joinAssay($relationAlias, $joinType)
542: ->useQuery($relationAlias ? $relationAlias : 'Assay', '\cli_db\propel\AssayQuery');
543: }
544:
545: /**
546: * Filter the query by a related Biomaterial object
547: *
548: * @param Biomaterial|PropelObjectCollection $biomaterial The related object(s) to use as filter
549: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
550: *
551: * @return AssayBiomaterialQuery The current query, for fluid interface
552: * @throws PropelException - if the provided filter is invalid.
553: */
554: public function filterByBiomaterial($biomaterial, $comparison = null)
555: {
556: if ($biomaterial instanceof Biomaterial) {
557: return $this
558: ->addUsingAlias(AssayBiomaterialPeer::BIOMATERIAL_ID, $biomaterial->getBiomaterialId(), $comparison);
559: } elseif ($biomaterial instanceof PropelObjectCollection) {
560: if (null === $comparison) {
561: $comparison = Criteria::IN;
562: }
563:
564: return $this
565: ->addUsingAlias(AssayBiomaterialPeer::BIOMATERIAL_ID, $biomaterial->toKeyValue('PrimaryKey', 'BiomaterialId'), $comparison);
566: } else {
567: throw new PropelException('filterByBiomaterial() only accepts arguments of type Biomaterial or PropelCollection');
568: }
569: }
570:
571: /**
572: * Adds a JOIN clause to the query using the Biomaterial relation
573: *
574: * @param string $relationAlias optional alias for the relation
575: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
576: *
577: * @return AssayBiomaterialQuery The current query, for fluid interface
578: */
579: public function joinBiomaterial($relationAlias = null, $joinType = Criteria::INNER_JOIN)
580: {
581: $tableMap = $this->getTableMap();
582: $relationMap = $tableMap->getRelation('Biomaterial');
583:
584: // create a ModelJoin object for this join
585: $join = new ModelJoin();
586: $join->setJoinType($joinType);
587: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
588: if ($previousJoin = $this->getPreviousJoin()) {
589: $join->setPreviousJoin($previousJoin);
590: }
591:
592: // add the ModelJoin to the current object
593: if ($relationAlias) {
594: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
595: $this->addJoinObject($join, $relationAlias);
596: } else {
597: $this->addJoinObject($join, 'Biomaterial');
598: }
599:
600: return $this;
601: }
602:
603: /**
604: * Use the Biomaterial relation Biomaterial object
605: *
606: * @see useQuery()
607: *
608: * @param string $relationAlias optional alias for the relation,
609: * to be used as main alias in the secondary query
610: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
611: *
612: * @return \cli_db\propel\BiomaterialQuery A secondary query class using the current class as primary query
613: */
614: public function useBiomaterialQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
615: {
616: return $this
617: ->joinBiomaterial($relationAlias, $joinType)
618: ->useQuery($relationAlias ? $relationAlias : 'Biomaterial', '\cli_db\propel\BiomaterialQuery');
619: }
620:
621: /**
622: * Exclude object from result
623: *
624: * @param AssayBiomaterial $assayBiomaterial Object to remove from the list of results
625: *
626: * @return AssayBiomaterialQuery The current query, for fluid interface
627: */
628: public function prune($assayBiomaterial = null)
629: {
630: if ($assayBiomaterial) {
631: $this->addUsingAlias(AssayBiomaterialPeer::ASSAY_BIOMATERIAL_ID, $assayBiomaterial->getAssayBiomaterialId(), Criteria::NOT_EQUAL);
632: }
633:
634: return $this;
635: }
636:
637: }
638: