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