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\BiomaterialRelationship;
16: use cli_db\propel\Biomaterialprop;
17: use cli_db\propel\Contact;
18: use cli_db\propel\Cv;
19: use cli_db\propel\Cvterm;
20: use cli_db\propel\CvtermPeer;
21: use cli_db\propel\CvtermQuery;
22: use cli_db\propel\Feature;
23: use cli_db\propel\FeatureCvterm;
24: use cli_db\propel\FeatureCvtermprop;
25: use cli_db\propel\Protocol;
26: use cli_db\propel\Pub;
27: use cli_db\propel\PubRelationship;
28: use cli_db\propel\Pubprop;
29: use cli_db\propel\Synonym;
30:
31: /**
32: * Base class that represents a query for the 'cvterm' table.
33: *
34: *
35: *
36: * @method CvtermQuery orderByCvtermId($order = Criteria::ASC) Order by the cvterm_id column
37: * @method CvtermQuery orderByCvId($order = Criteria::ASC) Order by the cv_id column
38: * @method CvtermQuery orderByName($order = Criteria::ASC) Order by the name column
39: * @method CvtermQuery orderByDefinition($order = Criteria::ASC) Order by the definition column
40: * @method CvtermQuery orderByDbxrefId($order = Criteria::ASC) Order by the dbxref_id column
41: * @method CvtermQuery orderByIsObsolete($order = Criteria::ASC) Order by the is_obsolete column
42: * @method CvtermQuery orderByIsRelationshiptype($order = Criteria::ASC) Order by the is_relationshiptype column
43: *
44: * @method CvtermQuery groupByCvtermId() Group by the cvterm_id column
45: * @method CvtermQuery groupByCvId() Group by the cv_id column
46: * @method CvtermQuery groupByName() Group by the name column
47: * @method CvtermQuery groupByDefinition() Group by the definition column
48: * @method CvtermQuery groupByDbxrefId() Group by the dbxref_id column
49: * @method CvtermQuery groupByIsObsolete() Group by the is_obsolete column
50: * @method CvtermQuery groupByIsRelationshiptype() Group by the is_relationshiptype column
51: *
52: * @method CvtermQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
53: * @method CvtermQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
54: * @method CvtermQuery innerJoin($relation) Adds a INNER JOIN clause to the query
55: *
56: * @method CvtermQuery leftJoinCv($relationAlias = null) Adds a LEFT JOIN clause to the query using the Cv relation
57: * @method CvtermQuery rightJoinCv($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Cv relation
58: * @method CvtermQuery innerJoinCv($relationAlias = null) Adds a INNER JOIN clause to the query using the Cv relation
59: *
60: * @method CvtermQuery leftJoinBiomaterialRelationship($relationAlias = null) Adds a LEFT JOIN clause to the query using the BiomaterialRelationship relation
61: * @method CvtermQuery rightJoinBiomaterialRelationship($relationAlias = null) Adds a RIGHT JOIN clause to the query using the BiomaterialRelationship relation
62: * @method CvtermQuery innerJoinBiomaterialRelationship($relationAlias = null) Adds a INNER JOIN clause to the query using the BiomaterialRelationship relation
63: *
64: * @method CvtermQuery leftJoinBiomaterialprop($relationAlias = null) Adds a LEFT JOIN clause to the query using the Biomaterialprop relation
65: * @method CvtermQuery rightJoinBiomaterialprop($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Biomaterialprop relation
66: * @method CvtermQuery innerJoinBiomaterialprop($relationAlias = null) Adds a INNER JOIN clause to the query using the Biomaterialprop relation
67: *
68: * @method CvtermQuery leftJoinContact($relationAlias = null) Adds a LEFT JOIN clause to the query using the Contact relation
69: * @method CvtermQuery rightJoinContact($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Contact relation
70: * @method CvtermQuery innerJoinContact($relationAlias = null) Adds a INNER JOIN clause to the query using the Contact relation
71: *
72: * @method CvtermQuery leftJoinFeature($relationAlias = null) Adds a LEFT JOIN clause to the query using the Feature relation
73: * @method CvtermQuery rightJoinFeature($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Feature relation
74: * @method CvtermQuery innerJoinFeature($relationAlias = null) Adds a INNER JOIN clause to the query using the Feature relation
75: *
76: * @method CvtermQuery leftJoinFeatureCvterm($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureCvterm relation
77: * @method CvtermQuery rightJoinFeatureCvterm($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureCvterm relation
78: * @method CvtermQuery innerJoinFeatureCvterm($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureCvterm relation
79: *
80: * @method CvtermQuery leftJoinFeatureCvtermprop($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureCvtermprop relation
81: * @method CvtermQuery rightJoinFeatureCvtermprop($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureCvtermprop relation
82: * @method CvtermQuery innerJoinFeatureCvtermprop($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureCvtermprop relation
83: *
84: * @method CvtermQuery leftJoinProtocol($relationAlias = null) Adds a LEFT JOIN clause to the query using the Protocol relation
85: * @method CvtermQuery rightJoinProtocol($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Protocol relation
86: * @method CvtermQuery innerJoinProtocol($relationAlias = null) Adds a INNER JOIN clause to the query using the Protocol relation
87: *
88: * @method CvtermQuery leftJoinPub($relationAlias = null) Adds a LEFT JOIN clause to the query using the Pub relation
89: * @method CvtermQuery rightJoinPub($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Pub relation
90: * @method CvtermQuery innerJoinPub($relationAlias = null) Adds a INNER JOIN clause to the query using the Pub relation
91: *
92: * @method CvtermQuery leftJoinPubRelationship($relationAlias = null) Adds a LEFT JOIN clause to the query using the PubRelationship relation
93: * @method CvtermQuery rightJoinPubRelationship($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PubRelationship relation
94: * @method CvtermQuery innerJoinPubRelationship($relationAlias = null) Adds a INNER JOIN clause to the query using the PubRelationship relation
95: *
96: * @method CvtermQuery leftJoinPubprop($relationAlias = null) Adds a LEFT JOIN clause to the query using the Pubprop relation
97: * @method CvtermQuery rightJoinPubprop($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Pubprop relation
98: * @method CvtermQuery innerJoinPubprop($relationAlias = null) Adds a INNER JOIN clause to the query using the Pubprop relation
99: *
100: * @method CvtermQuery leftJoinSynonym($relationAlias = null) Adds a LEFT JOIN clause to the query using the Synonym relation
101: * @method CvtermQuery rightJoinSynonym($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Synonym relation
102: * @method CvtermQuery innerJoinSynonym($relationAlias = null) Adds a INNER JOIN clause to the query using the Synonym relation
103: *
104: * @method Cvterm findOne(PropelPDO $con = null) Return the first Cvterm matching the query
105: * @method Cvterm findOneOrCreate(PropelPDO $con = null) Return the first Cvterm matching the query, or a new Cvterm object populated from the query conditions when no match is found
106: *
107: * @method Cvterm findOneByCvId(int $cv_id) Return the first Cvterm filtered by the cv_id column
108: * @method Cvterm findOneByName(string $name) Return the first Cvterm filtered by the name column
109: * @method Cvterm findOneByDefinition(string $definition) Return the first Cvterm filtered by the definition column
110: * @method Cvterm findOneByDbxrefId(int $dbxref_id) Return the first Cvterm filtered by the dbxref_id column
111: * @method Cvterm findOneByIsObsolete(int $is_obsolete) Return the first Cvterm filtered by the is_obsolete column
112: * @method Cvterm findOneByIsRelationshiptype(int $is_relationshiptype) Return the first Cvterm filtered by the is_relationshiptype column
113: *
114: * @method array findByCvtermId(int $cvterm_id) Return Cvterm objects filtered by the cvterm_id column
115: * @method array findByCvId(int $cv_id) Return Cvterm objects filtered by the cv_id column
116: * @method array findByName(string $name) Return Cvterm objects filtered by the name column
117: * @method array findByDefinition(string $definition) Return Cvterm objects filtered by the definition column
118: * @method array findByDbxrefId(int $dbxref_id) Return Cvterm objects filtered by the dbxref_id column
119: * @method array findByIsObsolete(int $is_obsolete) Return Cvterm objects filtered by the is_obsolete column
120: * @method array findByIsRelationshiptype(int $is_relationshiptype) Return Cvterm objects filtered by the is_relationshiptype column
121: *
122: * @package propel.generator.cli_db.om
123: */
124: abstract class BaseCvtermQuery extends ModelCriteria
125: {
126: /**
127: * Initializes internal state of BaseCvtermQuery object.
128: *
129: * @param string $dbName The dabase name
130: * @param string $modelName The phpName of a model, e.g. 'Book'
131: * @param string $modelAlias The alias for the model in this query, e.g. 'b'
132: */
133: public function __construct($dbName = 'cli_db', $modelName = 'cli_db\\propel\\Cvterm', $modelAlias = null)
134: {
135: parent::__construct($dbName, $modelName, $modelAlias);
136: }
137:
138: /**
139: * Returns a new CvtermQuery object.
140: *
141: * @param string $modelAlias The alias of a model in the query
142: * @param CvtermQuery|Criteria $criteria Optional Criteria to build the query from
143: *
144: * @return CvtermQuery
145: */
146: public static function create($modelAlias = null, $criteria = null)
147: {
148: if ($criteria instanceof CvtermQuery) {
149: return $criteria;
150: }
151: $query = new CvtermQuery();
152: if (null !== $modelAlias) {
153: $query->setModelAlias($modelAlias);
154: }
155: if ($criteria instanceof Criteria) {
156: $query->mergeWith($criteria);
157: }
158:
159: return $query;
160: }
161:
162: /**
163: * Find object by primary key.
164: * Propel uses the instance pool to skip the database if the object exists.
165: * Go fast if the query is untouched.
166: *
167: * <code>
168: * $obj = $c->findPk(12, $con);
169: * </code>
170: *
171: * @param mixed $key Primary key to use for the query
172: * @param PropelPDO $con an optional connection object
173: *
174: * @return Cvterm|Cvterm[]|mixed the result, formatted by the current formatter
175: */
176: public function findPk($key, $con = null)
177: {
178: if ($key === null) {
179: return null;
180: }
181: if ((null !== ($obj = CvtermPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
182: // the object is alredy in the instance pool
183: return $obj;
184: }
185: if ($con === null) {
186: $con = Propel::getConnection(CvtermPeer::DATABASE_NAME, Propel::CONNECTION_READ);
187: }
188: $this->basePreSelect($con);
189: if ($this->formatter || $this->modelAlias || $this->with || $this->select
190: || $this->selectColumns || $this->asColumns || $this->selectModifiers
191: || $this->map || $this->having || $this->joins) {
192: return $this->findPkComplex($key, $con);
193: } else {
194: return $this->findPkSimple($key, $con);
195: }
196: }
197:
198: /**
199: * Alias of findPk to use instance pooling
200: *
201: * @param mixed $key Primary key to use for the query
202: * @param PropelPDO $con A connection object
203: *
204: * @return Cvterm A model object, or null if the key is not found
205: * @throws PropelException
206: */
207: public function findOneByCvtermId($key, $con = null)
208: {
209: return $this->findPk($key, $con);
210: }
211:
212: /**
213: * Find object by primary key using raw SQL to go fast.
214: * Bypass doSelect() and the object formatter by using generated code.
215: *
216: * @param mixed $key Primary key to use for the query
217: * @param PropelPDO $con A connection object
218: *
219: * @return Cvterm A model object, or null if the key is not found
220: * @throws PropelException
221: */
222: protected function findPkSimple($key, $con)
223: {
224: $sql = 'SELECT "cvterm_id", "cv_id", "name", "definition", "dbxref_id", "is_obsolete", "is_relationshiptype" FROM "cvterm" WHERE "cvterm_id" = :p0';
225: try {
226: $stmt = $con->prepare($sql);
227: $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
228: $stmt->execute();
229: } catch (Exception $e) {
230: Propel::log($e->getMessage(), Propel::LOG_ERR);
231: throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
232: }
233: $obj = null;
234: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
235: $obj = new Cvterm();
236: $obj->hydrate($row);
237: CvtermPeer::addInstanceToPool($obj, (string) $key);
238: }
239: $stmt->closeCursor();
240:
241: return $obj;
242: }
243:
244: /**
245: * Find object by primary key.
246: *
247: * @param mixed $key Primary key to use for the query
248: * @param PropelPDO $con A connection object
249: *
250: * @return Cvterm|Cvterm[]|mixed the result, formatted by the current formatter
251: */
252: protected function findPkComplex($key, $con)
253: {
254: // As the query uses a PK condition, no limit(1) is necessary.
255: $criteria = $this->isKeepQuery() ? clone $this : $this;
256: $stmt = $criteria
257: ->filterByPrimaryKey($key)
258: ->doSelect($con);
259:
260: return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
261: }
262:
263: /**
264: * Find objects by primary key
265: * <code>
266: * $objs = $c->findPks(array(12, 56, 832), $con);
267: * </code>
268: * @param array $keys Primary keys to use for the query
269: * @param PropelPDO $con an optional connection object
270: *
271: * @return PropelObjectCollection|Cvterm[]|mixed the list of results, formatted by the current formatter
272: */
273: public function findPks($keys, $con = null)
274: {
275: if ($con === null) {
276: $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
277: }
278: $this->basePreSelect($con);
279: $criteria = $this->isKeepQuery() ? clone $this : $this;
280: $stmt = $criteria
281: ->filterByPrimaryKeys($keys)
282: ->doSelect($con);
283:
284: return $criteria->getFormatter()->init($criteria)->format($stmt);
285: }
286:
287: /**
288: * Filter the query by primary key
289: *
290: * @param mixed $key Primary key to use for the query
291: *
292: * @return CvtermQuery The current query, for fluid interface
293: */
294: public function filterByPrimaryKey($key)
295: {
296:
297: return $this->addUsingAlias(CvtermPeer::CVTERM_ID, $key, Criteria::EQUAL);
298: }
299:
300: /**
301: * Filter the query by a list of primary keys
302: *
303: * @param array $keys The list of primary key to use for the query
304: *
305: * @return CvtermQuery The current query, for fluid interface
306: */
307: public function filterByPrimaryKeys($keys)
308: {
309:
310: return $this->addUsingAlias(CvtermPeer::CVTERM_ID, $keys, Criteria::IN);
311: }
312:
313: /**
314: * Filter the query on the cvterm_id column
315: *
316: * Example usage:
317: * <code>
318: * $query->filterByCvtermId(1234); // WHERE cvterm_id = 1234
319: * $query->filterByCvtermId(array(12, 34)); // WHERE cvterm_id IN (12, 34)
320: * $query->filterByCvtermId(array('min' => 12)); // WHERE cvterm_id >= 12
321: * $query->filterByCvtermId(array('max' => 12)); // WHERE cvterm_id <= 12
322: * </code>
323: *
324: * @param mixed $cvtermId The value to use as filter.
325: * Use scalar values for equality.
326: * Use array values for in_array() equivalent.
327: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
328: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
329: *
330: * @return CvtermQuery The current query, for fluid interface
331: */
332: public function filterByCvtermId($cvtermId = null, $comparison = null)
333: {
334: if (is_array($cvtermId)) {
335: $useMinMax = false;
336: if (isset($cvtermId['min'])) {
337: $this->addUsingAlias(CvtermPeer::CVTERM_ID, $cvtermId['min'], Criteria::GREATER_EQUAL);
338: $useMinMax = true;
339: }
340: if (isset($cvtermId['max'])) {
341: $this->addUsingAlias(CvtermPeer::CVTERM_ID, $cvtermId['max'], Criteria::LESS_EQUAL);
342: $useMinMax = true;
343: }
344: if ($useMinMax) {
345: return $this;
346: }
347: if (null === $comparison) {
348: $comparison = Criteria::IN;
349: }
350: }
351:
352: return $this->addUsingAlias(CvtermPeer::CVTERM_ID, $cvtermId, $comparison);
353: }
354:
355: /**
356: * Filter the query on the cv_id column
357: *
358: * Example usage:
359: * <code>
360: * $query->filterByCvId(1234); // WHERE cv_id = 1234
361: * $query->filterByCvId(array(12, 34)); // WHERE cv_id IN (12, 34)
362: * $query->filterByCvId(array('min' => 12)); // WHERE cv_id >= 12
363: * $query->filterByCvId(array('max' => 12)); // WHERE cv_id <= 12
364: * </code>
365: *
366: * @see filterByCv()
367: *
368: * @param mixed $cvId The value to use as filter.
369: * Use scalar values for equality.
370: * Use array values for in_array() equivalent.
371: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
372: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
373: *
374: * @return CvtermQuery The current query, for fluid interface
375: */
376: public function filterByCvId($cvId = null, $comparison = null)
377: {
378: if (is_array($cvId)) {
379: $useMinMax = false;
380: if (isset($cvId['min'])) {
381: $this->addUsingAlias(CvtermPeer::CV_ID, $cvId['min'], Criteria::GREATER_EQUAL);
382: $useMinMax = true;
383: }
384: if (isset($cvId['max'])) {
385: $this->addUsingAlias(CvtermPeer::CV_ID, $cvId['max'], Criteria::LESS_EQUAL);
386: $useMinMax = true;
387: }
388: if ($useMinMax) {
389: return $this;
390: }
391: if (null === $comparison) {
392: $comparison = Criteria::IN;
393: }
394: }
395:
396: return $this->addUsingAlias(CvtermPeer::CV_ID, $cvId, $comparison);
397: }
398:
399: /**
400: * Filter the query on the name column
401: *
402: * Example usage:
403: * <code>
404: * $query->filterByName('fooValue'); // WHERE name = 'fooValue'
405: * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%'
406: * </code>
407: *
408: * @param string $name The value to use as filter.
409: * Accepts wildcards (* and % trigger a LIKE)
410: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
411: *
412: * @return CvtermQuery The current query, for fluid interface
413: */
414: public function filterByName($name = null, $comparison = null)
415: {
416: if (null === $comparison) {
417: if (is_array($name)) {
418: $comparison = Criteria::IN;
419: } elseif (preg_match('/[\%\*]/', $name)) {
420: $name = str_replace('*', '%', $name);
421: $comparison = Criteria::LIKE;
422: }
423: }
424:
425: return $this->addUsingAlias(CvtermPeer::NAME, $name, $comparison);
426: }
427:
428: /**
429: * Filter the query on the definition column
430: *
431: * Example usage:
432: * <code>
433: * $query->filterByDefinition('fooValue'); // WHERE definition = 'fooValue'
434: * $query->filterByDefinition('%fooValue%'); // WHERE definition LIKE '%fooValue%'
435: * </code>
436: *
437: * @param string $definition The value to use as filter.
438: * Accepts wildcards (* and % trigger a LIKE)
439: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
440: *
441: * @return CvtermQuery The current query, for fluid interface
442: */
443: public function filterByDefinition($definition = null, $comparison = null)
444: {
445: if (null === $comparison) {
446: if (is_array($definition)) {
447: $comparison = Criteria::IN;
448: } elseif (preg_match('/[\%\*]/', $definition)) {
449: $definition = str_replace('*', '%', $definition);
450: $comparison = Criteria::LIKE;
451: }
452: }
453:
454: return $this->addUsingAlias(CvtermPeer::DEFINITION, $definition, $comparison);
455: }
456:
457: /**
458: * Filter the query on the dbxref_id column
459: *
460: * Example usage:
461: * <code>
462: * $query->filterByDbxrefId(1234); // WHERE dbxref_id = 1234
463: * $query->filterByDbxrefId(array(12, 34)); // WHERE dbxref_id IN (12, 34)
464: * $query->filterByDbxrefId(array('min' => 12)); // WHERE dbxref_id >= 12
465: * $query->filterByDbxrefId(array('max' => 12)); // WHERE dbxref_id <= 12
466: * </code>
467: *
468: * @param mixed $dbxrefId The value to use as filter.
469: * Use scalar values for equality.
470: * Use array values for in_array() equivalent.
471: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
472: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
473: *
474: * @return CvtermQuery The current query, for fluid interface
475: */
476: public function filterByDbxrefId($dbxrefId = null, $comparison = null)
477: {
478: if (is_array($dbxrefId)) {
479: $useMinMax = false;
480: if (isset($dbxrefId['min'])) {
481: $this->addUsingAlias(CvtermPeer::DBXREF_ID, $dbxrefId['min'], Criteria::GREATER_EQUAL);
482: $useMinMax = true;
483: }
484: if (isset($dbxrefId['max'])) {
485: $this->addUsingAlias(CvtermPeer::DBXREF_ID, $dbxrefId['max'], Criteria::LESS_EQUAL);
486: $useMinMax = true;
487: }
488: if ($useMinMax) {
489: return $this;
490: }
491: if (null === $comparison) {
492: $comparison = Criteria::IN;
493: }
494: }
495:
496: return $this->addUsingAlias(CvtermPeer::DBXREF_ID, $dbxrefId, $comparison);
497: }
498:
499: /**
500: * Filter the query on the is_obsolete column
501: *
502: * Example usage:
503: * <code>
504: * $query->filterByIsObsolete(1234); // WHERE is_obsolete = 1234
505: * $query->filterByIsObsolete(array(12, 34)); // WHERE is_obsolete IN (12, 34)
506: * $query->filterByIsObsolete(array('min' => 12)); // WHERE is_obsolete >= 12
507: * $query->filterByIsObsolete(array('max' => 12)); // WHERE is_obsolete <= 12
508: * </code>
509: *
510: * @param mixed $isObsolete The value to use as filter.
511: * Use scalar values for equality.
512: * Use array values for in_array() equivalent.
513: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
514: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
515: *
516: * @return CvtermQuery The current query, for fluid interface
517: */
518: public function filterByIsObsolete($isObsolete = null, $comparison = null)
519: {
520: if (is_array($isObsolete)) {
521: $useMinMax = false;
522: if (isset($isObsolete['min'])) {
523: $this->addUsingAlias(CvtermPeer::IS_OBSOLETE, $isObsolete['min'], Criteria::GREATER_EQUAL);
524: $useMinMax = true;
525: }
526: if (isset($isObsolete['max'])) {
527: $this->addUsingAlias(CvtermPeer::IS_OBSOLETE, $isObsolete['max'], Criteria::LESS_EQUAL);
528: $useMinMax = true;
529: }
530: if ($useMinMax) {
531: return $this;
532: }
533: if (null === $comparison) {
534: $comparison = Criteria::IN;
535: }
536: }
537:
538: return $this->addUsingAlias(CvtermPeer::IS_OBSOLETE, $isObsolete, $comparison);
539: }
540:
541: /**
542: * Filter the query on the is_relationshiptype column
543: *
544: * Example usage:
545: * <code>
546: * $query->filterByIsRelationshiptype(1234); // WHERE is_relationshiptype = 1234
547: * $query->filterByIsRelationshiptype(array(12, 34)); // WHERE is_relationshiptype IN (12, 34)
548: * $query->filterByIsRelationshiptype(array('min' => 12)); // WHERE is_relationshiptype >= 12
549: * $query->filterByIsRelationshiptype(array('max' => 12)); // WHERE is_relationshiptype <= 12
550: * </code>
551: *
552: * @param mixed $isRelationshiptype The value to use as filter.
553: * Use scalar values for equality.
554: * Use array values for in_array() equivalent.
555: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
556: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
557: *
558: * @return CvtermQuery The current query, for fluid interface
559: */
560: public function filterByIsRelationshiptype($isRelationshiptype = null, $comparison = null)
561: {
562: if (is_array($isRelationshiptype)) {
563: $useMinMax = false;
564: if (isset($isRelationshiptype['min'])) {
565: $this->addUsingAlias(CvtermPeer::IS_RELATIONSHIPTYPE, $isRelationshiptype['min'], Criteria::GREATER_EQUAL);
566: $useMinMax = true;
567: }
568: if (isset($isRelationshiptype['max'])) {
569: $this->addUsingAlias(CvtermPeer::IS_RELATIONSHIPTYPE, $isRelationshiptype['max'], Criteria::LESS_EQUAL);
570: $useMinMax = true;
571: }
572: if ($useMinMax) {
573: return $this;
574: }
575: if (null === $comparison) {
576: $comparison = Criteria::IN;
577: }
578: }
579:
580: return $this->addUsingAlias(CvtermPeer::IS_RELATIONSHIPTYPE, $isRelationshiptype, $comparison);
581: }
582:
583: /**
584: * Filter the query by a related Cv object
585: *
586: * @param Cv|PropelObjectCollection $cv The related object(s) to use as filter
587: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
588: *
589: * @return CvtermQuery The current query, for fluid interface
590: * @throws PropelException - if the provided filter is invalid.
591: */
592: public function filterByCv($cv, $comparison = null)
593: {
594: if ($cv instanceof Cv) {
595: return $this
596: ->addUsingAlias(CvtermPeer::CV_ID, $cv->getCvId(), $comparison);
597: } elseif ($cv instanceof PropelObjectCollection) {
598: if (null === $comparison) {
599: $comparison = Criteria::IN;
600: }
601:
602: return $this
603: ->addUsingAlias(CvtermPeer::CV_ID, $cv->toKeyValue('PrimaryKey', 'CvId'), $comparison);
604: } else {
605: throw new PropelException('filterByCv() only accepts arguments of type Cv or PropelCollection');
606: }
607: }
608:
609: /**
610: * Adds a JOIN clause to the query using the Cv relation
611: *
612: * @param string $relationAlias optional alias for the relation
613: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
614: *
615: * @return CvtermQuery The current query, for fluid interface
616: */
617: public function joinCv($relationAlias = null, $joinType = Criteria::INNER_JOIN)
618: {
619: $tableMap = $this->getTableMap();
620: $relationMap = $tableMap->getRelation('Cv');
621:
622: // create a ModelJoin object for this join
623: $join = new ModelJoin();
624: $join->setJoinType($joinType);
625: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
626: if ($previousJoin = $this->getPreviousJoin()) {
627: $join->setPreviousJoin($previousJoin);
628: }
629:
630: // add the ModelJoin to the current object
631: if ($relationAlias) {
632: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
633: $this->addJoinObject($join, $relationAlias);
634: } else {
635: $this->addJoinObject($join, 'Cv');
636: }
637:
638: return $this;
639: }
640:
641: /**
642: * Use the Cv relation Cv object
643: *
644: * @see useQuery()
645: *
646: * @param string $relationAlias optional alias for the relation,
647: * to be used as main alias in the secondary query
648: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
649: *
650: * @return \cli_db\propel\CvQuery A secondary query class using the current class as primary query
651: */
652: public function useCvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
653: {
654: return $this
655: ->joinCv($relationAlias, $joinType)
656: ->useQuery($relationAlias ? $relationAlias : 'Cv', '\cli_db\propel\CvQuery');
657: }
658:
659: /**
660: * Filter the query by a related BiomaterialRelationship object
661: *
662: * @param BiomaterialRelationship|PropelObjectCollection $biomaterialRelationship the related object to use as filter
663: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
664: *
665: * @return CvtermQuery The current query, for fluid interface
666: * @throws PropelException - if the provided filter is invalid.
667: */
668: public function filterByBiomaterialRelationship($biomaterialRelationship, $comparison = null)
669: {
670: if ($biomaterialRelationship instanceof BiomaterialRelationship) {
671: return $this
672: ->addUsingAlias(CvtermPeer::CVTERM_ID, $biomaterialRelationship->getTypeId(), $comparison);
673: } elseif ($biomaterialRelationship instanceof PropelObjectCollection) {
674: return $this
675: ->useBiomaterialRelationshipQuery()
676: ->filterByPrimaryKeys($biomaterialRelationship->getPrimaryKeys())
677: ->endUse();
678: } else {
679: throw new PropelException('filterByBiomaterialRelationship() only accepts arguments of type BiomaterialRelationship or PropelCollection');
680: }
681: }
682:
683: /**
684: * Adds a JOIN clause to the query using the BiomaterialRelationship relation
685: *
686: * @param string $relationAlias optional alias for the relation
687: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
688: *
689: * @return CvtermQuery The current query, for fluid interface
690: */
691: public function joinBiomaterialRelationship($relationAlias = null, $joinType = Criteria::INNER_JOIN)
692: {
693: $tableMap = $this->getTableMap();
694: $relationMap = $tableMap->getRelation('BiomaterialRelationship');
695:
696: // create a ModelJoin object for this join
697: $join = new ModelJoin();
698: $join->setJoinType($joinType);
699: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
700: if ($previousJoin = $this->getPreviousJoin()) {
701: $join->setPreviousJoin($previousJoin);
702: }
703:
704: // add the ModelJoin to the current object
705: if ($relationAlias) {
706: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
707: $this->addJoinObject($join, $relationAlias);
708: } else {
709: $this->addJoinObject($join, 'BiomaterialRelationship');
710: }
711:
712: return $this;
713: }
714:
715: /**
716: * Use the BiomaterialRelationship relation BiomaterialRelationship object
717: *
718: * @see useQuery()
719: *
720: * @param string $relationAlias optional alias for the relation,
721: * to be used as main alias in the secondary query
722: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
723: *
724: * @return \cli_db\propel\BiomaterialRelationshipQuery A secondary query class using the current class as primary query
725: */
726: public function useBiomaterialRelationshipQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
727: {
728: return $this
729: ->joinBiomaterialRelationship($relationAlias, $joinType)
730: ->useQuery($relationAlias ? $relationAlias : 'BiomaterialRelationship', '\cli_db\propel\BiomaterialRelationshipQuery');
731: }
732:
733: /**
734: * Filter the query by a related Biomaterialprop object
735: *
736: * @param Biomaterialprop|PropelObjectCollection $biomaterialprop the related object to use as filter
737: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
738: *
739: * @return CvtermQuery The current query, for fluid interface
740: * @throws PropelException - if the provided filter is invalid.
741: */
742: public function filterByBiomaterialprop($biomaterialprop, $comparison = null)
743: {
744: if ($biomaterialprop instanceof Biomaterialprop) {
745: return $this
746: ->addUsingAlias(CvtermPeer::CVTERM_ID, $biomaterialprop->getTypeId(), $comparison);
747: } elseif ($biomaterialprop instanceof PropelObjectCollection) {
748: return $this
749: ->useBiomaterialpropQuery()
750: ->filterByPrimaryKeys($biomaterialprop->getPrimaryKeys())
751: ->endUse();
752: } else {
753: throw new PropelException('filterByBiomaterialprop() only accepts arguments of type Biomaterialprop or PropelCollection');
754: }
755: }
756:
757: /**
758: * Adds a JOIN clause to the query using the Biomaterialprop relation
759: *
760: * @param string $relationAlias optional alias for the relation
761: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
762: *
763: * @return CvtermQuery The current query, for fluid interface
764: */
765: public function joinBiomaterialprop($relationAlias = null, $joinType = Criteria::INNER_JOIN)
766: {
767: $tableMap = $this->getTableMap();
768: $relationMap = $tableMap->getRelation('Biomaterialprop');
769:
770: // create a ModelJoin object for this join
771: $join = new ModelJoin();
772: $join->setJoinType($joinType);
773: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
774: if ($previousJoin = $this->getPreviousJoin()) {
775: $join->setPreviousJoin($previousJoin);
776: }
777:
778: // add the ModelJoin to the current object
779: if ($relationAlias) {
780: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
781: $this->addJoinObject($join, $relationAlias);
782: } else {
783: $this->addJoinObject($join, 'Biomaterialprop');
784: }
785:
786: return $this;
787: }
788:
789: /**
790: * Use the Biomaterialprop relation Biomaterialprop object
791: *
792: * @see useQuery()
793: *
794: * @param string $relationAlias optional alias for the relation,
795: * to be used as main alias in the secondary query
796: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
797: *
798: * @return \cli_db\propel\BiomaterialpropQuery A secondary query class using the current class as primary query
799: */
800: public function useBiomaterialpropQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
801: {
802: return $this
803: ->joinBiomaterialprop($relationAlias, $joinType)
804: ->useQuery($relationAlias ? $relationAlias : 'Biomaterialprop', '\cli_db\propel\BiomaterialpropQuery');
805: }
806:
807: /**
808: * Filter the query by a related Contact object
809: *
810: * @param Contact|PropelObjectCollection $contact the related object to use as filter
811: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
812: *
813: * @return CvtermQuery The current query, for fluid interface
814: * @throws PropelException - if the provided filter is invalid.
815: */
816: public function filterByContact($contact, $comparison = null)
817: {
818: if ($contact instanceof Contact) {
819: return $this
820: ->addUsingAlias(CvtermPeer::CVTERM_ID, $contact->getTypeId(), $comparison);
821: } elseif ($contact instanceof PropelObjectCollection) {
822: return $this
823: ->useContactQuery()
824: ->filterByPrimaryKeys($contact->getPrimaryKeys())
825: ->endUse();
826: } else {
827: throw new PropelException('filterByContact() only accepts arguments of type Contact or PropelCollection');
828: }
829: }
830:
831: /**
832: * Adds a JOIN clause to the query using the Contact relation
833: *
834: * @param string $relationAlias optional alias for the relation
835: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
836: *
837: * @return CvtermQuery The current query, for fluid interface
838: */
839: public function joinContact($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
840: {
841: $tableMap = $this->getTableMap();
842: $relationMap = $tableMap->getRelation('Contact');
843:
844: // create a ModelJoin object for this join
845: $join = new ModelJoin();
846: $join->setJoinType($joinType);
847: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
848: if ($previousJoin = $this->getPreviousJoin()) {
849: $join->setPreviousJoin($previousJoin);
850: }
851:
852: // add the ModelJoin to the current object
853: if ($relationAlias) {
854: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
855: $this->addJoinObject($join, $relationAlias);
856: } else {
857: $this->addJoinObject($join, 'Contact');
858: }
859:
860: return $this;
861: }
862:
863: /**
864: * Use the Contact relation Contact object
865: *
866: * @see useQuery()
867: *
868: * @param string $relationAlias optional alias for the relation,
869: * to be used as main alias in the secondary query
870: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
871: *
872: * @return \cli_db\propel\ContactQuery A secondary query class using the current class as primary query
873: */
874: public function useContactQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
875: {
876: return $this
877: ->joinContact($relationAlias, $joinType)
878: ->useQuery($relationAlias ? $relationAlias : 'Contact', '\cli_db\propel\ContactQuery');
879: }
880:
881: /**
882: * Filter the query by a related Feature object
883: *
884: * @param Feature|PropelObjectCollection $feature the related object to use as filter
885: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
886: *
887: * @return CvtermQuery The current query, for fluid interface
888: * @throws PropelException - if the provided filter is invalid.
889: */
890: public function filterByFeature($feature, $comparison = null)
891: {
892: if ($feature instanceof Feature) {
893: return $this
894: ->addUsingAlias(CvtermPeer::CVTERM_ID, $feature->getTypeId(), $comparison);
895: } elseif ($feature instanceof PropelObjectCollection) {
896: return $this
897: ->useFeatureQuery()
898: ->filterByPrimaryKeys($feature->getPrimaryKeys())
899: ->endUse();
900: } else {
901: throw new PropelException('filterByFeature() only accepts arguments of type Feature or PropelCollection');
902: }
903: }
904:
905: /**
906: * Adds a JOIN clause to the query using the Feature relation
907: *
908: * @param string $relationAlias optional alias for the relation
909: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
910: *
911: * @return CvtermQuery The current query, for fluid interface
912: */
913: public function joinFeature($relationAlias = null, $joinType = Criteria::INNER_JOIN)
914: {
915: $tableMap = $this->getTableMap();
916: $relationMap = $tableMap->getRelation('Feature');
917:
918: // create a ModelJoin object for this join
919: $join = new ModelJoin();
920: $join->setJoinType($joinType);
921: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
922: if ($previousJoin = $this->getPreviousJoin()) {
923: $join->setPreviousJoin($previousJoin);
924: }
925:
926: // add the ModelJoin to the current object
927: if ($relationAlias) {
928: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
929: $this->addJoinObject($join, $relationAlias);
930: } else {
931: $this->addJoinObject($join, 'Feature');
932: }
933:
934: return $this;
935: }
936:
937: /**
938: * Use the Feature relation Feature object
939: *
940: * @see useQuery()
941: *
942: * @param string $relationAlias optional alias for the relation,
943: * to be used as main alias in the secondary query
944: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
945: *
946: * @return \cli_db\propel\FeatureQuery A secondary query class using the current class as primary query
947: */
948: public function useFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
949: {
950: return $this
951: ->joinFeature($relationAlias, $joinType)
952: ->useQuery($relationAlias ? $relationAlias : 'Feature', '\cli_db\propel\FeatureQuery');
953: }
954:
955: /**
956: * Filter the query by a related FeatureCvterm object
957: *
958: * @param FeatureCvterm|PropelObjectCollection $featureCvterm the related object to use as filter
959: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
960: *
961: * @return CvtermQuery The current query, for fluid interface
962: * @throws PropelException - if the provided filter is invalid.
963: */
964: public function filterByFeatureCvterm($featureCvterm, $comparison = null)
965: {
966: if ($featureCvterm instanceof FeatureCvterm) {
967: return $this
968: ->addUsingAlias(CvtermPeer::CVTERM_ID, $featureCvterm->getCvtermId(), $comparison);
969: } elseif ($featureCvterm instanceof PropelObjectCollection) {
970: return $this
971: ->useFeatureCvtermQuery()
972: ->filterByPrimaryKeys($featureCvterm->getPrimaryKeys())
973: ->endUse();
974: } else {
975: throw new PropelException('filterByFeatureCvterm() only accepts arguments of type FeatureCvterm or PropelCollection');
976: }
977: }
978:
979: /**
980: * Adds a JOIN clause to the query using the FeatureCvterm relation
981: *
982: * @param string $relationAlias optional alias for the relation
983: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
984: *
985: * @return CvtermQuery The current query, for fluid interface
986: */
987: public function joinFeatureCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)
988: {
989: $tableMap = $this->getTableMap();
990: $relationMap = $tableMap->getRelation('FeatureCvterm');
991:
992: // create a ModelJoin object for this join
993: $join = new ModelJoin();
994: $join->setJoinType($joinType);
995: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
996: if ($previousJoin = $this->getPreviousJoin()) {
997: $join->setPreviousJoin($previousJoin);
998: }
999:
1000: // add the ModelJoin to the current object
1001: if ($relationAlias) {
1002: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1003: $this->addJoinObject($join, $relationAlias);
1004: } else {
1005: $this->addJoinObject($join, 'FeatureCvterm');
1006: }
1007:
1008: return $this;
1009: }
1010:
1011: /**
1012: * Use the FeatureCvterm relation FeatureCvterm object
1013: *
1014: * @see useQuery()
1015: *
1016: * @param string $relationAlias optional alias for the relation,
1017: * to be used as main alias in the secondary query
1018: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1019: *
1020: * @return \cli_db\propel\FeatureCvtermQuery A secondary query class using the current class as primary query
1021: */
1022: public function useFeatureCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1023: {
1024: return $this
1025: ->joinFeatureCvterm($relationAlias, $joinType)
1026: ->useQuery($relationAlias ? $relationAlias : 'FeatureCvterm', '\cli_db\propel\FeatureCvtermQuery');
1027: }
1028:
1029: /**
1030: * Filter the query by a related FeatureCvtermprop object
1031: *
1032: * @param FeatureCvtermprop|PropelObjectCollection $featureCvtermprop the related object to use as filter
1033: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1034: *
1035: * @return CvtermQuery The current query, for fluid interface
1036: * @throws PropelException - if the provided filter is invalid.
1037: */
1038: public function filterByFeatureCvtermprop($featureCvtermprop, $comparison = null)
1039: {
1040: if ($featureCvtermprop instanceof FeatureCvtermprop) {
1041: return $this
1042: ->addUsingAlias(CvtermPeer::CVTERM_ID, $featureCvtermprop->getTypeId(), $comparison);
1043: } elseif ($featureCvtermprop instanceof PropelObjectCollection) {
1044: return $this
1045: ->useFeatureCvtermpropQuery()
1046: ->filterByPrimaryKeys($featureCvtermprop->getPrimaryKeys())
1047: ->endUse();
1048: } else {
1049: throw new PropelException('filterByFeatureCvtermprop() only accepts arguments of type FeatureCvtermprop or PropelCollection');
1050: }
1051: }
1052:
1053: /**
1054: * Adds a JOIN clause to the query using the FeatureCvtermprop relation
1055: *
1056: * @param string $relationAlias optional alias for the relation
1057: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1058: *
1059: * @return CvtermQuery The current query, for fluid interface
1060: */
1061: public function joinFeatureCvtermprop($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1062: {
1063: $tableMap = $this->getTableMap();
1064: $relationMap = $tableMap->getRelation('FeatureCvtermprop');
1065:
1066: // create a ModelJoin object for this join
1067: $join = new ModelJoin();
1068: $join->setJoinType($joinType);
1069: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1070: if ($previousJoin = $this->getPreviousJoin()) {
1071: $join->setPreviousJoin($previousJoin);
1072: }
1073:
1074: // add the ModelJoin to the current object
1075: if ($relationAlias) {
1076: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1077: $this->addJoinObject($join, $relationAlias);
1078: } else {
1079: $this->addJoinObject($join, 'FeatureCvtermprop');
1080: }
1081:
1082: return $this;
1083: }
1084:
1085: /**
1086: * Use the FeatureCvtermprop relation FeatureCvtermprop object
1087: *
1088: * @see useQuery()
1089: *
1090: * @param string $relationAlias optional alias for the relation,
1091: * to be used as main alias in the secondary query
1092: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1093: *
1094: * @return \cli_db\propel\FeatureCvtermpropQuery A secondary query class using the current class as primary query
1095: */
1096: public function useFeatureCvtermpropQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1097: {
1098: return $this
1099: ->joinFeatureCvtermprop($relationAlias, $joinType)
1100: ->useQuery($relationAlias ? $relationAlias : 'FeatureCvtermprop', '\cli_db\propel\FeatureCvtermpropQuery');
1101: }
1102:
1103: /**
1104: * Filter the query by a related Protocol object
1105: *
1106: * @param Protocol|PropelObjectCollection $protocol the related object to use as filter
1107: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1108: *
1109: * @return CvtermQuery The current query, for fluid interface
1110: * @throws PropelException - if the provided filter is invalid.
1111: */
1112: public function filterByProtocol($protocol, $comparison = null)
1113: {
1114: if ($protocol instanceof Protocol) {
1115: return $this
1116: ->addUsingAlias(CvtermPeer::CVTERM_ID, $protocol->getTypeId(), $comparison);
1117: } elseif ($protocol instanceof PropelObjectCollection) {
1118: return $this
1119: ->useProtocolQuery()
1120: ->filterByPrimaryKeys($protocol->getPrimaryKeys())
1121: ->endUse();
1122: } else {
1123: throw new PropelException('filterByProtocol() only accepts arguments of type Protocol or PropelCollection');
1124: }
1125: }
1126:
1127: /**
1128: * Adds a JOIN clause to the query using the Protocol relation
1129: *
1130: * @param string $relationAlias optional alias for the relation
1131: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1132: *
1133: * @return CvtermQuery The current query, for fluid interface
1134: */
1135: public function joinProtocol($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1136: {
1137: $tableMap = $this->getTableMap();
1138: $relationMap = $tableMap->getRelation('Protocol');
1139:
1140: // create a ModelJoin object for this join
1141: $join = new ModelJoin();
1142: $join->setJoinType($joinType);
1143: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1144: if ($previousJoin = $this->getPreviousJoin()) {
1145: $join->setPreviousJoin($previousJoin);
1146: }
1147:
1148: // add the ModelJoin to the current object
1149: if ($relationAlias) {
1150: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1151: $this->addJoinObject($join, $relationAlias);
1152: } else {
1153: $this->addJoinObject($join, 'Protocol');
1154: }
1155:
1156: return $this;
1157: }
1158:
1159: /**
1160: * Use the Protocol relation Protocol object
1161: *
1162: * @see useQuery()
1163: *
1164: * @param string $relationAlias optional alias for the relation,
1165: * to be used as main alias in the secondary query
1166: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1167: *
1168: * @return \cli_db\propel\ProtocolQuery A secondary query class using the current class as primary query
1169: */
1170: public function useProtocolQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1171: {
1172: return $this
1173: ->joinProtocol($relationAlias, $joinType)
1174: ->useQuery($relationAlias ? $relationAlias : 'Protocol', '\cli_db\propel\ProtocolQuery');
1175: }
1176:
1177: /**
1178: * Filter the query by a related Pub object
1179: *
1180: * @param Pub|PropelObjectCollection $pub the related object to use as filter
1181: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1182: *
1183: * @return CvtermQuery The current query, for fluid interface
1184: * @throws PropelException - if the provided filter is invalid.
1185: */
1186: public function filterByPub($pub, $comparison = null)
1187: {
1188: if ($pub instanceof Pub) {
1189: return $this
1190: ->addUsingAlias(CvtermPeer::CVTERM_ID, $pub->getTypeId(), $comparison);
1191: } elseif ($pub instanceof PropelObjectCollection) {
1192: return $this
1193: ->usePubQuery()
1194: ->filterByPrimaryKeys($pub->getPrimaryKeys())
1195: ->endUse();
1196: } else {
1197: throw new PropelException('filterByPub() only accepts arguments of type Pub or PropelCollection');
1198: }
1199: }
1200:
1201: /**
1202: * Adds a JOIN clause to the query using the Pub relation
1203: *
1204: * @param string $relationAlias optional alias for the relation
1205: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1206: *
1207: * @return CvtermQuery The current query, for fluid interface
1208: */
1209: public function joinPub($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1210: {
1211: $tableMap = $this->getTableMap();
1212: $relationMap = $tableMap->getRelation('Pub');
1213:
1214: // create a ModelJoin object for this join
1215: $join = new ModelJoin();
1216: $join->setJoinType($joinType);
1217: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1218: if ($previousJoin = $this->getPreviousJoin()) {
1219: $join->setPreviousJoin($previousJoin);
1220: }
1221:
1222: // add the ModelJoin to the current object
1223: if ($relationAlias) {
1224: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1225: $this->addJoinObject($join, $relationAlias);
1226: } else {
1227: $this->addJoinObject($join, 'Pub');
1228: }
1229:
1230: return $this;
1231: }
1232:
1233: /**
1234: * Use the Pub relation Pub object
1235: *
1236: * @see useQuery()
1237: *
1238: * @param string $relationAlias optional alias for the relation,
1239: * to be used as main alias in the secondary query
1240: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1241: *
1242: * @return \cli_db\propel\PubQuery A secondary query class using the current class as primary query
1243: */
1244: public function usePubQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1245: {
1246: return $this
1247: ->joinPub($relationAlias, $joinType)
1248: ->useQuery($relationAlias ? $relationAlias : 'Pub', '\cli_db\propel\PubQuery');
1249: }
1250:
1251: /**
1252: * Filter the query by a related PubRelationship object
1253: *
1254: * @param PubRelationship|PropelObjectCollection $pubRelationship the related object to use as filter
1255: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1256: *
1257: * @return CvtermQuery The current query, for fluid interface
1258: * @throws PropelException - if the provided filter is invalid.
1259: */
1260: public function filterByPubRelationship($pubRelationship, $comparison = null)
1261: {
1262: if ($pubRelationship instanceof PubRelationship) {
1263: return $this
1264: ->addUsingAlias(CvtermPeer::CVTERM_ID, $pubRelationship->getTypeId(), $comparison);
1265: } elseif ($pubRelationship instanceof PropelObjectCollection) {
1266: return $this
1267: ->usePubRelationshipQuery()
1268: ->filterByPrimaryKeys($pubRelationship->getPrimaryKeys())
1269: ->endUse();
1270: } else {
1271: throw new PropelException('filterByPubRelationship() only accepts arguments of type PubRelationship or PropelCollection');
1272: }
1273: }
1274:
1275: /**
1276: * Adds a JOIN clause to the query using the PubRelationship relation
1277: *
1278: * @param string $relationAlias optional alias for the relation
1279: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1280: *
1281: * @return CvtermQuery The current query, for fluid interface
1282: */
1283: public function joinPubRelationship($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1284: {
1285: $tableMap = $this->getTableMap();
1286: $relationMap = $tableMap->getRelation('PubRelationship');
1287:
1288: // create a ModelJoin object for this join
1289: $join = new ModelJoin();
1290: $join->setJoinType($joinType);
1291: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1292: if ($previousJoin = $this->getPreviousJoin()) {
1293: $join->setPreviousJoin($previousJoin);
1294: }
1295:
1296: // add the ModelJoin to the current object
1297: if ($relationAlias) {
1298: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1299: $this->addJoinObject($join, $relationAlias);
1300: } else {
1301: $this->addJoinObject($join, 'PubRelationship');
1302: }
1303:
1304: return $this;
1305: }
1306:
1307: /**
1308: * Use the PubRelationship relation PubRelationship object
1309: *
1310: * @see useQuery()
1311: *
1312: * @param string $relationAlias optional alias for the relation,
1313: * to be used as main alias in the secondary query
1314: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1315: *
1316: * @return \cli_db\propel\PubRelationshipQuery A secondary query class using the current class as primary query
1317: */
1318: public function usePubRelationshipQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1319: {
1320: return $this
1321: ->joinPubRelationship($relationAlias, $joinType)
1322: ->useQuery($relationAlias ? $relationAlias : 'PubRelationship', '\cli_db\propel\PubRelationshipQuery');
1323: }
1324:
1325: /**
1326: * Filter the query by a related Pubprop object
1327: *
1328: * @param Pubprop|PropelObjectCollection $pubprop the related object to use as filter
1329: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1330: *
1331: * @return CvtermQuery The current query, for fluid interface
1332: * @throws PropelException - if the provided filter is invalid.
1333: */
1334: public function filterByPubprop($pubprop, $comparison = null)
1335: {
1336: if ($pubprop instanceof Pubprop) {
1337: return $this
1338: ->addUsingAlias(CvtermPeer::CVTERM_ID, $pubprop->getTypeId(), $comparison);
1339: } elseif ($pubprop instanceof PropelObjectCollection) {
1340: return $this
1341: ->usePubpropQuery()
1342: ->filterByPrimaryKeys($pubprop->getPrimaryKeys())
1343: ->endUse();
1344: } else {
1345: throw new PropelException('filterByPubprop() only accepts arguments of type Pubprop or PropelCollection');
1346: }
1347: }
1348:
1349: /**
1350: * Adds a JOIN clause to the query using the Pubprop relation
1351: *
1352: * @param string $relationAlias optional alias for the relation
1353: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1354: *
1355: * @return CvtermQuery The current query, for fluid interface
1356: */
1357: public function joinPubprop($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1358: {
1359: $tableMap = $this->getTableMap();
1360: $relationMap = $tableMap->getRelation('Pubprop');
1361:
1362: // create a ModelJoin object for this join
1363: $join = new ModelJoin();
1364: $join->setJoinType($joinType);
1365: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1366: if ($previousJoin = $this->getPreviousJoin()) {
1367: $join->setPreviousJoin($previousJoin);
1368: }
1369:
1370: // add the ModelJoin to the current object
1371: if ($relationAlias) {
1372: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1373: $this->addJoinObject($join, $relationAlias);
1374: } else {
1375: $this->addJoinObject($join, 'Pubprop');
1376: }
1377:
1378: return $this;
1379: }
1380:
1381: /**
1382: * Use the Pubprop relation Pubprop object
1383: *
1384: * @see useQuery()
1385: *
1386: * @param string $relationAlias optional alias for the relation,
1387: * to be used as main alias in the secondary query
1388: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1389: *
1390: * @return \cli_db\propel\PubpropQuery A secondary query class using the current class as primary query
1391: */
1392: public function usePubpropQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1393: {
1394: return $this
1395: ->joinPubprop($relationAlias, $joinType)
1396: ->useQuery($relationAlias ? $relationAlias : 'Pubprop', '\cli_db\propel\PubpropQuery');
1397: }
1398:
1399: /**
1400: * Filter the query by a related Synonym object
1401: *
1402: * @param Synonym|PropelObjectCollection $synonym the related object to use as filter
1403: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1404: *
1405: * @return CvtermQuery The current query, for fluid interface
1406: * @throws PropelException - if the provided filter is invalid.
1407: */
1408: public function filterBySynonym($synonym, $comparison = null)
1409: {
1410: if ($synonym instanceof Synonym) {
1411: return $this
1412: ->addUsingAlias(CvtermPeer::CVTERM_ID, $synonym->getTypeId(), $comparison);
1413: } elseif ($synonym instanceof PropelObjectCollection) {
1414: return $this
1415: ->useSynonymQuery()
1416: ->filterByPrimaryKeys($synonym->getPrimaryKeys())
1417: ->endUse();
1418: } else {
1419: throw new PropelException('filterBySynonym() only accepts arguments of type Synonym or PropelCollection');
1420: }
1421: }
1422:
1423: /**
1424: * Adds a JOIN clause to the query using the Synonym relation
1425: *
1426: * @param string $relationAlias optional alias for the relation
1427: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1428: *
1429: * @return CvtermQuery The current query, for fluid interface
1430: */
1431: public function joinSynonym($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1432: {
1433: $tableMap = $this->getTableMap();
1434: $relationMap = $tableMap->getRelation('Synonym');
1435:
1436: // create a ModelJoin object for this join
1437: $join = new ModelJoin();
1438: $join->setJoinType($joinType);
1439: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1440: if ($previousJoin = $this->getPreviousJoin()) {
1441: $join->setPreviousJoin($previousJoin);
1442: }
1443:
1444: // add the ModelJoin to the current object
1445: if ($relationAlias) {
1446: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1447: $this->addJoinObject($join, $relationAlias);
1448: } else {
1449: $this->addJoinObject($join, 'Synonym');
1450: }
1451:
1452: return $this;
1453: }
1454:
1455: /**
1456: * Use the Synonym relation Synonym object
1457: *
1458: * @see useQuery()
1459: *
1460: * @param string $relationAlias optional alias for the relation,
1461: * to be used as main alias in the secondary query
1462: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1463: *
1464: * @return \cli_db\propel\SynonymQuery A secondary query class using the current class as primary query
1465: */
1466: public function useSynonymQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1467: {
1468: return $this
1469: ->joinSynonym($relationAlias, $joinType)
1470: ->useQuery($relationAlias ? $relationAlias : 'Synonym', '\cli_db\propel\SynonymQuery');
1471: }
1472:
1473: /**
1474: * Exclude object from result
1475: *
1476: * @param Cvterm $cvterm Object to remove from the list of results
1477: *
1478: * @return CvtermQuery The current query, for fluid interface
1479: */
1480: public function prune($cvterm = null)
1481: {
1482: if ($cvterm) {
1483: $this->addUsingAlias(CvtermPeer::CVTERM_ID, $cvterm->getCvtermId(), Criteria::NOT_EQUAL);
1484: }
1485:
1486: return $this;
1487: }
1488:
1489: }
1490: