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