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\Cvterm;
16: use cli_db\propel\Dbxref;
17: use cli_db\propel\Feature;
18: use cli_db\propel\FeatureCvterm;
19: use cli_db\propel\FeatureDbxref;
20: use cli_db\propel\FeaturePeer;
21: use cli_db\propel\FeaturePub;
22: use cli_db\propel\FeatureQuery;
23: use cli_db\propel\FeatureSynonym;
24: use cli_db\propel\Organism;
25:
26: /**
27: * Base class that represents a query for the 'feature' table.
28: *
29: *
30: *
31: * @method FeatureQuery orderByFeatureId($order = Criteria::ASC) Order by the feature_id column
32: * @method FeatureQuery orderByDbxrefId($order = Criteria::ASC) Order by the dbxref_id column
33: * @method FeatureQuery orderByOrganismId($order = Criteria::ASC) Order by the organism_id column
34: * @method FeatureQuery orderByName($order = Criteria::ASC) Order by the name column
35: * @method FeatureQuery orderByUniquename($order = Criteria::ASC) Order by the uniquename column
36: * @method FeatureQuery orderByResidues($order = Criteria::ASC) Order by the residues column
37: * @method FeatureQuery orderBySeqlen($order = Criteria::ASC) Order by the seqlen column
38: * @method FeatureQuery orderByMd5checksum($order = Criteria::ASC) Order by the md5checksum column
39: * @method FeatureQuery orderByTypeId($order = Criteria::ASC) Order by the type_id column
40: * @method FeatureQuery orderByIsAnalysis($order = Criteria::ASC) Order by the is_analysis column
41: * @method FeatureQuery orderByIsObsolete($order = Criteria::ASC) Order by the is_obsolete column
42: * @method FeatureQuery orderByTimeaccessioned($order = Criteria::ASC) Order by the timeaccessioned column
43: * @method FeatureQuery orderByTimelastmodified($order = Criteria::ASC) Order by the timelastmodified column
44: *
45: * @method FeatureQuery groupByFeatureId() Group by the feature_id column
46: * @method FeatureQuery groupByDbxrefId() Group by the dbxref_id column
47: * @method FeatureQuery groupByOrganismId() Group by the organism_id column
48: * @method FeatureQuery groupByName() Group by the name column
49: * @method FeatureQuery groupByUniquename() Group by the uniquename column
50: * @method FeatureQuery groupByResidues() Group by the residues column
51: * @method FeatureQuery groupBySeqlen() Group by the seqlen column
52: * @method FeatureQuery groupByMd5checksum() Group by the md5checksum column
53: * @method FeatureQuery groupByTypeId() Group by the type_id column
54: * @method FeatureQuery groupByIsAnalysis() Group by the is_analysis column
55: * @method FeatureQuery groupByIsObsolete() Group by the is_obsolete column
56: * @method FeatureQuery groupByTimeaccessioned() Group by the timeaccessioned column
57: * @method FeatureQuery groupByTimelastmodified() Group by the timelastmodified column
58: *
59: * @method FeatureQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
60: * @method FeatureQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
61: * @method FeatureQuery innerJoin($relation) Adds a INNER JOIN clause to the query
62: *
63: * @method FeatureQuery leftJoinDbxref($relationAlias = null) Adds a LEFT JOIN clause to the query using the Dbxref relation
64: * @method FeatureQuery rightJoinDbxref($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Dbxref relation
65: * @method FeatureQuery innerJoinDbxref($relationAlias = null) Adds a INNER JOIN clause to the query using the Dbxref relation
66: *
67: * @method FeatureQuery leftJoinOrganism($relationAlias = null) Adds a LEFT JOIN clause to the query using the Organism relation
68: * @method FeatureQuery rightJoinOrganism($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Organism relation
69: * @method FeatureQuery innerJoinOrganism($relationAlias = null) Adds a INNER JOIN clause to the query using the Organism relation
70: *
71: * @method FeatureQuery leftJoinCvterm($relationAlias = null) Adds a LEFT JOIN clause to the query using the Cvterm relation
72: * @method FeatureQuery rightJoinCvterm($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Cvterm relation
73: * @method FeatureQuery innerJoinCvterm($relationAlias = null) Adds a INNER JOIN clause to the query using the Cvterm relation
74: *
75: * @method FeatureQuery leftJoinFeatureCvterm($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureCvterm relation
76: * @method FeatureQuery rightJoinFeatureCvterm($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureCvterm relation
77: * @method FeatureQuery innerJoinFeatureCvterm($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureCvterm relation
78: *
79: * @method FeatureQuery leftJoinFeatureDbxref($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureDbxref relation
80: * @method FeatureQuery rightJoinFeatureDbxref($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureDbxref relation
81: * @method FeatureQuery innerJoinFeatureDbxref($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureDbxref relation
82: *
83: * @method FeatureQuery leftJoinFeaturePub($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeaturePub relation
84: * @method FeatureQuery rightJoinFeaturePub($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeaturePub relation
85: * @method FeatureQuery innerJoinFeaturePub($relationAlias = null) Adds a INNER JOIN clause to the query using the FeaturePub relation
86: *
87: * @method FeatureQuery leftJoinFeatureSynonym($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureSynonym relation
88: * @method FeatureQuery rightJoinFeatureSynonym($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureSynonym relation
89: * @method FeatureQuery innerJoinFeatureSynonym($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureSynonym relation
90: *
91: * @method Feature findOne(PropelPDO $con = null) Return the first Feature matching the query
92: * @method Feature findOneOrCreate(PropelPDO $con = null) Return the first Feature matching the query, or a new Feature object populated from the query conditions when no match is found
93: *
94: * @method Feature findOneByDbxrefId(int $dbxref_id) Return the first Feature filtered by the dbxref_id column
95: * @method Feature findOneByOrganismId(int $organism_id) Return the first Feature filtered by the organism_id column
96: * @method Feature findOneByName(string $name) Return the first Feature filtered by the name column
97: * @method Feature findOneByUniquename(string $uniquename) Return the first Feature filtered by the uniquename column
98: * @method Feature findOneByResidues(string $residues) Return the first Feature filtered by the residues column
99: * @method Feature findOneBySeqlen(int $seqlen) Return the first Feature filtered by the seqlen column
100: * @method Feature findOneByMd5checksum(string $md5checksum) Return the first Feature filtered by the md5checksum column
101: * @method Feature findOneByTypeId(int $type_id) Return the first Feature filtered by the type_id column
102: * @method Feature findOneByIsAnalysis(boolean $is_analysis) Return the first Feature filtered by the is_analysis column
103: * @method Feature findOneByIsObsolete(boolean $is_obsolete) Return the first Feature filtered by the is_obsolete column
104: * @method Feature findOneByTimeaccessioned(string $timeaccessioned) Return the first Feature filtered by the timeaccessioned column
105: * @method Feature findOneByTimelastmodified(string $timelastmodified) Return the first Feature filtered by the timelastmodified column
106: *
107: * @method array findByFeatureId(int $feature_id) Return Feature objects filtered by the feature_id column
108: * @method array findByDbxrefId(int $dbxref_id) Return Feature objects filtered by the dbxref_id column
109: * @method array findByOrganismId(int $organism_id) Return Feature objects filtered by the organism_id column
110: * @method array findByName(string $name) Return Feature objects filtered by the name column
111: * @method array findByUniquename(string $uniquename) Return Feature objects filtered by the uniquename column
112: * @method array findByResidues(string $residues) Return Feature objects filtered by the residues column
113: * @method array findBySeqlen(int $seqlen) Return Feature objects filtered by the seqlen column
114: * @method array findByMd5checksum(string $md5checksum) Return Feature objects filtered by the md5checksum column
115: * @method array findByTypeId(int $type_id) Return Feature objects filtered by the type_id column
116: * @method array findByIsAnalysis(boolean $is_analysis) Return Feature objects filtered by the is_analysis column
117: * @method array findByIsObsolete(boolean $is_obsolete) Return Feature objects filtered by the is_obsolete column
118: * @method array findByTimeaccessioned(string $timeaccessioned) Return Feature objects filtered by the timeaccessioned column
119: * @method array findByTimelastmodified(string $timelastmodified) Return Feature objects filtered by the timelastmodified column
120: *
121: * @package propel.generator.cli_db.om
122: */
123: abstract class BaseFeatureQuery extends ModelCriteria
124: {
125: /**
126: * Initializes internal state of BaseFeatureQuery object.
127: *
128: * @param string $dbName The dabase name
129: * @param string $modelName The phpName of a model, e.g. 'Book'
130: * @param string $modelAlias The alias for the model in this query, e.g. 'b'
131: */
132: public function __construct($dbName = 'cli_db', $modelName = 'cli_db\\propel\\Feature', $modelAlias = null)
133: {
134: parent::__construct($dbName, $modelName, $modelAlias);
135: }
136:
137: /**
138: * Returns a new FeatureQuery object.
139: *
140: * @param string $modelAlias The alias of a model in the query
141: * @param FeatureQuery|Criteria $criteria Optional Criteria to build the query from
142: *
143: * @return FeatureQuery
144: */
145: public static function create($modelAlias = null, $criteria = null)
146: {
147: if ($criteria instanceof FeatureQuery) {
148: return $criteria;
149: }
150: $query = new FeatureQuery();
151: if (null !== $modelAlias) {
152: $query->setModelAlias($modelAlias);
153: }
154: if ($criteria instanceof Criteria) {
155: $query->mergeWith($criteria);
156: }
157:
158: return $query;
159: }
160:
161: /**
162: * Find object by primary key.
163: * Propel uses the instance pool to skip the database if the object exists.
164: * Go fast if the query is untouched.
165: *
166: * <code>
167: * $obj = $c->findPk(12, $con);
168: * </code>
169: *
170: * @param mixed $key Primary key to use for the query
171: * @param PropelPDO $con an optional connection object
172: *
173: * @return Feature|Feature[]|mixed the result, formatted by the current formatter
174: */
175: public function findPk($key, $con = null)
176: {
177: if ($key === null) {
178: return null;
179: }
180: if ((null !== ($obj = FeaturePeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
181: // the object is alredy in the instance pool
182: return $obj;
183: }
184: if ($con === null) {
185: $con = Propel::getConnection(FeaturePeer::DATABASE_NAME, Propel::CONNECTION_READ);
186: }
187: $this->basePreSelect($con);
188: if ($this->formatter || $this->modelAlias || $this->with || $this->select
189: || $this->selectColumns || $this->asColumns || $this->selectModifiers
190: || $this->map || $this->having || $this->joins) {
191: return $this->findPkComplex($key, $con);
192: } else {
193: return $this->findPkSimple($key, $con);
194: }
195: }
196:
197: /**
198: * Alias of findPk to use instance pooling
199: *
200: * @param mixed $key Primary key to use for the query
201: * @param PropelPDO $con A connection object
202: *
203: * @return Feature A model object, or null if the key is not found
204: * @throws PropelException
205: */
206: public function findOneByFeatureId($key, $con = null)
207: {
208: return $this->findPk($key, $con);
209: }
210:
211: /**
212: * Find object by primary key using raw SQL to go fast.
213: * Bypass doSelect() and the object formatter by using generated code.
214: *
215: * @param mixed $key Primary key to use for the query
216: * @param PropelPDO $con A connection object
217: *
218: * @return Feature A model object, or null if the key is not found
219: * @throws PropelException
220: */
221: protected function findPkSimple($key, $con)
222: {
223: $sql = 'SELECT "feature_id", "dbxref_id", "organism_id", "name", "uniquename", "residues", "seqlen", "md5checksum", "type_id", "is_analysis", "is_obsolete", "timeaccessioned", "timelastmodified" FROM "feature" WHERE "feature_id" = :p0';
224: try {
225: $stmt = $con->prepare($sql);
226: $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
227: $stmt->execute();
228: } catch (Exception $e) {
229: Propel::log($e->getMessage(), Propel::LOG_ERR);
230: throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
231: }
232: $obj = null;
233: if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
234: $obj = new Feature();
235: $obj->hydrate($row);
236: FeaturePeer::addInstanceToPool($obj, (string) $key);
237: }
238: $stmt->closeCursor();
239:
240: return $obj;
241: }
242:
243: /**
244: * Find object by primary key.
245: *
246: * @param mixed $key Primary key to use for the query
247: * @param PropelPDO $con A connection object
248: *
249: * @return Feature|Feature[]|mixed the result, formatted by the current formatter
250: */
251: protected function findPkComplex($key, $con)
252: {
253: // As the query uses a PK condition, no limit(1) is necessary.
254: $criteria = $this->isKeepQuery() ? clone $this : $this;
255: $stmt = $criteria
256: ->filterByPrimaryKey($key)
257: ->doSelect($con);
258:
259: return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
260: }
261:
262: /**
263: * Find objects by primary key
264: * <code>
265: * $objs = $c->findPks(array(12, 56, 832), $con);
266: * </code>
267: * @param array $keys Primary keys to use for the query
268: * @param PropelPDO $con an optional connection object
269: *
270: * @return PropelObjectCollection|Feature[]|mixed the list of results, formatted by the current formatter
271: */
272: public function findPks($keys, $con = null)
273: {
274: if ($con === null) {
275: $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
276: }
277: $this->basePreSelect($con);
278: $criteria = $this->isKeepQuery() ? clone $this : $this;
279: $stmt = $criteria
280: ->filterByPrimaryKeys($keys)
281: ->doSelect($con);
282:
283: return $criteria->getFormatter()->init($criteria)->format($stmt);
284: }
285:
286: /**
287: * Filter the query by primary key
288: *
289: * @param mixed $key Primary key to use for the query
290: *
291: * @return FeatureQuery The current query, for fluid interface
292: */
293: public function filterByPrimaryKey($key)
294: {
295:
296: return $this->addUsingAlias(FeaturePeer::FEATURE_ID, $key, Criteria::EQUAL);
297: }
298:
299: /**
300: * Filter the query by a list of primary keys
301: *
302: * @param array $keys The list of primary key to use for the query
303: *
304: * @return FeatureQuery The current query, for fluid interface
305: */
306: public function filterByPrimaryKeys($keys)
307: {
308:
309: return $this->addUsingAlias(FeaturePeer::FEATURE_ID, $keys, Criteria::IN);
310: }
311:
312: /**
313: * Filter the query on the feature_id column
314: *
315: * Example usage:
316: * <code>
317: * $query->filterByFeatureId(1234); // WHERE feature_id = 1234
318: * $query->filterByFeatureId(array(12, 34)); // WHERE feature_id IN (12, 34)
319: * $query->filterByFeatureId(array('min' => 12)); // WHERE feature_id >= 12
320: * $query->filterByFeatureId(array('max' => 12)); // WHERE feature_id <= 12
321: * </code>
322: *
323: * @param mixed $featureId The value to use as filter.
324: * Use scalar values for equality.
325: * Use array values for in_array() equivalent.
326: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
327: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
328: *
329: * @return FeatureQuery The current query, for fluid interface
330: */
331: public function filterByFeatureId($featureId = null, $comparison = null)
332: {
333: if (is_array($featureId)) {
334: $useMinMax = false;
335: if (isset($featureId['min'])) {
336: $this->addUsingAlias(FeaturePeer::FEATURE_ID, $featureId['min'], Criteria::GREATER_EQUAL);
337: $useMinMax = true;
338: }
339: if (isset($featureId['max'])) {
340: $this->addUsingAlias(FeaturePeer::FEATURE_ID, $featureId['max'], Criteria::LESS_EQUAL);
341: $useMinMax = true;
342: }
343: if ($useMinMax) {
344: return $this;
345: }
346: if (null === $comparison) {
347: $comparison = Criteria::IN;
348: }
349: }
350:
351: return $this->addUsingAlias(FeaturePeer::FEATURE_ID, $featureId, $comparison);
352: }
353:
354: /**
355: * Filter the query on the dbxref_id column
356: *
357: * Example usage:
358: * <code>
359: * $query->filterByDbxrefId(1234); // WHERE dbxref_id = 1234
360: * $query->filterByDbxrefId(array(12, 34)); // WHERE dbxref_id IN (12, 34)
361: * $query->filterByDbxrefId(array('min' => 12)); // WHERE dbxref_id >= 12
362: * $query->filterByDbxrefId(array('max' => 12)); // WHERE dbxref_id <= 12
363: * </code>
364: *
365: * @see filterByDbxref()
366: *
367: * @param mixed $dbxrefId The value to use as filter.
368: * Use scalar values for equality.
369: * Use array values for in_array() equivalent.
370: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
371: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
372: *
373: * @return FeatureQuery The current query, for fluid interface
374: */
375: public function filterByDbxrefId($dbxrefId = null, $comparison = null)
376: {
377: if (is_array($dbxrefId)) {
378: $useMinMax = false;
379: if (isset($dbxrefId['min'])) {
380: $this->addUsingAlias(FeaturePeer::DBXREF_ID, $dbxrefId['min'], Criteria::GREATER_EQUAL);
381: $useMinMax = true;
382: }
383: if (isset($dbxrefId['max'])) {
384: $this->addUsingAlias(FeaturePeer::DBXREF_ID, $dbxrefId['max'], Criteria::LESS_EQUAL);
385: $useMinMax = true;
386: }
387: if ($useMinMax) {
388: return $this;
389: }
390: if (null === $comparison) {
391: $comparison = Criteria::IN;
392: }
393: }
394:
395: return $this->addUsingAlias(FeaturePeer::DBXREF_ID, $dbxrefId, $comparison);
396: }
397:
398: /**
399: * Filter the query on the organism_id column
400: *
401: * Example usage:
402: * <code>
403: * $query->filterByOrganismId(1234); // WHERE organism_id = 1234
404: * $query->filterByOrganismId(array(12, 34)); // WHERE organism_id IN (12, 34)
405: * $query->filterByOrganismId(array('min' => 12)); // WHERE organism_id >= 12
406: * $query->filterByOrganismId(array('max' => 12)); // WHERE organism_id <= 12
407: * </code>
408: *
409: * @see filterByOrganism()
410: *
411: * @param mixed $organismId The value to use as filter.
412: * Use scalar values for equality.
413: * Use array values for in_array() equivalent.
414: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
415: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
416: *
417: * @return FeatureQuery The current query, for fluid interface
418: */
419: public function filterByOrganismId($organismId = null, $comparison = null)
420: {
421: if (is_array($organismId)) {
422: $useMinMax = false;
423: if (isset($organismId['min'])) {
424: $this->addUsingAlias(FeaturePeer::ORGANISM_ID, $organismId['min'], Criteria::GREATER_EQUAL);
425: $useMinMax = true;
426: }
427: if (isset($organismId['max'])) {
428: $this->addUsingAlias(FeaturePeer::ORGANISM_ID, $organismId['max'], Criteria::LESS_EQUAL);
429: $useMinMax = true;
430: }
431: if ($useMinMax) {
432: return $this;
433: }
434: if (null === $comparison) {
435: $comparison = Criteria::IN;
436: }
437: }
438:
439: return $this->addUsingAlias(FeaturePeer::ORGANISM_ID, $organismId, $comparison);
440: }
441:
442: /**
443: * Filter the query on the name column
444: *
445: * Example usage:
446: * <code>
447: * $query->filterByName('fooValue'); // WHERE name = 'fooValue'
448: * $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%'
449: * </code>
450: *
451: * @param string $name The value to use as filter.
452: * Accepts wildcards (* and % trigger a LIKE)
453: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
454: *
455: * @return FeatureQuery The current query, for fluid interface
456: */
457: public function filterByName($name = null, $comparison = null)
458: {
459: if (null === $comparison) {
460: if (is_array($name)) {
461: $comparison = Criteria::IN;
462: } elseif (preg_match('/[\%\*]/', $name)) {
463: $name = str_replace('*', '%', $name);
464: $comparison = Criteria::LIKE;
465: }
466: }
467:
468: return $this->addUsingAlias(FeaturePeer::NAME, $name, $comparison);
469: }
470:
471: /**
472: * Filter the query on the uniquename column
473: *
474: * Example usage:
475: * <code>
476: * $query->filterByUniquename('fooValue'); // WHERE uniquename = 'fooValue'
477: * $query->filterByUniquename('%fooValue%'); // WHERE uniquename LIKE '%fooValue%'
478: * </code>
479: *
480: * @param string $uniquename The value to use as filter.
481: * Accepts wildcards (* and % trigger a LIKE)
482: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
483: *
484: * @return FeatureQuery The current query, for fluid interface
485: */
486: public function filterByUniquename($uniquename = null, $comparison = null)
487: {
488: if (null === $comparison) {
489: if (is_array($uniquename)) {
490: $comparison = Criteria::IN;
491: } elseif (preg_match('/[\%\*]/', $uniquename)) {
492: $uniquename = str_replace('*', '%', $uniquename);
493: $comparison = Criteria::LIKE;
494: }
495: }
496:
497: return $this->addUsingAlias(FeaturePeer::UNIQUENAME, $uniquename, $comparison);
498: }
499:
500: /**
501: * Filter the query on the residues column
502: *
503: * Example usage:
504: * <code>
505: * $query->filterByResidues('fooValue'); // WHERE residues = 'fooValue'
506: * $query->filterByResidues('%fooValue%'); // WHERE residues LIKE '%fooValue%'
507: * </code>
508: *
509: * @param string $residues The value to use as filter.
510: * Accepts wildcards (* and % trigger a LIKE)
511: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
512: *
513: * @return FeatureQuery The current query, for fluid interface
514: */
515: public function filterByResidues($residues = null, $comparison = null)
516: {
517: if (null === $comparison) {
518: if (is_array($residues)) {
519: $comparison = Criteria::IN;
520: } elseif (preg_match('/[\%\*]/', $residues)) {
521: $residues = str_replace('*', '%', $residues);
522: $comparison = Criteria::LIKE;
523: }
524: }
525:
526: return $this->addUsingAlias(FeaturePeer::RESIDUES, $residues, $comparison);
527: }
528:
529: /**
530: * Filter the query on the seqlen column
531: *
532: * Example usage:
533: * <code>
534: * $query->filterBySeqlen(1234); // WHERE seqlen = 1234
535: * $query->filterBySeqlen(array(12, 34)); // WHERE seqlen IN (12, 34)
536: * $query->filterBySeqlen(array('min' => 12)); // WHERE seqlen >= 12
537: * $query->filterBySeqlen(array('max' => 12)); // WHERE seqlen <= 12
538: * </code>
539: *
540: * @param mixed $seqlen The value to use as filter.
541: * Use scalar values for equality.
542: * Use array values for in_array() equivalent.
543: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
544: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
545: *
546: * @return FeatureQuery The current query, for fluid interface
547: */
548: public function filterBySeqlen($seqlen = null, $comparison = null)
549: {
550: if (is_array($seqlen)) {
551: $useMinMax = false;
552: if (isset($seqlen['min'])) {
553: $this->addUsingAlias(FeaturePeer::SEQLEN, $seqlen['min'], Criteria::GREATER_EQUAL);
554: $useMinMax = true;
555: }
556: if (isset($seqlen['max'])) {
557: $this->addUsingAlias(FeaturePeer::SEQLEN, $seqlen['max'], Criteria::LESS_EQUAL);
558: $useMinMax = true;
559: }
560: if ($useMinMax) {
561: return $this;
562: }
563: if (null === $comparison) {
564: $comparison = Criteria::IN;
565: }
566: }
567:
568: return $this->addUsingAlias(FeaturePeer::SEQLEN, $seqlen, $comparison);
569: }
570:
571: /**
572: * Filter the query on the md5checksum column
573: *
574: * Example usage:
575: * <code>
576: * $query->filterByMd5checksum('fooValue'); // WHERE md5checksum = 'fooValue'
577: * $query->filterByMd5checksum('%fooValue%'); // WHERE md5checksum LIKE '%fooValue%'
578: * </code>
579: *
580: * @param string $md5checksum The value to use as filter.
581: * Accepts wildcards (* and % trigger a LIKE)
582: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
583: *
584: * @return FeatureQuery The current query, for fluid interface
585: */
586: public function filterByMd5checksum($md5checksum = null, $comparison = null)
587: {
588: if (null === $comparison) {
589: if (is_array($md5checksum)) {
590: $comparison = Criteria::IN;
591: } elseif (preg_match('/[\%\*]/', $md5checksum)) {
592: $md5checksum = str_replace('*', '%', $md5checksum);
593: $comparison = Criteria::LIKE;
594: }
595: }
596:
597: return $this->addUsingAlias(FeaturePeer::MD5CHECKSUM, $md5checksum, $comparison);
598: }
599:
600: /**
601: * Filter the query on the type_id column
602: *
603: * Example usage:
604: * <code>
605: * $query->filterByTypeId(1234); // WHERE type_id = 1234
606: * $query->filterByTypeId(array(12, 34)); // WHERE type_id IN (12, 34)
607: * $query->filterByTypeId(array('min' => 12)); // WHERE type_id >= 12
608: * $query->filterByTypeId(array('max' => 12)); // WHERE type_id <= 12
609: * </code>
610: *
611: * @see filterByCvterm()
612: *
613: * @param mixed $typeId The value to use as filter.
614: * Use scalar values for equality.
615: * Use array values for in_array() equivalent.
616: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
617: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
618: *
619: * @return FeatureQuery The current query, for fluid interface
620: */
621: public function filterByTypeId($typeId = null, $comparison = null)
622: {
623: if (is_array($typeId)) {
624: $useMinMax = false;
625: if (isset($typeId['min'])) {
626: $this->addUsingAlias(FeaturePeer::TYPE_ID, $typeId['min'], Criteria::GREATER_EQUAL);
627: $useMinMax = true;
628: }
629: if (isset($typeId['max'])) {
630: $this->addUsingAlias(FeaturePeer::TYPE_ID, $typeId['max'], Criteria::LESS_EQUAL);
631: $useMinMax = true;
632: }
633: if ($useMinMax) {
634: return $this;
635: }
636: if (null === $comparison) {
637: $comparison = Criteria::IN;
638: }
639: }
640:
641: return $this->addUsingAlias(FeaturePeer::TYPE_ID, $typeId, $comparison);
642: }
643:
644: /**
645: * Filter the query on the is_analysis column
646: *
647: * Example usage:
648: * <code>
649: * $query->filterByIsAnalysis(true); // WHERE is_analysis = true
650: * $query->filterByIsAnalysis('yes'); // WHERE is_analysis = true
651: * </code>
652: *
653: * @param boolean|string $isAnalysis The value to use as filter.
654: * Non-boolean arguments are converted using the following rules:
655: * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
656: * * 0, '0', 'false', 'off', and 'no' are converted to boolean false
657: * Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
658: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
659: *
660: * @return FeatureQuery The current query, for fluid interface
661: */
662: public function filterByIsAnalysis($isAnalysis = null, $comparison = null)
663: {
664: if (is_string($isAnalysis)) {
665: $isAnalysis = in_array(strtolower($isAnalysis), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
666: }
667:
668: return $this->addUsingAlias(FeaturePeer::IS_ANALYSIS, $isAnalysis, $comparison);
669: }
670:
671: /**
672: * Filter the query on the is_obsolete column
673: *
674: * Example usage:
675: * <code>
676: * $query->filterByIsObsolete(true); // WHERE is_obsolete = true
677: * $query->filterByIsObsolete('yes'); // WHERE is_obsolete = true
678: * </code>
679: *
680: * @param boolean|string $isObsolete The value to use as filter.
681: * Non-boolean arguments are converted using the following rules:
682: * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
683: * * 0, '0', 'false', 'off', and 'no' are converted to boolean false
684: * Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
685: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
686: *
687: * @return FeatureQuery The current query, for fluid interface
688: */
689: public function filterByIsObsolete($isObsolete = null, $comparison = null)
690: {
691: if (is_string($isObsolete)) {
692: $isObsolete = in_array(strtolower($isObsolete), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
693: }
694:
695: return $this->addUsingAlias(FeaturePeer::IS_OBSOLETE, $isObsolete, $comparison);
696: }
697:
698: /**
699: * Filter the query on the timeaccessioned column
700: *
701: * Example usage:
702: * <code>
703: * $query->filterByTimeaccessioned('2011-03-14'); // WHERE timeaccessioned = '2011-03-14'
704: * $query->filterByTimeaccessioned('now'); // WHERE timeaccessioned = '2011-03-14'
705: * $query->filterByTimeaccessioned(array('max' => 'yesterday')); // WHERE timeaccessioned > '2011-03-13'
706: * </code>
707: *
708: * @param mixed $timeaccessioned The value to use as filter.
709: * Values can be integers (unix timestamps), DateTime objects, or strings.
710: * Empty strings are treated as NULL.
711: * Use scalar values for equality.
712: * Use array values for in_array() equivalent.
713: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
714: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
715: *
716: * @return FeatureQuery The current query, for fluid interface
717: */
718: public function filterByTimeaccessioned($timeaccessioned = null, $comparison = null)
719: {
720: if (is_array($timeaccessioned)) {
721: $useMinMax = false;
722: if (isset($timeaccessioned['min'])) {
723: $this->addUsingAlias(FeaturePeer::TIMEACCESSIONED, $timeaccessioned['min'], Criteria::GREATER_EQUAL);
724: $useMinMax = true;
725: }
726: if (isset($timeaccessioned['max'])) {
727: $this->addUsingAlias(FeaturePeer::TIMEACCESSIONED, $timeaccessioned['max'], Criteria::LESS_EQUAL);
728: $useMinMax = true;
729: }
730: if ($useMinMax) {
731: return $this;
732: }
733: if (null === $comparison) {
734: $comparison = Criteria::IN;
735: }
736: }
737:
738: return $this->addUsingAlias(FeaturePeer::TIMEACCESSIONED, $timeaccessioned, $comparison);
739: }
740:
741: /**
742: * Filter the query on the timelastmodified column
743: *
744: * Example usage:
745: * <code>
746: * $query->filterByTimelastmodified('2011-03-14'); // WHERE timelastmodified = '2011-03-14'
747: * $query->filterByTimelastmodified('now'); // WHERE timelastmodified = '2011-03-14'
748: * $query->filterByTimelastmodified(array('max' => 'yesterday')); // WHERE timelastmodified > '2011-03-13'
749: * </code>
750: *
751: * @param mixed $timelastmodified The value to use as filter.
752: * Values can be integers (unix timestamps), DateTime objects, or strings.
753: * Empty strings are treated as NULL.
754: * Use scalar values for equality.
755: * Use array values for in_array() equivalent.
756: * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
757: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
758: *
759: * @return FeatureQuery The current query, for fluid interface
760: */
761: public function filterByTimelastmodified($timelastmodified = null, $comparison = null)
762: {
763: if (is_array($timelastmodified)) {
764: $useMinMax = false;
765: if (isset($timelastmodified['min'])) {
766: $this->addUsingAlias(FeaturePeer::TIMELASTMODIFIED, $timelastmodified['min'], Criteria::GREATER_EQUAL);
767: $useMinMax = true;
768: }
769: if (isset($timelastmodified['max'])) {
770: $this->addUsingAlias(FeaturePeer::TIMELASTMODIFIED, $timelastmodified['max'], Criteria::LESS_EQUAL);
771: $useMinMax = true;
772: }
773: if ($useMinMax) {
774: return $this;
775: }
776: if (null === $comparison) {
777: $comparison = Criteria::IN;
778: }
779: }
780:
781: return $this->addUsingAlias(FeaturePeer::TIMELASTMODIFIED, $timelastmodified, $comparison);
782: }
783:
784: /**
785: * Filter the query by a related Dbxref object
786: *
787: * @param Dbxref|PropelObjectCollection $dbxref The related object(s) to use as filter
788: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
789: *
790: * @return FeatureQuery The current query, for fluid interface
791: * @throws PropelException - if the provided filter is invalid.
792: */
793: public function filterByDbxref($dbxref, $comparison = null)
794: {
795: if ($dbxref instanceof Dbxref) {
796: return $this
797: ->addUsingAlias(FeaturePeer::DBXREF_ID, $dbxref->getDbxrefId(), $comparison);
798: } elseif ($dbxref instanceof PropelObjectCollection) {
799: if (null === $comparison) {
800: $comparison = Criteria::IN;
801: }
802:
803: return $this
804: ->addUsingAlias(FeaturePeer::DBXREF_ID, $dbxref->toKeyValue('PrimaryKey', 'DbxrefId'), $comparison);
805: } else {
806: throw new PropelException('filterByDbxref() only accepts arguments of type Dbxref or PropelCollection');
807: }
808: }
809:
810: /**
811: * Adds a JOIN clause to the query using the Dbxref relation
812: *
813: * @param string $relationAlias optional alias for the relation
814: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
815: *
816: * @return FeatureQuery The current query, for fluid interface
817: */
818: public function joinDbxref($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
819: {
820: $tableMap = $this->getTableMap();
821: $relationMap = $tableMap->getRelation('Dbxref');
822:
823: // create a ModelJoin object for this join
824: $join = new ModelJoin();
825: $join->setJoinType($joinType);
826: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
827: if ($previousJoin = $this->getPreviousJoin()) {
828: $join->setPreviousJoin($previousJoin);
829: }
830:
831: // add the ModelJoin to the current object
832: if ($relationAlias) {
833: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
834: $this->addJoinObject($join, $relationAlias);
835: } else {
836: $this->addJoinObject($join, 'Dbxref');
837: }
838:
839: return $this;
840: }
841:
842: /**
843: * Use the Dbxref relation Dbxref object
844: *
845: * @see useQuery()
846: *
847: * @param string $relationAlias optional alias for the relation,
848: * to be used as main alias in the secondary query
849: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
850: *
851: * @return \cli_db\propel\DbxrefQuery A secondary query class using the current class as primary query
852: */
853: public function useDbxrefQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
854: {
855: return $this
856: ->joinDbxref($relationAlias, $joinType)
857: ->useQuery($relationAlias ? $relationAlias : 'Dbxref', '\cli_db\propel\DbxrefQuery');
858: }
859:
860: /**
861: * Filter the query by a related Organism object
862: *
863: * @param Organism|PropelObjectCollection $organism The related object(s) to use as filter
864: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
865: *
866: * @return FeatureQuery The current query, for fluid interface
867: * @throws PropelException - if the provided filter is invalid.
868: */
869: public function filterByOrganism($organism, $comparison = null)
870: {
871: if ($organism instanceof Organism) {
872: return $this
873: ->addUsingAlias(FeaturePeer::ORGANISM_ID, $organism->getOrganismId(), $comparison);
874: } elseif ($organism instanceof PropelObjectCollection) {
875: if (null === $comparison) {
876: $comparison = Criteria::IN;
877: }
878:
879: return $this
880: ->addUsingAlias(FeaturePeer::ORGANISM_ID, $organism->toKeyValue('PrimaryKey', 'OrganismId'), $comparison);
881: } else {
882: throw new PropelException('filterByOrganism() only accepts arguments of type Organism or PropelCollection');
883: }
884: }
885:
886: /**
887: * Adds a JOIN clause to the query using the Organism relation
888: *
889: * @param string $relationAlias optional alias for the relation
890: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
891: *
892: * @return FeatureQuery The current query, for fluid interface
893: */
894: public function joinOrganism($relationAlias = null, $joinType = Criteria::INNER_JOIN)
895: {
896: $tableMap = $this->getTableMap();
897: $relationMap = $tableMap->getRelation('Organism');
898:
899: // create a ModelJoin object for this join
900: $join = new ModelJoin();
901: $join->setJoinType($joinType);
902: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
903: if ($previousJoin = $this->getPreviousJoin()) {
904: $join->setPreviousJoin($previousJoin);
905: }
906:
907: // add the ModelJoin to the current object
908: if ($relationAlias) {
909: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
910: $this->addJoinObject($join, $relationAlias);
911: } else {
912: $this->addJoinObject($join, 'Organism');
913: }
914:
915: return $this;
916: }
917:
918: /**
919: * Use the Organism relation Organism object
920: *
921: * @see useQuery()
922: *
923: * @param string $relationAlias optional alias for the relation,
924: * to be used as main alias in the secondary query
925: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
926: *
927: * @return \cli_db\propel\OrganismQuery A secondary query class using the current class as primary query
928: */
929: public function useOrganismQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
930: {
931: return $this
932: ->joinOrganism($relationAlias, $joinType)
933: ->useQuery($relationAlias ? $relationAlias : 'Organism', '\cli_db\propel\OrganismQuery');
934: }
935:
936: /**
937: * Filter the query by a related Cvterm object
938: *
939: * @param Cvterm|PropelObjectCollection $cvterm The related object(s) to use as filter
940: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
941: *
942: * @return FeatureQuery The current query, for fluid interface
943: * @throws PropelException - if the provided filter is invalid.
944: */
945: public function filterByCvterm($cvterm, $comparison = null)
946: {
947: if ($cvterm instanceof Cvterm) {
948: return $this
949: ->addUsingAlias(FeaturePeer::TYPE_ID, $cvterm->getCvtermId(), $comparison);
950: } elseif ($cvterm instanceof PropelObjectCollection) {
951: if (null === $comparison) {
952: $comparison = Criteria::IN;
953: }
954:
955: return $this
956: ->addUsingAlias(FeaturePeer::TYPE_ID, $cvterm->toKeyValue('PrimaryKey', 'CvtermId'), $comparison);
957: } else {
958: throw new PropelException('filterByCvterm() only accepts arguments of type Cvterm or PropelCollection');
959: }
960: }
961:
962: /**
963: * Adds a JOIN clause to the query using the Cvterm relation
964: *
965: * @param string $relationAlias optional alias for the relation
966: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
967: *
968: * @return FeatureQuery The current query, for fluid interface
969: */
970: public function joinCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)
971: {
972: $tableMap = $this->getTableMap();
973: $relationMap = $tableMap->getRelation('Cvterm');
974:
975: // create a ModelJoin object for this join
976: $join = new ModelJoin();
977: $join->setJoinType($joinType);
978: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
979: if ($previousJoin = $this->getPreviousJoin()) {
980: $join->setPreviousJoin($previousJoin);
981: }
982:
983: // add the ModelJoin to the current object
984: if ($relationAlias) {
985: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
986: $this->addJoinObject($join, $relationAlias);
987: } else {
988: $this->addJoinObject($join, 'Cvterm');
989: }
990:
991: return $this;
992: }
993:
994: /**
995: * Use the Cvterm relation Cvterm object
996: *
997: * @see useQuery()
998: *
999: * @param string $relationAlias optional alias for the relation,
1000: * to be used as main alias in the secondary query
1001: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1002: *
1003: * @return \cli_db\propel\CvtermQuery A secondary query class using the current class as primary query
1004: */
1005: public function useCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1006: {
1007: return $this
1008: ->joinCvterm($relationAlias, $joinType)
1009: ->useQuery($relationAlias ? $relationAlias : 'Cvterm', '\cli_db\propel\CvtermQuery');
1010: }
1011:
1012: /**
1013: * Filter the query by a related FeatureCvterm object
1014: *
1015: * @param FeatureCvterm|PropelObjectCollection $featureCvterm the related object to use as filter
1016: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1017: *
1018: * @return FeatureQuery The current query, for fluid interface
1019: * @throws PropelException - if the provided filter is invalid.
1020: */
1021: public function filterByFeatureCvterm($featureCvterm, $comparison = null)
1022: {
1023: if ($featureCvterm instanceof FeatureCvterm) {
1024: return $this
1025: ->addUsingAlias(FeaturePeer::FEATURE_ID, $featureCvterm->getFeatureId(), $comparison);
1026: } elseif ($featureCvterm instanceof PropelObjectCollection) {
1027: return $this
1028: ->useFeatureCvtermQuery()
1029: ->filterByPrimaryKeys($featureCvterm->getPrimaryKeys())
1030: ->endUse();
1031: } else {
1032: throw new PropelException('filterByFeatureCvterm() only accepts arguments of type FeatureCvterm or PropelCollection');
1033: }
1034: }
1035:
1036: /**
1037: * Adds a JOIN clause to the query using the FeatureCvterm relation
1038: *
1039: * @param string $relationAlias optional alias for the relation
1040: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1041: *
1042: * @return FeatureQuery The current query, for fluid interface
1043: */
1044: public function joinFeatureCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1045: {
1046: $tableMap = $this->getTableMap();
1047: $relationMap = $tableMap->getRelation('FeatureCvterm');
1048:
1049: // create a ModelJoin object for this join
1050: $join = new ModelJoin();
1051: $join->setJoinType($joinType);
1052: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1053: if ($previousJoin = $this->getPreviousJoin()) {
1054: $join->setPreviousJoin($previousJoin);
1055: }
1056:
1057: // add the ModelJoin to the current object
1058: if ($relationAlias) {
1059: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1060: $this->addJoinObject($join, $relationAlias);
1061: } else {
1062: $this->addJoinObject($join, 'FeatureCvterm');
1063: }
1064:
1065: return $this;
1066: }
1067:
1068: /**
1069: * Use the FeatureCvterm relation FeatureCvterm object
1070: *
1071: * @see useQuery()
1072: *
1073: * @param string $relationAlias optional alias for the relation,
1074: * to be used as main alias in the secondary query
1075: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1076: *
1077: * @return \cli_db\propel\FeatureCvtermQuery A secondary query class using the current class as primary query
1078: */
1079: public function useFeatureCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1080: {
1081: return $this
1082: ->joinFeatureCvterm($relationAlias, $joinType)
1083: ->useQuery($relationAlias ? $relationAlias : 'FeatureCvterm', '\cli_db\propel\FeatureCvtermQuery');
1084: }
1085:
1086: /**
1087: * Filter the query by a related FeatureDbxref object
1088: *
1089: * @param FeatureDbxref|PropelObjectCollection $featureDbxref the related object to use as filter
1090: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1091: *
1092: * @return FeatureQuery The current query, for fluid interface
1093: * @throws PropelException - if the provided filter is invalid.
1094: */
1095: public function filterByFeatureDbxref($featureDbxref, $comparison = null)
1096: {
1097: if ($featureDbxref instanceof FeatureDbxref) {
1098: return $this
1099: ->addUsingAlias(FeaturePeer::FEATURE_ID, $featureDbxref->getFeatureId(), $comparison);
1100: } elseif ($featureDbxref instanceof PropelObjectCollection) {
1101: return $this
1102: ->useFeatureDbxrefQuery()
1103: ->filterByPrimaryKeys($featureDbxref->getPrimaryKeys())
1104: ->endUse();
1105: } else {
1106: throw new PropelException('filterByFeatureDbxref() only accepts arguments of type FeatureDbxref or PropelCollection');
1107: }
1108: }
1109:
1110: /**
1111: * Adds a JOIN clause to the query using the FeatureDbxref relation
1112: *
1113: * @param string $relationAlias optional alias for the relation
1114: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1115: *
1116: * @return FeatureQuery The current query, for fluid interface
1117: */
1118: public function joinFeatureDbxref($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1119: {
1120: $tableMap = $this->getTableMap();
1121: $relationMap = $tableMap->getRelation('FeatureDbxref');
1122:
1123: // create a ModelJoin object for this join
1124: $join = new ModelJoin();
1125: $join->setJoinType($joinType);
1126: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1127: if ($previousJoin = $this->getPreviousJoin()) {
1128: $join->setPreviousJoin($previousJoin);
1129: }
1130:
1131: // add the ModelJoin to the current object
1132: if ($relationAlias) {
1133: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1134: $this->addJoinObject($join, $relationAlias);
1135: } else {
1136: $this->addJoinObject($join, 'FeatureDbxref');
1137: }
1138:
1139: return $this;
1140: }
1141:
1142: /**
1143: * Use the FeatureDbxref relation FeatureDbxref object
1144: *
1145: * @see useQuery()
1146: *
1147: * @param string $relationAlias optional alias for the relation,
1148: * to be used as main alias in the secondary query
1149: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1150: *
1151: * @return \cli_db\propel\FeatureDbxrefQuery A secondary query class using the current class as primary query
1152: */
1153: public function useFeatureDbxrefQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1154: {
1155: return $this
1156: ->joinFeatureDbxref($relationAlias, $joinType)
1157: ->useQuery($relationAlias ? $relationAlias : 'FeatureDbxref', '\cli_db\propel\FeatureDbxrefQuery');
1158: }
1159:
1160: /**
1161: * Filter the query by a related FeaturePub object
1162: *
1163: * @param FeaturePub|PropelObjectCollection $featurePub the related object to use as filter
1164: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1165: *
1166: * @return FeatureQuery The current query, for fluid interface
1167: * @throws PropelException - if the provided filter is invalid.
1168: */
1169: public function filterByFeaturePub($featurePub, $comparison = null)
1170: {
1171: if ($featurePub instanceof FeaturePub) {
1172: return $this
1173: ->addUsingAlias(FeaturePeer::FEATURE_ID, $featurePub->getFeatureId(), $comparison);
1174: } elseif ($featurePub instanceof PropelObjectCollection) {
1175: return $this
1176: ->useFeaturePubQuery()
1177: ->filterByPrimaryKeys($featurePub->getPrimaryKeys())
1178: ->endUse();
1179: } else {
1180: throw new PropelException('filterByFeaturePub() only accepts arguments of type FeaturePub or PropelCollection');
1181: }
1182: }
1183:
1184: /**
1185: * Adds a JOIN clause to the query using the FeaturePub relation
1186: *
1187: * @param string $relationAlias optional alias for the relation
1188: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1189: *
1190: * @return FeatureQuery The current query, for fluid interface
1191: */
1192: public function joinFeaturePub($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1193: {
1194: $tableMap = $this->getTableMap();
1195: $relationMap = $tableMap->getRelation('FeaturePub');
1196:
1197: // create a ModelJoin object for this join
1198: $join = new ModelJoin();
1199: $join->setJoinType($joinType);
1200: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1201: if ($previousJoin = $this->getPreviousJoin()) {
1202: $join->setPreviousJoin($previousJoin);
1203: }
1204:
1205: // add the ModelJoin to the current object
1206: if ($relationAlias) {
1207: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1208: $this->addJoinObject($join, $relationAlias);
1209: } else {
1210: $this->addJoinObject($join, 'FeaturePub');
1211: }
1212:
1213: return $this;
1214: }
1215:
1216: /**
1217: * Use the FeaturePub relation FeaturePub object
1218: *
1219: * @see useQuery()
1220: *
1221: * @param string $relationAlias optional alias for the relation,
1222: * to be used as main alias in the secondary query
1223: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1224: *
1225: * @return \cli_db\propel\FeaturePubQuery A secondary query class using the current class as primary query
1226: */
1227: public function useFeaturePubQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1228: {
1229: return $this
1230: ->joinFeaturePub($relationAlias, $joinType)
1231: ->useQuery($relationAlias ? $relationAlias : 'FeaturePub', '\cli_db\propel\FeaturePubQuery');
1232: }
1233:
1234: /**
1235: * Filter the query by a related FeatureSynonym object
1236: *
1237: * @param FeatureSynonym|PropelObjectCollection $featureSynonym the related object to use as filter
1238: * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
1239: *
1240: * @return FeatureQuery The current query, for fluid interface
1241: * @throws PropelException - if the provided filter is invalid.
1242: */
1243: public function filterByFeatureSynonym($featureSynonym, $comparison = null)
1244: {
1245: if ($featureSynonym instanceof FeatureSynonym) {
1246: return $this
1247: ->addUsingAlias(FeaturePeer::FEATURE_ID, $featureSynonym->getFeatureId(), $comparison);
1248: } elseif ($featureSynonym instanceof PropelObjectCollection) {
1249: return $this
1250: ->useFeatureSynonymQuery()
1251: ->filterByPrimaryKeys($featureSynonym->getPrimaryKeys())
1252: ->endUse();
1253: } else {
1254: throw new PropelException('filterByFeatureSynonym() only accepts arguments of type FeatureSynonym or PropelCollection');
1255: }
1256: }
1257:
1258: /**
1259: * Adds a JOIN clause to the query using the FeatureSynonym relation
1260: *
1261: * @param string $relationAlias optional alias for the relation
1262: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1263: *
1264: * @return FeatureQuery The current query, for fluid interface
1265: */
1266: public function joinFeatureSynonym($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1267: {
1268: $tableMap = $this->getTableMap();
1269: $relationMap = $tableMap->getRelation('FeatureSynonym');
1270:
1271: // create a ModelJoin object for this join
1272: $join = new ModelJoin();
1273: $join->setJoinType($joinType);
1274: $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
1275: if ($previousJoin = $this->getPreviousJoin()) {
1276: $join->setPreviousJoin($previousJoin);
1277: }
1278:
1279: // add the ModelJoin to the current object
1280: if ($relationAlias) {
1281: $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
1282: $this->addJoinObject($join, $relationAlias);
1283: } else {
1284: $this->addJoinObject($join, 'FeatureSynonym');
1285: }
1286:
1287: return $this;
1288: }
1289:
1290: /**
1291: * Use the FeatureSynonym relation FeatureSynonym object
1292: *
1293: * @see useQuery()
1294: *
1295: * @param string $relationAlias optional alias for the relation,
1296: * to be used as main alias in the secondary query
1297: * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
1298: *
1299: * @return \cli_db\propel\FeatureSynonymQuery A secondary query class using the current class as primary query
1300: */
1301: public function useFeatureSynonymQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
1302: {
1303: return $this
1304: ->joinFeatureSynonym($relationAlias, $joinType)
1305: ->useQuery($relationAlias ? $relationAlias : 'FeatureSynonym', '\cli_db\propel\FeatureSynonymQuery');
1306: }
1307:
1308: /**
1309: * Exclude object from result
1310: *
1311: * @param Feature $feature Object to remove from the list of results
1312: *
1313: * @return FeatureQuery The current query, for fluid interface
1314: */
1315: public function prune($feature = null)
1316: {
1317: if ($feature) {
1318: $this->addUsingAlias(FeaturePeer::FEATURE_ID, $feature->getFeatureId(), Criteria::NOT_EQUAL);
1319: }
1320:
1321: return $this;
1322: }
1323:
1324: }
1325: