Overview

Namespaces

  • cli_db
    • propel
      • map
      • om
  • cli_import
  • LoggedPDO
  • None
  • PHP
  • webservices
    • cart
    • combisearch
    • details
      • annotations
        • feature
    • graphs
      • barplot
      • genome
    • listing
    • queue

Classes

  • BaseAcquisition
  • BaseAcquisitionPeer
  • BaseAcquisitionQuery
  • BaseAnalysis
  • BaseAnalysisPeer
  • BaseAnalysisQuery
  • BaseAssay
  • BaseAssayBiomaterial
  • BaseAssayBiomaterialPeer
  • BaseAssayBiomaterialQuery
  • BaseAssayPeer
  • BaseAssayQuery
  • BaseBiomaterial
  • BaseBiomaterialPeer
  • BaseBiomaterialprop
  • BaseBiomaterialpropPeer
  • BaseBiomaterialpropQuery
  • BaseBiomaterialQuery
  • BaseBiomaterialRelationship
  • BaseBiomaterialRelationshipPeer
  • BaseBiomaterialRelationshipQuery
  • BaseContact
  • BaseContactPeer
  • BaseContactQuery
  • BaseCv
  • BaseCvPeer
  • BaseCvQuery
  • BaseCvterm
  • BaseCvtermPeer
  • BaseCvtermQuery
  • BaseDb
  • BaseDbPeer
  • BaseDbQuery
  • BaseDbxref
  • BaseDbxrefPeer
  • BaseDbxrefQuery
  • BaseFeature
  • BaseFeatureCvterm
  • BaseFeatureCvtermDbxref
  • BaseFeatureCvtermDbxrefPeer
  • BaseFeatureCvtermDbxrefQuery
  • BaseFeatureCvtermPeer
  • BaseFeatureCvtermprop
  • BaseFeatureCvtermpropPeer
  • BaseFeatureCvtermpropQuery
  • BaseFeatureCvtermPub
  • BaseFeatureCvtermPubPeer
  • BaseFeatureCvtermPubQuery
  • BaseFeatureCvtermQuery
  • BaseFeatureDbxref
  • BaseFeatureDbxrefPeer
  • BaseFeatureDbxrefQuery
  • BaseFeaturePeer
  • BaseFeaturePub
  • BaseFeaturePubPeer
  • BaseFeaturePubQuery
  • BaseFeatureQuery
  • BaseFeatureSynonym
  • BaseFeatureSynonymPeer
  • BaseFeatureSynonymQuery
  • BaseOrganism
  • BaseOrganismPeer
  • BaseOrganismQuery
  • BaseProtocol
  • BaseProtocolPeer
  • BaseProtocolQuery
  • BasePub
  • BasePubauthor
  • BasePubauthorPeer
  • BasePubauthorQuery
  • BasePubDbxref
  • BasePubDbxrefPeer
  • BasePubDbxrefQuery
  • BasePubPeer
  • BasePubprop
  • BasePubpropPeer
  • BasePubpropQuery
  • BasePubQuery
  • BasePubRelationship
  • BasePubRelationshipPeer
  • BasePubRelationshipQuery
  • BaseQuantification
  • BaseQuantificationPeer
  • BaseQuantificationQuery
  • BaseSynonym
  • BaseSynonymPeer
  • BaseSynonymQuery
  • Overview
  • Namespace
  • Class
  • Tree
  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\Pub;
 17: use cli_db\propel\Pubprop;
 18: use cli_db\propel\PubpropPeer;
 19: use cli_db\propel\PubpropQuery;
 20: 
 21: /**
 22:  * Base class that represents a query for the 'pubprop' table.
 23:  *
 24:  *
 25:  *
 26:  * @method PubpropQuery orderByPubpropId($order = Criteria::ASC) Order by the pubprop_id column
 27:  * @method PubpropQuery orderByPubId($order = Criteria::ASC) Order by the pub_id column
 28:  * @method PubpropQuery orderByTypeId($order = Criteria::ASC) Order by the type_id column
 29:  * @method PubpropQuery orderByValue($order = Criteria::ASC) Order by the value column
 30:  * @method PubpropQuery orderByRank($order = Criteria::ASC) Order by the rank column
 31:  *
 32:  * @method PubpropQuery groupByPubpropId() Group by the pubprop_id column
 33:  * @method PubpropQuery groupByPubId() Group by the pub_id column
 34:  * @method PubpropQuery groupByTypeId() Group by the type_id column
 35:  * @method PubpropQuery groupByValue() Group by the value column
 36:  * @method PubpropQuery groupByRank() Group by the rank column
 37:  *
 38:  * @method PubpropQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 39:  * @method PubpropQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 40:  * @method PubpropQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 41:  *
 42:  * @method PubpropQuery leftJoinPub($relationAlias = null) Adds a LEFT JOIN clause to the query using the Pub relation
 43:  * @method PubpropQuery rightJoinPub($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Pub relation
 44:  * @method PubpropQuery innerJoinPub($relationAlias = null) Adds a INNER JOIN clause to the query using the Pub relation
 45:  *
 46:  * @method PubpropQuery leftJoinCvterm($relationAlias = null) Adds a LEFT JOIN clause to the query using the Cvterm relation
 47:  * @method PubpropQuery rightJoinCvterm($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Cvterm relation
 48:  * @method PubpropQuery innerJoinCvterm($relationAlias = null) Adds a INNER JOIN clause to the query using the Cvterm relation
 49:  *
 50:  * @method Pubprop findOne(PropelPDO $con = null) Return the first Pubprop matching the query
 51:  * @method Pubprop findOneOrCreate(PropelPDO $con = null) Return the first Pubprop matching the query, or a new Pubprop object populated from the query conditions when no match is found
 52:  *
 53:  * @method Pubprop findOneByPubId(int $pub_id) Return the first Pubprop filtered by the pub_id column
 54:  * @method Pubprop findOneByTypeId(int $type_id) Return the first Pubprop filtered by the type_id column
 55:  * @method Pubprop findOneByValue(string $value) Return the first Pubprop filtered by the value column
 56:  * @method Pubprop findOneByRank(int $rank) Return the first Pubprop filtered by the rank column
 57:  *
 58:  * @method array findByPubpropId(int $pubprop_id) Return Pubprop objects filtered by the pubprop_id column
 59:  * @method array findByPubId(int $pub_id) Return Pubprop objects filtered by the pub_id column
 60:  * @method array findByTypeId(int $type_id) Return Pubprop objects filtered by the type_id column
 61:  * @method array findByValue(string $value) Return Pubprop objects filtered by the value column
 62:  * @method array findByRank(int $rank) Return Pubprop objects filtered by the rank column
 63:  *
 64:  * @package    propel.generator.cli_db.om
 65:  */
 66: abstract class BasePubpropQuery extends ModelCriteria
 67: {
 68:     /**
 69:      * Initializes internal state of BasePubpropQuery object.
 70:      *
 71:      * @param     string $dbName The dabase name
 72:      * @param     string $modelName The phpName of a model, e.g. 'Book'
 73:      * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
 74:      */
 75:     public function __construct($dbName = 'cli_db', $modelName = 'cli_db\\propel\\Pubprop', $modelAlias = null)
 76:     {
 77:         parent::__construct($dbName, $modelName, $modelAlias);
 78:     }
 79: 
 80:     /**
 81:      * Returns a new PubpropQuery object.
 82:      *
 83:      * @param     string $modelAlias The alias of a model in the query
 84:      * @param   PubpropQuery|Criteria $criteria Optional Criteria to build the query from
 85:      *
 86:      * @return PubpropQuery
 87:      */
 88:     public static function create($modelAlias = null, $criteria = null)
 89:     {
 90:         if ($criteria instanceof PubpropQuery) {
 91:             return $criteria;
 92:         }
 93:         $query = new PubpropQuery();
 94:         if (null !== $modelAlias) {
 95:             $query->setModelAlias($modelAlias);
 96:         }
 97:         if ($criteria instanceof Criteria) {
 98:             $query->mergeWith($criteria);
 99:         }
100: 
101:         return $query;
102:     }
103: 
104:     /**
105:      * Find object by primary key.
106:      * Propel uses the instance pool to skip the database if the object exists.
107:      * Go fast if the query is untouched.
108:      *
109:      * <code>
110:      * $obj  = $c->findPk(12, $con);
111:      * </code>
112:      *
113:      * @param mixed $key Primary key to use for the query
114:      * @param     PropelPDO $con an optional connection object
115:      *
116:      * @return   Pubprop|Pubprop[]|mixed the result, formatted by the current formatter
117:      */
118:     public function findPk($key, $con = null)
119:     {
120:         if ($key === null) {
121:             return null;
122:         }
123:         if ((null !== ($obj = PubpropPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
124:             // the object is alredy in the instance pool
125:             return $obj;
126:         }
127:         if ($con === null) {
128:             $con = Propel::getConnection(PubpropPeer::DATABASE_NAME, Propel::CONNECTION_READ);
129:         }
130:         $this->basePreSelect($con);
131:         if ($this->formatter || $this->modelAlias || $this->with || $this->select
132:          || $this->selectColumns || $this->asColumns || $this->selectModifiers
133:          || $this->map || $this->having || $this->joins) {
134:             return $this->findPkComplex($key, $con);
135:         } else {
136:             return $this->findPkSimple($key, $con);
137:         }
138:     }
139: 
140:     /**
141:      * Alias of findPk to use instance pooling
142:      *
143:      * @param     mixed $key Primary key to use for the query
144:      * @param     PropelPDO $con A connection object
145:      *
146:      * @return                 Pubprop A model object, or null if the key is not found
147:      * @throws PropelException
148:      */
149:      public function findOneByPubpropId($key, $con = null)
150:      {
151:         return $this->findPk($key, $con);
152:      }
153: 
154:     /**
155:      * Find object by primary key using raw SQL to go fast.
156:      * Bypass doSelect() and the object formatter by using generated code.
157:      *
158:      * @param     mixed $key Primary key to use for the query
159:      * @param     PropelPDO $con A connection object
160:      *
161:      * @return                 Pubprop A model object, or null if the key is not found
162:      * @throws PropelException
163:      */
164:     protected function findPkSimple($key, $con)
165:     {
166:         $sql = 'SELECT "pubprop_id", "pub_id", "type_id", "value", "rank" FROM "pubprop" WHERE "pubprop_id" = :p0';
167:         try {
168:             $stmt = $con->prepare($sql);
169:             $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
170:             $stmt->execute();
171:         } catch (Exception $e) {
172:             Propel::log($e->getMessage(), Propel::LOG_ERR);
173:             throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
174:         }
175:         $obj = null;
176:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
177:             $obj = new Pubprop();
178:             $obj->hydrate($row);
179:             PubpropPeer::addInstanceToPool($obj, (string) $key);
180:         }
181:         $stmt->closeCursor();
182: 
183:         return $obj;
184:     }
185: 
186:     /**
187:      * Find object by primary key.
188:      *
189:      * @param     mixed $key Primary key to use for the query
190:      * @param     PropelPDO $con A connection object
191:      *
192:      * @return Pubprop|Pubprop[]|mixed the result, formatted by the current formatter
193:      */
194:     protected function findPkComplex($key, $con)
195:     {
196:         // As the query uses a PK condition, no limit(1) is necessary.
197:         $criteria = $this->isKeepQuery() ? clone $this : $this;
198:         $stmt = $criteria
199:             ->filterByPrimaryKey($key)
200:             ->doSelect($con);
201: 
202:         return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
203:     }
204: 
205:     /**
206:      * Find objects by primary key
207:      * <code>
208:      * $objs = $c->findPks(array(12, 56, 832), $con);
209:      * </code>
210:      * @param     array $keys Primary keys to use for the query
211:      * @param     PropelPDO $con an optional connection object
212:      *
213:      * @return PropelObjectCollection|Pubprop[]|mixed the list of results, formatted by the current formatter
214:      */
215:     public function findPks($keys, $con = null)
216:     {
217:         if ($con === null) {
218:             $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
219:         }
220:         $this->basePreSelect($con);
221:         $criteria = $this->isKeepQuery() ? clone $this : $this;
222:         $stmt = $criteria
223:             ->filterByPrimaryKeys($keys)
224:             ->doSelect($con);
225: 
226:         return $criteria->getFormatter()->init($criteria)->format($stmt);
227:     }
228: 
229:     /**
230:      * Filter the query by primary key
231:      *
232:      * @param     mixed $key Primary key to use for the query
233:      *
234:      * @return PubpropQuery The current query, for fluid interface
235:      */
236:     public function filterByPrimaryKey($key)
237:     {
238: 
239:         return $this->addUsingAlias(PubpropPeer::PUBPROP_ID, $key, Criteria::EQUAL);
240:     }
241: 
242:     /**
243:      * Filter the query by a list of primary keys
244:      *
245:      * @param     array $keys The list of primary key to use for the query
246:      *
247:      * @return PubpropQuery The current query, for fluid interface
248:      */
249:     public function filterByPrimaryKeys($keys)
250:     {
251: 
252:         return $this->addUsingAlias(PubpropPeer::PUBPROP_ID, $keys, Criteria::IN);
253:     }
254: 
255:     /**
256:      * Filter the query on the pubprop_id column
257:      *
258:      * Example usage:
259:      * <code>
260:      * $query->filterByPubpropId(1234); // WHERE pubprop_id = 1234
261:      * $query->filterByPubpropId(array(12, 34)); // WHERE pubprop_id IN (12, 34)
262:      * $query->filterByPubpropId(array('min' => 12)); // WHERE pubprop_id >= 12
263:      * $query->filterByPubpropId(array('max' => 12)); // WHERE pubprop_id <= 12
264:      * </code>
265:      *
266:      * @param     mixed $pubpropId The value to use as filter.
267:      *              Use scalar values for equality.
268:      *              Use array values for in_array() equivalent.
269:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
270:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
271:      *
272:      * @return PubpropQuery The current query, for fluid interface
273:      */
274:     public function filterByPubpropId($pubpropId = null, $comparison = null)
275:     {
276:         if (is_array($pubpropId)) {
277:             $useMinMax = false;
278:             if (isset($pubpropId['min'])) {
279:                 $this->addUsingAlias(PubpropPeer::PUBPROP_ID, $pubpropId['min'], Criteria::GREATER_EQUAL);
280:                 $useMinMax = true;
281:             }
282:             if (isset($pubpropId['max'])) {
283:                 $this->addUsingAlias(PubpropPeer::PUBPROP_ID, $pubpropId['max'], Criteria::LESS_EQUAL);
284:                 $useMinMax = true;
285:             }
286:             if ($useMinMax) {
287:                 return $this;
288:             }
289:             if (null === $comparison) {
290:                 $comparison = Criteria::IN;
291:             }
292:         }
293: 
294:         return $this->addUsingAlias(PubpropPeer::PUBPROP_ID, $pubpropId, $comparison);
295:     }
296: 
297:     /**
298:      * Filter the query on the pub_id column
299:      *
300:      * Example usage:
301:      * <code>
302:      * $query->filterByPubId(1234); // WHERE pub_id = 1234
303:      * $query->filterByPubId(array(12, 34)); // WHERE pub_id IN (12, 34)
304:      * $query->filterByPubId(array('min' => 12)); // WHERE pub_id >= 12
305:      * $query->filterByPubId(array('max' => 12)); // WHERE pub_id <= 12
306:      * </code>
307:      *
308:      * @see       filterByPub()
309:      *
310:      * @param     mixed $pubId The value to use as filter.
311:      *              Use scalar values for equality.
312:      *              Use array values for in_array() equivalent.
313:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
314:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
315:      *
316:      * @return PubpropQuery The current query, for fluid interface
317:      */
318:     public function filterByPubId($pubId = null, $comparison = null)
319:     {
320:         if (is_array($pubId)) {
321:             $useMinMax = false;
322:             if (isset($pubId['min'])) {
323:                 $this->addUsingAlias(PubpropPeer::PUB_ID, $pubId['min'], Criteria::GREATER_EQUAL);
324:                 $useMinMax = true;
325:             }
326:             if (isset($pubId['max'])) {
327:                 $this->addUsingAlias(PubpropPeer::PUB_ID, $pubId['max'], Criteria::LESS_EQUAL);
328:                 $useMinMax = true;
329:             }
330:             if ($useMinMax) {
331:                 return $this;
332:             }
333:             if (null === $comparison) {
334:                 $comparison = Criteria::IN;
335:             }
336:         }
337: 
338:         return $this->addUsingAlias(PubpropPeer::PUB_ID, $pubId, $comparison);
339:     }
340: 
341:     /**
342:      * Filter the query on the type_id column
343:      *
344:      * Example usage:
345:      * <code>
346:      * $query->filterByTypeId(1234); // WHERE type_id = 1234
347:      * $query->filterByTypeId(array(12, 34)); // WHERE type_id IN (12, 34)
348:      * $query->filterByTypeId(array('min' => 12)); // WHERE type_id >= 12
349:      * $query->filterByTypeId(array('max' => 12)); // WHERE type_id <= 12
350:      * </code>
351:      *
352:      * @see       filterByCvterm()
353:      *
354:      * @param     mixed $typeId The value to use as filter.
355:      *              Use scalar values for equality.
356:      *              Use array values for in_array() equivalent.
357:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
358:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
359:      *
360:      * @return PubpropQuery The current query, for fluid interface
361:      */
362:     public function filterByTypeId($typeId = null, $comparison = null)
363:     {
364:         if (is_array($typeId)) {
365:             $useMinMax = false;
366:             if (isset($typeId['min'])) {
367:                 $this->addUsingAlias(PubpropPeer::TYPE_ID, $typeId['min'], Criteria::GREATER_EQUAL);
368:                 $useMinMax = true;
369:             }
370:             if (isset($typeId['max'])) {
371:                 $this->addUsingAlias(PubpropPeer::TYPE_ID, $typeId['max'], Criteria::LESS_EQUAL);
372:                 $useMinMax = true;
373:             }
374:             if ($useMinMax) {
375:                 return $this;
376:             }
377:             if (null === $comparison) {
378:                 $comparison = Criteria::IN;
379:             }
380:         }
381: 
382:         return $this->addUsingAlias(PubpropPeer::TYPE_ID, $typeId, $comparison);
383:     }
384: 
385:     /**
386:      * Filter the query on the value column
387:      *
388:      * Example usage:
389:      * <code>
390:      * $query->filterByValue('fooValue');   // WHERE value = 'fooValue'
391:      * $query->filterByValue('%fooValue%'); // WHERE value LIKE '%fooValue%'
392:      * </code>
393:      *
394:      * @param     string $value The value to use as filter.
395:      *              Accepts wildcards (* and % trigger a LIKE)
396:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
397:      *
398:      * @return PubpropQuery The current query, for fluid interface
399:      */
400:     public function filterByValue($value = null, $comparison = null)
401:     {
402:         if (null === $comparison) {
403:             if (is_array($value)) {
404:                 $comparison = Criteria::IN;
405:             } elseif (preg_match('/[\%\*]/', $value)) {
406:                 $value = str_replace('*', '%', $value);
407:                 $comparison = Criteria::LIKE;
408:             }
409:         }
410: 
411:         return $this->addUsingAlias(PubpropPeer::VALUE, $value, $comparison);
412:     }
413: 
414:     /**
415:      * Filter the query on the rank column
416:      *
417:      * Example usage:
418:      * <code>
419:      * $query->filterByRank(1234); // WHERE rank = 1234
420:      * $query->filterByRank(array(12, 34)); // WHERE rank IN (12, 34)
421:      * $query->filterByRank(array('min' => 12)); // WHERE rank >= 12
422:      * $query->filterByRank(array('max' => 12)); // WHERE rank <= 12
423:      * </code>
424:      *
425:      * @param     mixed $rank The value to use as filter.
426:      *              Use scalar values for equality.
427:      *              Use array values for in_array() equivalent.
428:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
429:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
430:      *
431:      * @return PubpropQuery The current query, for fluid interface
432:      */
433:     public function filterByRank($rank = null, $comparison = null)
434:     {
435:         if (is_array($rank)) {
436:             $useMinMax = false;
437:             if (isset($rank['min'])) {
438:                 $this->addUsingAlias(PubpropPeer::RANK, $rank['min'], Criteria::GREATER_EQUAL);
439:                 $useMinMax = true;
440:             }
441:             if (isset($rank['max'])) {
442:                 $this->addUsingAlias(PubpropPeer::RANK, $rank['max'], Criteria::LESS_EQUAL);
443:                 $useMinMax = true;
444:             }
445:             if ($useMinMax) {
446:                 return $this;
447:             }
448:             if (null === $comparison) {
449:                 $comparison = Criteria::IN;
450:             }
451:         }
452: 
453:         return $this->addUsingAlias(PubpropPeer::RANK, $rank, $comparison);
454:     }
455: 
456:     /**
457:      * Filter the query by a related Pub object
458:      *
459:      * @param   Pub|PropelObjectCollection $pub The related object(s) to use as filter
460:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
461:      *
462:      * @return                 PubpropQuery The current query, for fluid interface
463:      * @throws PropelException - if the provided filter is invalid.
464:      */
465:     public function filterByPub($pub, $comparison = null)
466:     {
467:         if ($pub instanceof Pub) {
468:             return $this
469:                 ->addUsingAlias(PubpropPeer::PUB_ID, $pub->getPubId(), $comparison);
470:         } elseif ($pub instanceof PropelObjectCollection) {
471:             if (null === $comparison) {
472:                 $comparison = Criteria::IN;
473:             }
474: 
475:             return $this
476:                 ->addUsingAlias(PubpropPeer::PUB_ID, $pub->toKeyValue('PrimaryKey', 'PubId'), $comparison);
477:         } else {
478:             throw new PropelException('filterByPub() only accepts arguments of type Pub or PropelCollection');
479:         }
480:     }
481: 
482:     /**
483:      * Adds a JOIN clause to the query using the Pub relation
484:      *
485:      * @param     string $relationAlias optional alias for the relation
486:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
487:      *
488:      * @return PubpropQuery The current query, for fluid interface
489:      */
490:     public function joinPub($relationAlias = null, $joinType = Criteria::INNER_JOIN)
491:     {
492:         $tableMap = $this->getTableMap();
493:         $relationMap = $tableMap->getRelation('Pub');
494: 
495:         // create a ModelJoin object for this join
496:         $join = new ModelJoin();
497:         $join->setJoinType($joinType);
498:         $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
499:         if ($previousJoin = $this->getPreviousJoin()) {
500:             $join->setPreviousJoin($previousJoin);
501:         }
502: 
503:         // add the ModelJoin to the current object
504:         if ($relationAlias) {
505:             $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
506:             $this->addJoinObject($join, $relationAlias);
507:         } else {
508:             $this->addJoinObject($join, 'Pub');
509:         }
510: 
511:         return $this;
512:     }
513: 
514:     /**
515:      * Use the Pub relation Pub object
516:      *
517:      * @see       useQuery()
518:      *
519:      * @param     string $relationAlias optional alias for the relation,
520:      *                                   to be used as main alias in the secondary query
521:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
522:      *
523:      * @return   \cli_db\propel\PubQuery A secondary query class using the current class as primary query
524:      */
525:     public function usePubQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
526:     {
527:         return $this
528:             ->joinPub($relationAlias, $joinType)
529:             ->useQuery($relationAlias ? $relationAlias : 'Pub', '\cli_db\propel\PubQuery');
530:     }
531: 
532:     /**
533:      * Filter the query by a related Cvterm object
534:      *
535:      * @param   Cvterm|PropelObjectCollection $cvterm The related object(s) to use as filter
536:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
537:      *
538:      * @return                 PubpropQuery The current query, for fluid interface
539:      * @throws PropelException - if the provided filter is invalid.
540:      */
541:     public function filterByCvterm($cvterm, $comparison = null)
542:     {
543:         if ($cvterm instanceof Cvterm) {
544:             return $this
545:                 ->addUsingAlias(PubpropPeer::TYPE_ID, $cvterm->getCvtermId(), $comparison);
546:         } elseif ($cvterm instanceof PropelObjectCollection) {
547:             if (null === $comparison) {
548:                 $comparison = Criteria::IN;
549:             }
550: 
551:             return $this
552:                 ->addUsingAlias(PubpropPeer::TYPE_ID, $cvterm->toKeyValue('PrimaryKey', 'CvtermId'), $comparison);
553:         } else {
554:             throw new PropelException('filterByCvterm() only accepts arguments of type Cvterm or PropelCollection');
555:         }
556:     }
557: 
558:     /**
559:      * Adds a JOIN clause to the query using the Cvterm relation
560:      *
561:      * @param     string $relationAlias optional alias for the relation
562:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
563:      *
564:      * @return PubpropQuery The current query, for fluid interface
565:      */
566:     public function joinCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)
567:     {
568:         $tableMap = $this->getTableMap();
569:         $relationMap = $tableMap->getRelation('Cvterm');
570: 
571:         // create a ModelJoin object for this join
572:         $join = new ModelJoin();
573:         $join->setJoinType($joinType);
574:         $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
575:         if ($previousJoin = $this->getPreviousJoin()) {
576:             $join->setPreviousJoin($previousJoin);
577:         }
578: 
579:         // add the ModelJoin to the current object
580:         if ($relationAlias) {
581:             $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
582:             $this->addJoinObject($join, $relationAlias);
583:         } else {
584:             $this->addJoinObject($join, 'Cvterm');
585:         }
586: 
587:         return $this;
588:     }
589: 
590:     /**
591:      * Use the Cvterm relation Cvterm object
592:      *
593:      * @see       useQuery()
594:      *
595:      * @param     string $relationAlias optional alias for the relation,
596:      *                                   to be used as main alias in the secondary query
597:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
598:      *
599:      * @return   \cli_db\propel\CvtermQuery A secondary query class using the current class as primary query
600:      */
601:     public function useCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
602:     {
603:         return $this
604:             ->joinCvterm($relationAlias, $joinType)
605:             ->useQuery($relationAlias ? $relationAlias : 'Cvterm', '\cli_db\propel\CvtermQuery');
606:     }
607: 
608:     /**
609:      * Exclude object from result
610:      *
611:      * @param   Pubprop $pubprop Object to remove from the list of results
612:      *
613:      * @return PubpropQuery The current query, for fluid interface
614:      */
615:     public function prune($pubprop = null)
616:     {
617:         if ($pubprop) {
618:             $this->addUsingAlias(PubpropPeer::PUBPROP_ID, $pubprop->getPubpropId(), Criteria::NOT_EQUAL);
619:         }
620: 
621:         return $this;
622:     }
623: 
624: }
625: 
tbro API documentation generated by ApiGen 2.8.0