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 \BasePeer;
   6: use \Criteria;
   7: use \PDO;
   8: use \PDOStatement;
   9: use \Propel;
  10: use \PropelException;
  11: use \PropelPDO;
  12: use cli_db\propel\AcquisitionPeer;
  13: use cli_db\propel\AnalysisPeer;
  14: use cli_db\propel\ContactPeer;
  15: use cli_db\propel\ProtocolPeer;
  16: use cli_db\propel\Quantification;
  17: use cli_db\propel\QuantificationPeer;
  18: use cli_db\propel\map\QuantificationTableMap;
  19: 
  20: /**
  21:  * Base static class for performing query and update operations on the 'quantification' table.
  22:  *
  23:  *
  24:  *
  25:  * @package propel.generator.cli_db.om
  26:  */
  27: abstract class BaseQuantificationPeer
  28: {
  29: 
  30:     /** the default database name for this class */
  31:     const DATABASE_NAME = 'cli_db';
  32: 
  33:     /** the table name for this class */
  34:     const TABLE_NAME = 'quantification';
  35: 
  36:     /** the related Propel class for this table */
  37:     const OM_CLASS = 'cli_db\\propel\\Quantification';
  38: 
  39:     /** the related TableMap class for this table */
  40:     const TM_CLASS = 'QuantificationTableMap';
  41: 
  42:     /** The total number of columns. */
  43:     const NUM_COLUMNS = 8;
  44: 
  45:     /** The number of lazy-loaded columns. */
  46:     const NUM_LAZY_LOAD_COLUMNS = 0;
  47: 
  48:     /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
  49:     const NUM_HYDRATE_COLUMNS = 8;
  50: 
  51:     /** the column name for the quantification_id field */
  52:     const QUANTIFICATION_ID = 'quantification.quantification_id';
  53: 
  54:     /** the column name for the acquisition_id field */
  55:     const ACQUISITION_ID = 'quantification.acquisition_id';
  56: 
  57:     /** the column name for the operator_id field */
  58:     const OPERATOR_ID = 'quantification.operator_id';
  59: 
  60:     /** the column name for the protocol_id field */
  61:     const PROTOCOL_ID = 'quantification.protocol_id';
  62: 
  63:     /** the column name for the analysis_id field */
  64:     const ANALYSIS_ID = 'quantification.analysis_id';
  65: 
  66:     /** the column name for the quantificationdate field */
  67:     const QUANTIFICATIONDATE = 'quantification.quantificationdate';
  68: 
  69:     /** the column name for the name field */
  70:     const NAME = 'quantification.name';
  71: 
  72:     /** the column name for the uri field */
  73:     const URI = 'quantification.uri';
  74: 
  75:     /** The default string format for model objects of the related table **/
  76:     const DEFAULT_STRING_FORMAT = 'YAML';
  77: 
  78:     /**
  79:      * An identiy map to hold any loaded instances of Quantification objects.
  80:      * This must be public so that other peer classes can access this when hydrating from JOIN
  81:      * queries.
  82:      * @var        array Quantification[]
  83:      */
  84:     public static $instances = array();
  85: 
  86: 
  87:     /**
  88:      * holds an array of fieldnames
  89:      *
  90:      * first dimension keys are the type constants
  91:      * e.g. QuantificationPeer::$fieldNames[QuantificationPeer::TYPE_PHPNAME][0] = 'Id'
  92:      */
  93:     protected static $fieldNames = array (
  94:         BasePeer::TYPE_PHPNAME => array ('QuantificationId', 'AcquisitionId', 'OperatorId', 'ProtocolId', 'AnalysisId', 'Quantificationdate', 'Name', 'Uri', ),
  95:         BasePeer::TYPE_STUDLYPHPNAME => array ('quantificationId', 'acquisitionId', 'operatorId', 'protocolId', 'analysisId', 'quantificationdate', 'name', 'uri', ),
  96:         BasePeer::TYPE_COLNAME => array (QuantificationPeer::QUANTIFICATION_ID, QuantificationPeer::ACQUISITION_ID, QuantificationPeer::OPERATOR_ID, QuantificationPeer::PROTOCOL_ID, QuantificationPeer::ANALYSIS_ID, QuantificationPeer::QUANTIFICATIONDATE, QuantificationPeer::NAME, QuantificationPeer::URI, ),
  97:         BasePeer::TYPE_RAW_COLNAME => array ('QUANTIFICATION_ID', 'ACQUISITION_ID', 'OPERATOR_ID', 'PROTOCOL_ID', 'ANALYSIS_ID', 'QUANTIFICATIONDATE', 'NAME', 'URI', ),
  98:         BasePeer::TYPE_FIELDNAME => array ('quantification_id', 'acquisition_id', 'operator_id', 'protocol_id', 'analysis_id', 'quantificationdate', 'name', 'uri', ),
  99:         BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
 100:     );
 101: 
 102:     /**
 103:      * holds an array of keys for quick access to the fieldnames array
 104:      *
 105:      * first dimension keys are the type constants
 106:      * e.g. QuantificationPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
 107:      */
 108:     protected static $fieldKeys = array (
 109:         BasePeer::TYPE_PHPNAME => array ('QuantificationId' => 0, 'AcquisitionId' => 1, 'OperatorId' => 2, 'ProtocolId' => 3, 'AnalysisId' => 4, 'Quantificationdate' => 5, 'Name' => 6, 'Uri' => 7, ),
 110:         BasePeer::TYPE_STUDLYPHPNAME => array ('quantificationId' => 0, 'acquisitionId' => 1, 'operatorId' => 2, 'protocolId' => 3, 'analysisId' => 4, 'quantificationdate' => 5, 'name' => 6, 'uri' => 7, ),
 111:         BasePeer::TYPE_COLNAME => array (QuantificationPeer::QUANTIFICATION_ID => 0, QuantificationPeer::ACQUISITION_ID => 1, QuantificationPeer::OPERATOR_ID => 2, QuantificationPeer::PROTOCOL_ID => 3, QuantificationPeer::ANALYSIS_ID => 4, QuantificationPeer::QUANTIFICATIONDATE => 5, QuantificationPeer::NAME => 6, QuantificationPeer::URI => 7, ),
 112:         BasePeer::TYPE_RAW_COLNAME => array ('QUANTIFICATION_ID' => 0, 'ACQUISITION_ID' => 1, 'OPERATOR_ID' => 2, 'PROTOCOL_ID' => 3, 'ANALYSIS_ID' => 4, 'QUANTIFICATIONDATE' => 5, 'NAME' => 6, 'URI' => 7, ),
 113:         BasePeer::TYPE_FIELDNAME => array ('quantification_id' => 0, 'acquisition_id' => 1, 'operator_id' => 2, 'protocol_id' => 3, 'analysis_id' => 4, 'quantificationdate' => 5, 'name' => 6, 'uri' => 7, ),
 114:         BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
 115:     );
 116: 
 117:     /**
 118:      * Translates a fieldname to another type
 119:      *
 120:      * @param      string $name field name
 121:      * @param      string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
 122:      *                         BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
 123:      * @param      string $toType   One of the class type constants
 124:      * @return string          translated name of the field.
 125:      * @throws PropelException - if the specified name could not be found in the fieldname mappings.
 126:      */
 127:     public static function translateFieldName($name, $fromType, $toType)
 128:     {
 129:         $toNames = QuantificationPeer::getFieldNames($toType);
 130:         $key = isset(QuantificationPeer::$fieldKeys[$fromType][$name]) ? QuantificationPeer::$fieldKeys[$fromType][$name] : null;
 131:         if ($key === null) {
 132:             throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(QuantificationPeer::$fieldKeys[$fromType], true));
 133:         }
 134: 
 135:         return $toNames[$key];
 136:     }
 137: 
 138:     /**
 139:      * Returns an array of field names.
 140:      *
 141:      * @param      string $type The type of fieldnames to return:
 142:      *                      One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
 143:      *                      BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
 144:      * @return array           A list of field names
 145:      * @throws PropelException - if the type is not valid.
 146:      */
 147:     public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
 148:     {
 149:         if (!array_key_exists($type, QuantificationPeer::$fieldNames)) {
 150:             throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
 151:         }
 152: 
 153:         return QuantificationPeer::$fieldNames[$type];
 154:     }
 155: 
 156:     /**
 157:      * Convenience method which changes table.column to alias.column.
 158:      *
 159:      * Using this method you can maintain SQL abstraction while using column aliases.
 160:      * <code>
 161:      *      $c->addAlias("alias1", TablePeer::TABLE_NAME);
 162:      *      $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
 163:      * </code>
 164:      * @param      string $alias The alias for the current table.
 165:      * @param      string $column The column name for current table. (i.e. QuantificationPeer::COLUMN_NAME).
 166:      * @return string
 167:      */
 168:     public static function alias($alias, $column)
 169:     {
 170:         return str_replace(QuantificationPeer::TABLE_NAME.'.', $alias.'.', $column);
 171:     }
 172: 
 173:     /**
 174:      * Add all the columns needed to create a new object.
 175:      *
 176:      * Note: any columns that were marked with lazyLoad="true" in the
 177:      * XML schema will not be added to the select list and only loaded
 178:      * on demand.
 179:      *
 180:      * @param      Criteria $criteria object containing the columns to add.
 181:      * @param      string   $alias    optional table alias
 182:      * @throws PropelException Any exceptions caught during processing will be
 183:      *       rethrown wrapped into a PropelException.
 184:      */
 185:     public static function addSelectColumns(Criteria $criteria, $alias = null)
 186:     {
 187:         if (null === $alias) {
 188:             $criteria->addSelectColumn(QuantificationPeer::QUANTIFICATION_ID);
 189:             $criteria->addSelectColumn(QuantificationPeer::ACQUISITION_ID);
 190:             $criteria->addSelectColumn(QuantificationPeer::OPERATOR_ID);
 191:             $criteria->addSelectColumn(QuantificationPeer::PROTOCOL_ID);
 192:             $criteria->addSelectColumn(QuantificationPeer::ANALYSIS_ID);
 193:             $criteria->addSelectColumn(QuantificationPeer::QUANTIFICATIONDATE);
 194:             $criteria->addSelectColumn(QuantificationPeer::NAME);
 195:             $criteria->addSelectColumn(QuantificationPeer::URI);
 196:         } else {
 197:             $criteria->addSelectColumn($alias . '.quantification_id');
 198:             $criteria->addSelectColumn($alias . '.acquisition_id');
 199:             $criteria->addSelectColumn($alias . '.operator_id');
 200:             $criteria->addSelectColumn($alias . '.protocol_id');
 201:             $criteria->addSelectColumn($alias . '.analysis_id');
 202:             $criteria->addSelectColumn($alias . '.quantificationdate');
 203:             $criteria->addSelectColumn($alias . '.name');
 204:             $criteria->addSelectColumn($alias . '.uri');
 205:         }
 206:     }
 207: 
 208:     /**
 209:      * Returns the number of rows matching criteria.
 210:      *
 211:      * @param      Criteria $criteria
 212:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
 213:      * @param      PropelPDO $con
 214:      * @return int Number of matching rows.
 215:      */
 216:     public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
 217:     {
 218:         // we may modify criteria, so copy it first
 219:         $criteria = clone $criteria;
 220: 
 221:         // We need to set the primary table name, since in the case that there are no WHERE columns
 222:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
 223:         // tables go into the FROM clause.
 224:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
 225: 
 226:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
 227:             $criteria->setDistinct();
 228:         }
 229: 
 230:         if (!$criteria->hasSelectClause()) {
 231:             QuantificationPeer::addSelectColumns($criteria);
 232:         }
 233: 
 234:         $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
 235:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME); // Set the correct dbName
 236: 
 237:         if ($con === null) {
 238:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
 239:         }
 240:         // BasePeer returns a PDOStatement
 241:         $stmt = BasePeer::doCount($criteria, $con);
 242: 
 243:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 244:             $count = (int) $row[0];
 245:         } else {
 246:             $count = 0; // no rows returned; we infer that means 0 matches.
 247:         }
 248:         $stmt->closeCursor();
 249: 
 250:         return $count;
 251:     }
 252:     /**
 253:      * Selects one object from the DB.
 254:      *
 255:      * @param      Criteria $criteria object used to create the SELECT statement.
 256:      * @param      PropelPDO $con
 257:      * @return                 Quantification
 258:      * @throws PropelException Any exceptions caught during processing will be
 259:      *       rethrown wrapped into a PropelException.
 260:      */
 261:     public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
 262:     {
 263:         $critcopy = clone $criteria;
 264:         $critcopy->setLimit(1);
 265:         $objects = QuantificationPeer::doSelect($critcopy, $con);
 266:         if ($objects) {
 267:             return $objects[0];
 268:         }
 269: 
 270:         return null;
 271:     }
 272:     /**
 273:      * Selects several row from the DB.
 274:      *
 275:      * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
 276:      * @param      PropelPDO $con
 277:      * @return array           Array of selected Objects
 278:      * @throws PropelException Any exceptions caught during processing will be
 279:      *       rethrown wrapped into a PropelException.
 280:      */
 281:     public static function doSelect(Criteria $criteria, PropelPDO $con = null)
 282:     {
 283:         return QuantificationPeer::populateObjects(QuantificationPeer::doSelectStmt($criteria, $con));
 284:     }
 285:     /**
 286:      * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
 287:      *
 288:      * Use this method directly if you want to work with an executed statement directly (for example
 289:      * to perform your own object hydration).
 290:      *
 291:      * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
 292:      * @param      PropelPDO $con The connection to use
 293:      * @throws PropelException Any exceptions caught during processing will be
 294:      *       rethrown wrapped into a PropelException.
 295:      * @return PDOStatement The executed PDOStatement object.
 296:      * @see        BasePeer::doSelect()
 297:      */
 298:     public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
 299:     {
 300:         if ($con === null) {
 301:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
 302:         }
 303: 
 304:         if (!$criteria->hasSelectClause()) {
 305:             $criteria = clone $criteria;
 306:             QuantificationPeer::addSelectColumns($criteria);
 307:         }
 308: 
 309:         // Set the correct dbName
 310:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 311: 
 312:         // BasePeer returns a PDOStatement
 313:         return BasePeer::doSelect($criteria, $con);
 314:     }
 315:     /**
 316:      * Adds an object to the instance pool.
 317:      *
 318:      * Propel keeps cached copies of objects in an instance pool when they are retrieved
 319:      * from the database.  In some cases -- especially when you override doSelect*()
 320:      * methods in your stub classes -- you may need to explicitly add objects
 321:      * to the cache in order to ensure that the same objects are always returned by doSelect*()
 322:      * and retrieveByPK*() calls.
 323:      *
 324:      * @param      Quantification $obj A Quantification object.
 325:      * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
 326:      */
 327:     public static function addInstanceToPool($obj, $key = null)
 328:     {
 329:         if (Propel::isInstancePoolingEnabled()) {
 330:             if ($key === null) {
 331:                 $key = (string) $obj->getQuantificationId();
 332:             } // if key === null
 333:             QuantificationPeer::$instances[$key] = $obj;
 334:         }
 335:     }
 336: 
 337:     /**
 338:      * Removes an object from the instance pool.
 339:      *
 340:      * Propel keeps cached copies of objects in an instance pool when they are retrieved
 341:      * from the database.  In some cases -- especially when you override doDelete
 342:      * methods in your stub classes -- you may need to explicitly remove objects
 343:      * from the cache in order to prevent returning objects that no longer exist.
 344:      *
 345:      * @param      mixed $value A Quantification object or a primary key value.
 346:      *
 347:      * @return void
 348:      * @throws PropelException - if the value is invalid.
 349:      */
 350:     public static function removeInstanceFromPool($value)
 351:     {
 352:         if (Propel::isInstancePoolingEnabled() && $value !== null) {
 353:             if (is_object($value) && $value instanceof Quantification) {
 354:                 $key = (string) $value->getQuantificationId();
 355:             } elseif (is_scalar($value)) {
 356:                 // assume we've been passed a primary key
 357:                 $key = (string) $value;
 358:             } else {
 359:                 $e = new PropelException("Invalid value passed to removeInstanceFromPool().  Expected primary key or Quantification object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
 360:                 throw $e;
 361:             }
 362: 
 363:             unset(QuantificationPeer::$instances[$key]);
 364:         }
 365:     } // removeInstanceFromPool()
 366: 
 367:     /**
 368:      * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
 369:      *
 370:      * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
 371:      * a multi-column primary key, a serialize()d version of the primary key will be returned.
 372:      *
 373:      * @param      string $key The key (@see getPrimaryKeyHash()) for this instance.
 374:      * @return   Quantification Found object or null if 1) no instance exists for specified key or 2) instance pooling has been disabled.
 375:      * @see        getPrimaryKeyHash()
 376:      */
 377:     public static function getInstanceFromPool($key)
 378:     {
 379:         if (Propel::isInstancePoolingEnabled()) {
 380:             if (isset(QuantificationPeer::$instances[$key])) {
 381:                 return QuantificationPeer::$instances[$key];
 382:             }
 383:         }
 384: 
 385:         return null; // just to be explicit
 386:     }
 387: 
 388:     /**
 389:      * Clear the instance pool.
 390:      *
 391:      * @return void
 392:      */
 393:     public static function clearInstancePool($and_clear_all_references = false)
 394:     {
 395:       if ($and_clear_all_references)
 396:       {
 397:         foreach (QuantificationPeer::$instances as $instance)
 398:         {
 399:           $instance->clearAllReferences(true);
 400:         }
 401:       }
 402:         QuantificationPeer::$instances = array();
 403:     }
 404: 
 405:     /**
 406:      * Method to invalidate the instance pool of all tables related to quantification
 407:      * by a foreign key with ON DELETE CASCADE
 408:      */
 409:     public static function clearRelatedInstancePool()
 410:     {
 411:     }
 412: 
 413:     /**
 414:      * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
 415:      *
 416:      * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
 417:      * a multi-column primary key, a serialize()d version of the primary key will be returned.
 418:      *
 419:      * @param      array $row PropelPDO resultset row.
 420:      * @param      int $startcol The 0-based offset for reading from the resultset row.
 421:      * @return string A string version of PK or null if the components of primary key in result array are all null.
 422:      */
 423:     public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
 424:     {
 425:         // If the PK cannot be derived from the row, return null.
 426:         if ($row[$startcol] === null) {
 427:             return null;
 428:         }
 429: 
 430:         return (string) $row[$startcol];
 431:     }
 432: 
 433:     /**
 434:      * Retrieves the primary key from the DB resultset row
 435:      * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
 436:      * a multi-column primary key, an array of the primary key columns will be returned.
 437:      *
 438:      * @param      array $row PropelPDO resultset row.
 439:      * @param      int $startcol The 0-based offset for reading from the resultset row.
 440:      * @return mixed The primary key of the row
 441:      */
 442:     public static function getPrimaryKeyFromRow($row, $startcol = 0)
 443:     {
 444: 
 445:         return (int) $row[$startcol];
 446:     }
 447: 
 448:     /**
 449:      * The returned array will contain objects of the default type or
 450:      * objects that inherit from the default.
 451:      *
 452:      * @throws PropelException Any exceptions caught during processing will be
 453:      *       rethrown wrapped into a PropelException.
 454:      */
 455:     public static function populateObjects(PDOStatement $stmt)
 456:     {
 457:         $results = array();
 458: 
 459:         // set the class once to avoid overhead in the loop
 460:         $cls = QuantificationPeer::getOMClass();
 461:         // populate the object(s)
 462:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 463:             $key = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
 464:             if (null !== ($obj = QuantificationPeer::getInstanceFromPool($key))) {
 465:                 // We no longer rehydrate the object, since this can cause data loss.
 466:                 // See http://www.propelorm.org/ticket/509
 467:                 // $obj->hydrate($row, 0, true); // rehydrate
 468:                 $results[] = $obj;
 469:             } else {
 470:                 $obj = new $cls();
 471:                 $obj->hydrate($row);
 472:                 $results[] = $obj;
 473:                 QuantificationPeer::addInstanceToPool($obj, $key);
 474:             } // if key exists
 475:         }
 476:         $stmt->closeCursor();
 477: 
 478:         return $results;
 479:     }
 480:     /**
 481:      * Populates an object of the default type or an object that inherit from the default.
 482:      *
 483:      * @param      array $row PropelPDO resultset row.
 484:      * @param      int $startcol The 0-based offset for reading from the resultset row.
 485:      * @throws PropelException Any exceptions caught during processing will be
 486:      *       rethrown wrapped into a PropelException.
 487:      * @return array (Quantification object, last column rank)
 488:      */
 489:     public static function populateObject($row, $startcol = 0)
 490:     {
 491:         $key = QuantificationPeer::getPrimaryKeyHashFromRow($row, $startcol);
 492:         if (null !== ($obj = QuantificationPeer::getInstanceFromPool($key))) {
 493:             // We no longer rehydrate the object, since this can cause data loss.
 494:             // See http://www.propelorm.org/ticket/509
 495:             // $obj->hydrate($row, $startcol, true); // rehydrate
 496:             $col = $startcol + QuantificationPeer::NUM_HYDRATE_COLUMNS;
 497:         } else {
 498:             $cls = QuantificationPeer::OM_CLASS;
 499:             $obj = new $cls();
 500:             $col = $obj->hydrate($row, $startcol);
 501:             QuantificationPeer::addInstanceToPool($obj, $key);
 502:         }
 503: 
 504:         return array($obj, $col);
 505:     }
 506: 
 507: 
 508:     /**
 509:      * Returns the number of rows matching criteria, joining the related Acquisition table
 510:      *
 511:      * @param      Criteria $criteria
 512:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
 513:      * @param      PropelPDO $con
 514:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 515:      * @return int Number of matching rows.
 516:      */
 517:     public static function doCountJoinAcquisition(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
 518:     {
 519:         // we're going to modify criteria, so copy it first
 520:         $criteria = clone $criteria;
 521: 
 522:         // We need to set the primary table name, since in the case that there are no WHERE columns
 523:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
 524:         // tables go into the FROM clause.
 525:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
 526: 
 527:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
 528:             $criteria->setDistinct();
 529:         }
 530: 
 531:         if (!$criteria->hasSelectClause()) {
 532:             QuantificationPeer::addSelectColumns($criteria);
 533:         }
 534: 
 535:         $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
 536: 
 537:         // Set the correct dbName
 538:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 539: 
 540:         if ($con === null) {
 541:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
 542:         }
 543: 
 544:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
 545: 
 546:         $stmt = BasePeer::doCount($criteria, $con);
 547: 
 548:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 549:             $count = (int) $row[0];
 550:         } else {
 551:             $count = 0; // no rows returned; we infer that means 0 matches.
 552:         }
 553:         $stmt->closeCursor();
 554: 
 555:         return $count;
 556:     }
 557: 
 558: 
 559:     /**
 560:      * Returns the number of rows matching criteria, joining the related Analysis table
 561:      *
 562:      * @param      Criteria $criteria
 563:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
 564:      * @param      PropelPDO $con
 565:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 566:      * @return int Number of matching rows.
 567:      */
 568:     public static function doCountJoinAnalysis(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
 569:     {
 570:         // we're going to modify criteria, so copy it first
 571:         $criteria = clone $criteria;
 572: 
 573:         // We need to set the primary table name, since in the case that there are no WHERE columns
 574:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
 575:         // tables go into the FROM clause.
 576:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
 577: 
 578:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
 579:             $criteria->setDistinct();
 580:         }
 581: 
 582:         if (!$criteria->hasSelectClause()) {
 583:             QuantificationPeer::addSelectColumns($criteria);
 584:         }
 585: 
 586:         $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
 587: 
 588:         // Set the correct dbName
 589:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 590: 
 591:         if ($con === null) {
 592:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
 593:         }
 594: 
 595:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
 596: 
 597:         $stmt = BasePeer::doCount($criteria, $con);
 598: 
 599:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 600:             $count = (int) $row[0];
 601:         } else {
 602:             $count = 0; // no rows returned; we infer that means 0 matches.
 603:         }
 604:         $stmt->closeCursor();
 605: 
 606:         return $count;
 607:     }
 608: 
 609: 
 610:     /**
 611:      * Returns the number of rows matching criteria, joining the related Contact table
 612:      *
 613:      * @param      Criteria $criteria
 614:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
 615:      * @param      PropelPDO $con
 616:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 617:      * @return int Number of matching rows.
 618:      */
 619:     public static function doCountJoinContact(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
 620:     {
 621:         // we're going to modify criteria, so copy it first
 622:         $criteria = clone $criteria;
 623: 
 624:         // We need to set the primary table name, since in the case that there are no WHERE columns
 625:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
 626:         // tables go into the FROM clause.
 627:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
 628: 
 629:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
 630:             $criteria->setDistinct();
 631:         }
 632: 
 633:         if (!$criteria->hasSelectClause()) {
 634:             QuantificationPeer::addSelectColumns($criteria);
 635:         }
 636: 
 637:         $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
 638: 
 639:         // Set the correct dbName
 640:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 641: 
 642:         if ($con === null) {
 643:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
 644:         }
 645: 
 646:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
 647: 
 648:         $stmt = BasePeer::doCount($criteria, $con);
 649: 
 650:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 651:             $count = (int) $row[0];
 652:         } else {
 653:             $count = 0; // no rows returned; we infer that means 0 matches.
 654:         }
 655:         $stmt->closeCursor();
 656: 
 657:         return $count;
 658:     }
 659: 
 660: 
 661:     /**
 662:      * Returns the number of rows matching criteria, joining the related Protocol table
 663:      *
 664:      * @param      Criteria $criteria
 665:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
 666:      * @param      PropelPDO $con
 667:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 668:      * @return int Number of matching rows.
 669:      */
 670:     public static function doCountJoinProtocol(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
 671:     {
 672:         // we're going to modify criteria, so copy it first
 673:         $criteria = clone $criteria;
 674: 
 675:         // We need to set the primary table name, since in the case that there are no WHERE columns
 676:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
 677:         // tables go into the FROM clause.
 678:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
 679: 
 680:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
 681:             $criteria->setDistinct();
 682:         }
 683: 
 684:         if (!$criteria->hasSelectClause()) {
 685:             QuantificationPeer::addSelectColumns($criteria);
 686:         }
 687: 
 688:         $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
 689: 
 690:         // Set the correct dbName
 691:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 692: 
 693:         if ($con === null) {
 694:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
 695:         }
 696: 
 697:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
 698: 
 699:         $stmt = BasePeer::doCount($criteria, $con);
 700: 
 701:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 702:             $count = (int) $row[0];
 703:         } else {
 704:             $count = 0; // no rows returned; we infer that means 0 matches.
 705:         }
 706:         $stmt->closeCursor();
 707: 
 708:         return $count;
 709:     }
 710: 
 711: 
 712:     /**
 713:      * Selects a collection of Quantification objects pre-filled with their Acquisition objects.
 714:      * @param      Criteria  $criteria
 715:      * @param      PropelPDO $con
 716:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 717:      * @return array           Array of Quantification objects.
 718:      * @throws PropelException Any exceptions caught during processing will be
 719:      *       rethrown wrapped into a PropelException.
 720:      */
 721:     public static function doSelectJoinAcquisition(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 722:     {
 723:         $criteria = clone $criteria;
 724: 
 725:         // Set the correct dbName if it has not been overridden
 726:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
 727:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 728:         }
 729: 
 730:         QuantificationPeer::addSelectColumns($criteria);
 731:         $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
 732:         AcquisitionPeer::addSelectColumns($criteria);
 733: 
 734:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
 735: 
 736:         $stmt = BasePeer::doSelect($criteria, $con);
 737:         $results = array();
 738: 
 739:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 740:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
 741:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
 742:                 // We no longer rehydrate the object, since this can cause data loss.
 743:                 // See http://www.propelorm.org/ticket/509
 744:                 // $obj1->hydrate($row, 0, true); // rehydrate
 745:             } else {
 746: 
 747:                 $cls = QuantificationPeer::getOMClass();
 748: 
 749:                 $obj1 = new $cls();
 750:                 $obj1->hydrate($row);
 751:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
 752:             } // if $obj1 already loaded
 753: 
 754:             $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol);
 755:             if ($key2 !== null) {
 756:                 $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
 757:                 if (!$obj2) {
 758: 
 759:                     $cls = AcquisitionPeer::getOMClass();
 760: 
 761:                     $obj2 = new $cls();
 762:                     $obj2->hydrate($row, $startcol);
 763:                     AcquisitionPeer::addInstanceToPool($obj2, $key2);
 764:                 } // if obj2 already loaded
 765: 
 766:                 // Add the $obj1 (Quantification) to $obj2 (Acquisition)
 767:                 $obj2->addQuantification($obj1);
 768: 
 769:             } // if joined row was not null
 770: 
 771:             $results[] = $obj1;
 772:         }
 773:         $stmt->closeCursor();
 774: 
 775:         return $results;
 776:     }
 777: 
 778: 
 779:     /**
 780:      * Selects a collection of Quantification objects pre-filled with their Analysis objects.
 781:      * @param      Criteria  $criteria
 782:      * @param      PropelPDO $con
 783:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 784:      * @return array           Array of Quantification objects.
 785:      * @throws PropelException Any exceptions caught during processing will be
 786:      *       rethrown wrapped into a PropelException.
 787:      */
 788:     public static function doSelectJoinAnalysis(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 789:     {
 790:         $criteria = clone $criteria;
 791: 
 792:         // Set the correct dbName if it has not been overridden
 793:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
 794:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 795:         }
 796: 
 797:         QuantificationPeer::addSelectColumns($criteria);
 798:         $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
 799:         AnalysisPeer::addSelectColumns($criteria);
 800: 
 801:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
 802: 
 803:         $stmt = BasePeer::doSelect($criteria, $con);
 804:         $results = array();
 805: 
 806:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 807:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
 808:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
 809:                 // We no longer rehydrate the object, since this can cause data loss.
 810:                 // See http://www.propelorm.org/ticket/509
 811:                 // $obj1->hydrate($row, 0, true); // rehydrate
 812:             } else {
 813: 
 814:                 $cls = QuantificationPeer::getOMClass();
 815: 
 816:                 $obj1 = new $cls();
 817:                 $obj1->hydrate($row);
 818:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
 819:             } // if $obj1 already loaded
 820: 
 821:             $key2 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol);
 822:             if ($key2 !== null) {
 823:                 $obj2 = AnalysisPeer::getInstanceFromPool($key2);
 824:                 if (!$obj2) {
 825: 
 826:                     $cls = AnalysisPeer::getOMClass();
 827: 
 828:                     $obj2 = new $cls();
 829:                     $obj2->hydrate($row, $startcol);
 830:                     AnalysisPeer::addInstanceToPool($obj2, $key2);
 831:                 } // if obj2 already loaded
 832: 
 833:                 // Add the $obj1 (Quantification) to $obj2 (Analysis)
 834:                 $obj2->addQuantification($obj1);
 835: 
 836:             } // if joined row was not null
 837: 
 838:             $results[] = $obj1;
 839:         }
 840:         $stmt->closeCursor();
 841: 
 842:         return $results;
 843:     }
 844: 
 845: 
 846:     /**
 847:      * Selects a collection of Quantification objects pre-filled with their Contact objects.
 848:      * @param      Criteria  $criteria
 849:      * @param      PropelPDO $con
 850:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 851:      * @return array           Array of Quantification objects.
 852:      * @throws PropelException Any exceptions caught during processing will be
 853:      *       rethrown wrapped into a PropelException.
 854:      */
 855:     public static function doSelectJoinContact(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 856:     {
 857:         $criteria = clone $criteria;
 858: 
 859:         // Set the correct dbName if it has not been overridden
 860:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
 861:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 862:         }
 863: 
 864:         QuantificationPeer::addSelectColumns($criteria);
 865:         $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
 866:         ContactPeer::addSelectColumns($criteria);
 867: 
 868:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
 869: 
 870:         $stmt = BasePeer::doSelect($criteria, $con);
 871:         $results = array();
 872: 
 873:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 874:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
 875:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
 876:                 // We no longer rehydrate the object, since this can cause data loss.
 877:                 // See http://www.propelorm.org/ticket/509
 878:                 // $obj1->hydrate($row, 0, true); // rehydrate
 879:             } else {
 880: 
 881:                 $cls = QuantificationPeer::getOMClass();
 882: 
 883:                 $obj1 = new $cls();
 884:                 $obj1->hydrate($row);
 885:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
 886:             } // if $obj1 already loaded
 887: 
 888:             $key2 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol);
 889:             if ($key2 !== null) {
 890:                 $obj2 = ContactPeer::getInstanceFromPool($key2);
 891:                 if (!$obj2) {
 892: 
 893:                     $cls = ContactPeer::getOMClass();
 894: 
 895:                     $obj2 = new $cls();
 896:                     $obj2->hydrate($row, $startcol);
 897:                     ContactPeer::addInstanceToPool($obj2, $key2);
 898:                 } // if obj2 already loaded
 899: 
 900:                 // Add the $obj1 (Quantification) to $obj2 (Contact)
 901:                 $obj2->addQuantification($obj1);
 902: 
 903:             } // if joined row was not null
 904: 
 905:             $results[] = $obj1;
 906:         }
 907:         $stmt->closeCursor();
 908: 
 909:         return $results;
 910:     }
 911: 
 912: 
 913:     /**
 914:      * Selects a collection of Quantification objects pre-filled with their Protocol objects.
 915:      * @param      Criteria  $criteria
 916:      * @param      PropelPDO $con
 917:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 918:      * @return array           Array of Quantification objects.
 919:      * @throws PropelException Any exceptions caught during processing will be
 920:      *       rethrown wrapped into a PropelException.
 921:      */
 922:     public static function doSelectJoinProtocol(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 923:     {
 924:         $criteria = clone $criteria;
 925: 
 926:         // Set the correct dbName if it has not been overridden
 927:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
 928:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
 929:         }
 930: 
 931:         QuantificationPeer::addSelectColumns($criteria);
 932:         $startcol = QuantificationPeer::NUM_HYDRATE_COLUMNS;
 933:         ProtocolPeer::addSelectColumns($criteria);
 934: 
 935:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
 936: 
 937:         $stmt = BasePeer::doSelect($criteria, $con);
 938:         $results = array();
 939: 
 940:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
 941:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
 942:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
 943:                 // We no longer rehydrate the object, since this can cause data loss.
 944:                 // See http://www.propelorm.org/ticket/509
 945:                 // $obj1->hydrate($row, 0, true); // rehydrate
 946:             } else {
 947: 
 948:                 $cls = QuantificationPeer::getOMClass();
 949: 
 950:                 $obj1 = new $cls();
 951:                 $obj1->hydrate($row);
 952:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
 953:             } // if $obj1 already loaded
 954: 
 955:             $key2 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol);
 956:             if ($key2 !== null) {
 957:                 $obj2 = ProtocolPeer::getInstanceFromPool($key2);
 958:                 if (!$obj2) {
 959: 
 960:                     $cls = ProtocolPeer::getOMClass();
 961: 
 962:                     $obj2 = new $cls();
 963:                     $obj2->hydrate($row, $startcol);
 964:                     ProtocolPeer::addInstanceToPool($obj2, $key2);
 965:                 } // if obj2 already loaded
 966: 
 967:                 // Add the $obj1 (Quantification) to $obj2 (Protocol)
 968:                 $obj2->addQuantification($obj1);
 969: 
 970:             } // if joined row was not null
 971: 
 972:             $results[] = $obj1;
 973:         }
 974:         $stmt->closeCursor();
 975: 
 976:         return $results;
 977:     }
 978: 
 979: 
 980:     /**
 981:      * Returns the number of rows matching criteria, joining all related tables
 982:      *
 983:      * @param      Criteria $criteria
 984:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
 985:      * @param      PropelPDO $con
 986:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
 987:      * @return int Number of matching rows.
 988:      */
 989:     public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
 990:     {
 991:         // we're going to modify criteria, so copy it first
 992:         $criteria = clone $criteria;
 993: 
 994:         // We need to set the primary table name, since in the case that there are no WHERE columns
 995:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
 996:         // tables go into the FROM clause.
 997:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
 998: 
 999:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1000:             $criteria->setDistinct();
1001:         }
1002: 
1003:         if (!$criteria->hasSelectClause()) {
1004:             QuantificationPeer::addSelectColumns($criteria);
1005:         }
1006: 
1007:         $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
1008: 
1009:         // Set the correct dbName
1010:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1011: 
1012:         if ($con === null) {
1013:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1014:         }
1015: 
1016:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1017: 
1018:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1019: 
1020:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1021: 
1022:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1023: 
1024:         $stmt = BasePeer::doCount($criteria, $con);
1025: 
1026:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1027:             $count = (int) $row[0];
1028:         } else {
1029:             $count = 0; // no rows returned; we infer that means 0 matches.
1030:         }
1031:         $stmt->closeCursor();
1032: 
1033:         return $count;
1034:     }
1035: 
1036:     /**
1037:      * Selects a collection of Quantification objects pre-filled with all related objects.
1038:      *
1039:      * @param      Criteria  $criteria
1040:      * @param      PropelPDO $con
1041:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1042:      * @return array           Array of Quantification objects.
1043:      * @throws PropelException Any exceptions caught during processing will be
1044:      *       rethrown wrapped into a PropelException.
1045:      */
1046:     public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1047:     {
1048:         $criteria = clone $criteria;
1049: 
1050:         // Set the correct dbName if it has not been overridden
1051:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
1052:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1053:         }
1054: 
1055:         QuantificationPeer::addSelectColumns($criteria);
1056:         $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1057: 
1058:         AcquisitionPeer::addSelectColumns($criteria);
1059:         $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1060: 
1061:         AnalysisPeer::addSelectColumns($criteria);
1062:         $startcol4 = $startcol3 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1063: 
1064:         ContactPeer::addSelectColumns($criteria);
1065:         $startcol5 = $startcol4 + ContactPeer::NUM_HYDRATE_COLUMNS;
1066: 
1067:         ProtocolPeer::addSelectColumns($criteria);
1068:         $startcol6 = $startcol5 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1069: 
1070:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1071: 
1072:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1073: 
1074:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1075: 
1076:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1077: 
1078:         $stmt = BasePeer::doSelect($criteria, $con);
1079:         $results = array();
1080: 
1081:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1082:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1083:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1084:                 // We no longer rehydrate the object, since this can cause data loss.
1085:                 // See http://www.propelorm.org/ticket/509
1086:                 // $obj1->hydrate($row, 0, true); // rehydrate
1087:             } else {
1088:                 $cls = QuantificationPeer::getOMClass();
1089: 
1090:                 $obj1 = new $cls();
1091:                 $obj1->hydrate($row);
1092:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
1093:             } // if obj1 already loaded
1094: 
1095:             // Add objects for joined Acquisition rows
1096: 
1097:             $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1098:             if ($key2 !== null) {
1099:                 $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1100:                 if (!$obj2) {
1101: 
1102:                     $cls = AcquisitionPeer::getOMClass();
1103: 
1104:                     $obj2 = new $cls();
1105:                     $obj2->hydrate($row, $startcol2);
1106:                     AcquisitionPeer::addInstanceToPool($obj2, $key2);
1107:                 } // if obj2 loaded
1108: 
1109:                 // Add the $obj1 (Quantification) to the collection in $obj2 (Acquisition)
1110:                 $obj2->addQuantification($obj1);
1111:             } // if joined row not null
1112: 
1113:             // Add objects for joined Analysis rows
1114: 
1115:             $key3 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1116:             if ($key3 !== null) {
1117:                 $obj3 = AnalysisPeer::getInstanceFromPool($key3);
1118:                 if (!$obj3) {
1119: 
1120:                     $cls = AnalysisPeer::getOMClass();
1121: 
1122:                     $obj3 = new $cls();
1123:                     $obj3->hydrate($row, $startcol3);
1124:                     AnalysisPeer::addInstanceToPool($obj3, $key3);
1125:                 } // if obj3 loaded
1126: 
1127:                 // Add the $obj1 (Quantification) to the collection in $obj3 (Analysis)
1128:                 $obj3->addQuantification($obj1);
1129:             } // if joined row not null
1130: 
1131:             // Add objects for joined Contact rows
1132: 
1133:             $key4 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1134:             if ($key4 !== null) {
1135:                 $obj4 = ContactPeer::getInstanceFromPool($key4);
1136:                 if (!$obj4) {
1137: 
1138:                     $cls = ContactPeer::getOMClass();
1139: 
1140:                     $obj4 = new $cls();
1141:                     $obj4->hydrate($row, $startcol4);
1142:                     ContactPeer::addInstanceToPool($obj4, $key4);
1143:                 } // if obj4 loaded
1144: 
1145:                 // Add the $obj1 (Quantification) to the collection in $obj4 (Contact)
1146:                 $obj4->addQuantification($obj1);
1147:             } // if joined row not null
1148: 
1149:             // Add objects for joined Protocol rows
1150: 
1151:             $key5 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol5);
1152:             if ($key5 !== null) {
1153:                 $obj5 = ProtocolPeer::getInstanceFromPool($key5);
1154:                 if (!$obj5) {
1155: 
1156:                     $cls = ProtocolPeer::getOMClass();
1157: 
1158:                     $obj5 = new $cls();
1159:                     $obj5->hydrate($row, $startcol5);
1160:                     ProtocolPeer::addInstanceToPool($obj5, $key5);
1161:                 } // if obj5 loaded
1162: 
1163:                 // Add the $obj1 (Quantification) to the collection in $obj5 (Protocol)
1164:                 $obj5->addQuantification($obj1);
1165:             } // if joined row not null
1166: 
1167:             $results[] = $obj1;
1168:         }
1169:         $stmt->closeCursor();
1170: 
1171:         return $results;
1172:     }
1173: 
1174: 
1175:     /**
1176:      * Returns the number of rows matching criteria, joining the related Acquisition table
1177:      *
1178:      * @param      Criteria $criteria
1179:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
1180:      * @param      PropelPDO $con
1181:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1182:      * @return int Number of matching rows.
1183:      */
1184:     public static function doCountJoinAllExceptAcquisition(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1185:     {
1186:         // we're going to modify criteria, so copy it first
1187:         $criteria = clone $criteria;
1188: 
1189:         // We need to set the primary table name, since in the case that there are no WHERE columns
1190:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
1191:         // tables go into the FROM clause.
1192:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1193: 
1194:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1195:             $criteria->setDistinct();
1196:         }
1197: 
1198:         if (!$criteria->hasSelectClause()) {
1199:             QuantificationPeer::addSelectColumns($criteria);
1200:         }
1201: 
1202:         $criteria->clearOrderByColumns(); // ORDER BY should not affect count
1203: 
1204:         // Set the correct dbName
1205:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1206: 
1207:         if ($con === null) {
1208:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1209:         }
1210: 
1211:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1212: 
1213:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1214: 
1215:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1216: 
1217:         $stmt = BasePeer::doCount($criteria, $con);
1218: 
1219:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1220:             $count = (int) $row[0];
1221:         } else {
1222:             $count = 0; // no rows returned; we infer that means 0 matches.
1223:         }
1224:         $stmt->closeCursor();
1225: 
1226:         return $count;
1227:     }
1228: 
1229: 
1230:     /**
1231:      * Returns the number of rows matching criteria, joining the related Analysis table
1232:      *
1233:      * @param      Criteria $criteria
1234:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
1235:      * @param      PropelPDO $con
1236:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1237:      * @return int Number of matching rows.
1238:      */
1239:     public static function doCountJoinAllExceptAnalysis(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1240:     {
1241:         // we're going to modify criteria, so copy it first
1242:         $criteria = clone $criteria;
1243: 
1244:         // We need to set the primary table name, since in the case that there are no WHERE columns
1245:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
1246:         // tables go into the FROM clause.
1247:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1248: 
1249:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1250:             $criteria->setDistinct();
1251:         }
1252: 
1253:         if (!$criteria->hasSelectClause()) {
1254:             QuantificationPeer::addSelectColumns($criteria);
1255:         }
1256: 
1257:         $criteria->clearOrderByColumns(); // ORDER BY should not affect count
1258: 
1259:         // Set the correct dbName
1260:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1261: 
1262:         if ($con === null) {
1263:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1264:         }
1265: 
1266:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1267: 
1268:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1269: 
1270:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1271: 
1272:         $stmt = BasePeer::doCount($criteria, $con);
1273: 
1274:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1275:             $count = (int) $row[0];
1276:         } else {
1277:             $count = 0; // no rows returned; we infer that means 0 matches.
1278:         }
1279:         $stmt->closeCursor();
1280: 
1281:         return $count;
1282:     }
1283: 
1284: 
1285:     /**
1286:      * Returns the number of rows matching criteria, joining the related Contact table
1287:      *
1288:      * @param      Criteria $criteria
1289:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
1290:      * @param      PropelPDO $con
1291:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1292:      * @return int Number of matching rows.
1293:      */
1294:     public static function doCountJoinAllExceptContact(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1295:     {
1296:         // we're going to modify criteria, so copy it first
1297:         $criteria = clone $criteria;
1298: 
1299:         // We need to set the primary table name, since in the case that there are no WHERE columns
1300:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
1301:         // tables go into the FROM clause.
1302:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1303: 
1304:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1305:             $criteria->setDistinct();
1306:         }
1307: 
1308:         if (!$criteria->hasSelectClause()) {
1309:             QuantificationPeer::addSelectColumns($criteria);
1310:         }
1311: 
1312:         $criteria->clearOrderByColumns(); // ORDER BY should not affect count
1313: 
1314:         // Set the correct dbName
1315:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1316: 
1317:         if ($con === null) {
1318:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1319:         }
1320: 
1321:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1322: 
1323:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1324: 
1325:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1326: 
1327:         $stmt = BasePeer::doCount($criteria, $con);
1328: 
1329:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1330:             $count = (int) $row[0];
1331:         } else {
1332:             $count = 0; // no rows returned; we infer that means 0 matches.
1333:         }
1334:         $stmt->closeCursor();
1335: 
1336:         return $count;
1337:     }
1338: 
1339: 
1340:     /**
1341:      * Returns the number of rows matching criteria, joining the related Protocol table
1342:      *
1343:      * @param      Criteria $criteria
1344:      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
1345:      * @param      PropelPDO $con
1346:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1347:      * @return int Number of matching rows.
1348:      */
1349:     public static function doCountJoinAllExceptProtocol(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
1350:     {
1351:         // we're going to modify criteria, so copy it first
1352:         $criteria = clone $criteria;
1353: 
1354:         // We need to set the primary table name, since in the case that there are no WHERE columns
1355:         // it will be impossible for the BasePeer::createSelectSql() method to determine which
1356:         // tables go into the FROM clause.
1357:         $criteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1358: 
1359:         if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
1360:             $criteria->setDistinct();
1361:         }
1362: 
1363:         if (!$criteria->hasSelectClause()) {
1364:             QuantificationPeer::addSelectColumns($criteria);
1365:         }
1366: 
1367:         $criteria->clearOrderByColumns(); // ORDER BY should not affect count
1368: 
1369:         // Set the correct dbName
1370:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1371: 
1372:         if ($con === null) {
1373:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
1374:         }
1375: 
1376:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1377: 
1378:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1379: 
1380:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1381: 
1382:         $stmt = BasePeer::doCount($criteria, $con);
1383: 
1384:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1385:             $count = (int) $row[0];
1386:         } else {
1387:             $count = 0; // no rows returned; we infer that means 0 matches.
1388:         }
1389:         $stmt->closeCursor();
1390: 
1391:         return $count;
1392:     }
1393: 
1394: 
1395:     /**
1396:      * Selects a collection of Quantification objects pre-filled with all related objects except Acquisition.
1397:      *
1398:      * @param      Criteria  $criteria
1399:      * @param      PropelPDO $con
1400:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1401:      * @return array           Array of Quantification objects.
1402:      * @throws PropelException Any exceptions caught during processing will be
1403:      *       rethrown wrapped into a PropelException.
1404:      */
1405:     public static function doSelectJoinAllExceptAcquisition(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1406:     {
1407:         $criteria = clone $criteria;
1408: 
1409:         // Set the correct dbName if it has not been overridden
1410:         // $criteria->getDbName() will return the same object if not set to another value
1411:         // so == check is okay and faster
1412:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
1413:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1414:         }
1415: 
1416:         QuantificationPeer::addSelectColumns($criteria);
1417:         $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1418: 
1419:         AnalysisPeer::addSelectColumns($criteria);
1420:         $startcol3 = $startcol2 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1421: 
1422:         ContactPeer::addSelectColumns($criteria);
1423:         $startcol4 = $startcol3 + ContactPeer::NUM_HYDRATE_COLUMNS;
1424: 
1425:         ProtocolPeer::addSelectColumns($criteria);
1426:         $startcol5 = $startcol4 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1427: 
1428:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1429: 
1430:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1431: 
1432:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1433: 
1434: 
1435:         $stmt = BasePeer::doSelect($criteria, $con);
1436:         $results = array();
1437: 
1438:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1439:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1440:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1441:                 // We no longer rehydrate the object, since this can cause data loss.
1442:                 // See http://www.propelorm.org/ticket/509
1443:                 // $obj1->hydrate($row, 0, true); // rehydrate
1444:             } else {
1445:                 $cls = QuantificationPeer::getOMClass();
1446: 
1447:                 $obj1 = new $cls();
1448:                 $obj1->hydrate($row);
1449:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
1450:             } // if obj1 already loaded
1451: 
1452:                 // Add objects for joined Analysis rows
1453: 
1454:                 $key2 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1455:                 if ($key2 !== null) {
1456:                     $obj2 = AnalysisPeer::getInstanceFromPool($key2);
1457:                     if (!$obj2) {
1458: 
1459:                         $cls = AnalysisPeer::getOMClass();
1460: 
1461:                     $obj2 = new $cls();
1462:                     $obj2->hydrate($row, $startcol2);
1463:                     AnalysisPeer::addInstanceToPool($obj2, $key2);
1464:                 } // if $obj2 already loaded
1465: 
1466:                 // Add the $obj1 (Quantification) to the collection in $obj2 (Analysis)
1467:                 $obj2->addQuantification($obj1);
1468: 
1469:             } // if joined row is not null
1470: 
1471:                 // Add objects for joined Contact rows
1472: 
1473:                 $key3 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1474:                 if ($key3 !== null) {
1475:                     $obj3 = ContactPeer::getInstanceFromPool($key3);
1476:                     if (!$obj3) {
1477: 
1478:                         $cls = ContactPeer::getOMClass();
1479: 
1480:                     $obj3 = new $cls();
1481:                     $obj3->hydrate($row, $startcol3);
1482:                     ContactPeer::addInstanceToPool($obj3, $key3);
1483:                 } // if $obj3 already loaded
1484: 
1485:                 // Add the $obj1 (Quantification) to the collection in $obj3 (Contact)
1486:                 $obj3->addQuantification($obj1);
1487: 
1488:             } // if joined row is not null
1489: 
1490:                 // Add objects for joined Protocol rows
1491: 
1492:                 $key4 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1493:                 if ($key4 !== null) {
1494:                     $obj4 = ProtocolPeer::getInstanceFromPool($key4);
1495:                     if (!$obj4) {
1496: 
1497:                         $cls = ProtocolPeer::getOMClass();
1498: 
1499:                     $obj4 = new $cls();
1500:                     $obj4->hydrate($row, $startcol4);
1501:                     ProtocolPeer::addInstanceToPool($obj4, $key4);
1502:                 } // if $obj4 already loaded
1503: 
1504:                 // Add the $obj1 (Quantification) to the collection in $obj4 (Protocol)
1505:                 $obj4->addQuantification($obj1);
1506: 
1507:             } // if joined row is not null
1508: 
1509:             $results[] = $obj1;
1510:         }
1511:         $stmt->closeCursor();
1512: 
1513:         return $results;
1514:     }
1515: 
1516: 
1517:     /**
1518:      * Selects a collection of Quantification objects pre-filled with all related objects except Analysis.
1519:      *
1520:      * @param      Criteria  $criteria
1521:      * @param      PropelPDO $con
1522:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1523:      * @return array           Array of Quantification objects.
1524:      * @throws PropelException Any exceptions caught during processing will be
1525:      *       rethrown wrapped into a PropelException.
1526:      */
1527:     public static function doSelectJoinAllExceptAnalysis(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1528:     {
1529:         $criteria = clone $criteria;
1530: 
1531:         // Set the correct dbName if it has not been overridden
1532:         // $criteria->getDbName() will return the same object if not set to another value
1533:         // so == check is okay and faster
1534:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
1535:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1536:         }
1537: 
1538:         QuantificationPeer::addSelectColumns($criteria);
1539:         $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1540: 
1541:         AcquisitionPeer::addSelectColumns($criteria);
1542:         $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1543: 
1544:         ContactPeer::addSelectColumns($criteria);
1545:         $startcol4 = $startcol3 + ContactPeer::NUM_HYDRATE_COLUMNS;
1546: 
1547:         ProtocolPeer::addSelectColumns($criteria);
1548:         $startcol5 = $startcol4 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1549: 
1550:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1551: 
1552:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1553: 
1554:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1555: 
1556: 
1557:         $stmt = BasePeer::doSelect($criteria, $con);
1558:         $results = array();
1559: 
1560:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1561:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1562:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1563:                 // We no longer rehydrate the object, since this can cause data loss.
1564:                 // See http://www.propelorm.org/ticket/509
1565:                 // $obj1->hydrate($row, 0, true); // rehydrate
1566:             } else {
1567:                 $cls = QuantificationPeer::getOMClass();
1568: 
1569:                 $obj1 = new $cls();
1570:                 $obj1->hydrate($row);
1571:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
1572:             } // if obj1 already loaded
1573: 
1574:                 // Add objects for joined Acquisition rows
1575: 
1576:                 $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1577:                 if ($key2 !== null) {
1578:                     $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1579:                     if (!$obj2) {
1580: 
1581:                         $cls = AcquisitionPeer::getOMClass();
1582: 
1583:                     $obj2 = new $cls();
1584:                     $obj2->hydrate($row, $startcol2);
1585:                     AcquisitionPeer::addInstanceToPool($obj2, $key2);
1586:                 } // if $obj2 already loaded
1587: 
1588:                 // Add the $obj1 (Quantification) to the collection in $obj2 (Acquisition)
1589:                 $obj2->addQuantification($obj1);
1590: 
1591:             } // if joined row is not null
1592: 
1593:                 // Add objects for joined Contact rows
1594: 
1595:                 $key3 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1596:                 if ($key3 !== null) {
1597:                     $obj3 = ContactPeer::getInstanceFromPool($key3);
1598:                     if (!$obj3) {
1599: 
1600:                         $cls = ContactPeer::getOMClass();
1601: 
1602:                     $obj3 = new $cls();
1603:                     $obj3->hydrate($row, $startcol3);
1604:                     ContactPeer::addInstanceToPool($obj3, $key3);
1605:                 } // if $obj3 already loaded
1606: 
1607:                 // Add the $obj1 (Quantification) to the collection in $obj3 (Contact)
1608:                 $obj3->addQuantification($obj1);
1609: 
1610:             } // if joined row is not null
1611: 
1612:                 // Add objects for joined Protocol rows
1613: 
1614:                 $key4 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1615:                 if ($key4 !== null) {
1616:                     $obj4 = ProtocolPeer::getInstanceFromPool($key4);
1617:                     if (!$obj4) {
1618: 
1619:                         $cls = ProtocolPeer::getOMClass();
1620: 
1621:                     $obj4 = new $cls();
1622:                     $obj4->hydrate($row, $startcol4);
1623:                     ProtocolPeer::addInstanceToPool($obj4, $key4);
1624:                 } // if $obj4 already loaded
1625: 
1626:                 // Add the $obj1 (Quantification) to the collection in $obj4 (Protocol)
1627:                 $obj4->addQuantification($obj1);
1628: 
1629:             } // if joined row is not null
1630: 
1631:             $results[] = $obj1;
1632:         }
1633:         $stmt->closeCursor();
1634: 
1635:         return $results;
1636:     }
1637: 
1638: 
1639:     /**
1640:      * Selects a collection of Quantification objects pre-filled with all related objects except Contact.
1641:      *
1642:      * @param      Criteria  $criteria
1643:      * @param      PropelPDO $con
1644:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1645:      * @return array           Array of Quantification objects.
1646:      * @throws PropelException Any exceptions caught during processing will be
1647:      *       rethrown wrapped into a PropelException.
1648:      */
1649:     public static function doSelectJoinAllExceptContact(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1650:     {
1651:         $criteria = clone $criteria;
1652: 
1653:         // Set the correct dbName if it has not been overridden
1654:         // $criteria->getDbName() will return the same object if not set to another value
1655:         // so == check is okay and faster
1656:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
1657:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1658:         }
1659: 
1660:         QuantificationPeer::addSelectColumns($criteria);
1661:         $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1662: 
1663:         AcquisitionPeer::addSelectColumns($criteria);
1664:         $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1665: 
1666:         AnalysisPeer::addSelectColumns($criteria);
1667:         $startcol4 = $startcol3 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1668: 
1669:         ProtocolPeer::addSelectColumns($criteria);
1670:         $startcol5 = $startcol4 + ProtocolPeer::NUM_HYDRATE_COLUMNS;
1671: 
1672:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1673: 
1674:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1675: 
1676:         $criteria->addJoin(QuantificationPeer::PROTOCOL_ID, ProtocolPeer::PROTOCOL_ID, $join_behavior);
1677: 
1678: 
1679:         $stmt = BasePeer::doSelect($criteria, $con);
1680:         $results = array();
1681: 
1682:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1683:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1684:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1685:                 // We no longer rehydrate the object, since this can cause data loss.
1686:                 // See http://www.propelorm.org/ticket/509
1687:                 // $obj1->hydrate($row, 0, true); // rehydrate
1688:             } else {
1689:                 $cls = QuantificationPeer::getOMClass();
1690: 
1691:                 $obj1 = new $cls();
1692:                 $obj1->hydrate($row);
1693:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
1694:             } // if obj1 already loaded
1695: 
1696:                 // Add objects for joined Acquisition rows
1697: 
1698:                 $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1699:                 if ($key2 !== null) {
1700:                     $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1701:                     if (!$obj2) {
1702: 
1703:                         $cls = AcquisitionPeer::getOMClass();
1704: 
1705:                     $obj2 = new $cls();
1706:                     $obj2->hydrate($row, $startcol2);
1707:                     AcquisitionPeer::addInstanceToPool($obj2, $key2);
1708:                 } // if $obj2 already loaded
1709: 
1710:                 // Add the $obj1 (Quantification) to the collection in $obj2 (Acquisition)
1711:                 $obj2->addQuantification($obj1);
1712: 
1713:             } // if joined row is not null
1714: 
1715:                 // Add objects for joined Analysis rows
1716: 
1717:                 $key3 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1718:                 if ($key3 !== null) {
1719:                     $obj3 = AnalysisPeer::getInstanceFromPool($key3);
1720:                     if (!$obj3) {
1721: 
1722:                         $cls = AnalysisPeer::getOMClass();
1723: 
1724:                     $obj3 = new $cls();
1725:                     $obj3->hydrate($row, $startcol3);
1726:                     AnalysisPeer::addInstanceToPool($obj3, $key3);
1727:                 } // if $obj3 already loaded
1728: 
1729:                 // Add the $obj1 (Quantification) to the collection in $obj3 (Analysis)
1730:                 $obj3->addQuantification($obj1);
1731: 
1732:             } // if joined row is not null
1733: 
1734:                 // Add objects for joined Protocol rows
1735: 
1736:                 $key4 = ProtocolPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1737:                 if ($key4 !== null) {
1738:                     $obj4 = ProtocolPeer::getInstanceFromPool($key4);
1739:                     if (!$obj4) {
1740: 
1741:                         $cls = ProtocolPeer::getOMClass();
1742: 
1743:                     $obj4 = new $cls();
1744:                     $obj4->hydrate($row, $startcol4);
1745:                     ProtocolPeer::addInstanceToPool($obj4, $key4);
1746:                 } // if $obj4 already loaded
1747: 
1748:                 // Add the $obj1 (Quantification) to the collection in $obj4 (Protocol)
1749:                 $obj4->addQuantification($obj1);
1750: 
1751:             } // if joined row is not null
1752: 
1753:             $results[] = $obj1;
1754:         }
1755:         $stmt->closeCursor();
1756: 
1757:         return $results;
1758:     }
1759: 
1760: 
1761:     /**
1762:      * Selects a collection of Quantification objects pre-filled with all related objects except Protocol.
1763:      *
1764:      * @param      Criteria  $criteria
1765:      * @param      PropelPDO $con
1766:      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
1767:      * @return array           Array of Quantification objects.
1768:      * @throws PropelException Any exceptions caught during processing will be
1769:      *       rethrown wrapped into a PropelException.
1770:      */
1771:     public static function doSelectJoinAllExceptProtocol(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
1772:     {
1773:         $criteria = clone $criteria;
1774: 
1775:         // Set the correct dbName if it has not been overridden
1776:         // $criteria->getDbName() will return the same object if not set to another value
1777:         // so == check is okay and faster
1778:         if ($criteria->getDbName() == Propel::getDefaultDB()) {
1779:             $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1780:         }
1781: 
1782:         QuantificationPeer::addSelectColumns($criteria);
1783:         $startcol2 = QuantificationPeer::NUM_HYDRATE_COLUMNS;
1784: 
1785:         AcquisitionPeer::addSelectColumns($criteria);
1786:         $startcol3 = $startcol2 + AcquisitionPeer::NUM_HYDRATE_COLUMNS;
1787: 
1788:         AnalysisPeer::addSelectColumns($criteria);
1789:         $startcol4 = $startcol3 + AnalysisPeer::NUM_HYDRATE_COLUMNS;
1790: 
1791:         ContactPeer::addSelectColumns($criteria);
1792:         $startcol5 = $startcol4 + ContactPeer::NUM_HYDRATE_COLUMNS;
1793: 
1794:         $criteria->addJoin(QuantificationPeer::ACQUISITION_ID, AcquisitionPeer::ACQUISITION_ID, $join_behavior);
1795: 
1796:         $criteria->addJoin(QuantificationPeer::ANALYSIS_ID, AnalysisPeer::ANALYSIS_ID, $join_behavior);
1797: 
1798:         $criteria->addJoin(QuantificationPeer::OPERATOR_ID, ContactPeer::CONTACT_ID, $join_behavior);
1799: 
1800: 
1801:         $stmt = BasePeer::doSelect($criteria, $con);
1802:         $results = array();
1803: 
1804:         while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
1805:             $key1 = QuantificationPeer::getPrimaryKeyHashFromRow($row, 0);
1806:             if (null !== ($obj1 = QuantificationPeer::getInstanceFromPool($key1))) {
1807:                 // We no longer rehydrate the object, since this can cause data loss.
1808:                 // See http://www.propelorm.org/ticket/509
1809:                 // $obj1->hydrate($row, 0, true); // rehydrate
1810:             } else {
1811:                 $cls = QuantificationPeer::getOMClass();
1812: 
1813:                 $obj1 = new $cls();
1814:                 $obj1->hydrate($row);
1815:                 QuantificationPeer::addInstanceToPool($obj1, $key1);
1816:             } // if obj1 already loaded
1817: 
1818:                 // Add objects for joined Acquisition rows
1819: 
1820:                 $key2 = AcquisitionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
1821:                 if ($key2 !== null) {
1822:                     $obj2 = AcquisitionPeer::getInstanceFromPool($key2);
1823:                     if (!$obj2) {
1824: 
1825:                         $cls = AcquisitionPeer::getOMClass();
1826: 
1827:                     $obj2 = new $cls();
1828:                     $obj2->hydrate($row, $startcol2);
1829:                     AcquisitionPeer::addInstanceToPool($obj2, $key2);
1830:                 } // if $obj2 already loaded
1831: 
1832:                 // Add the $obj1 (Quantification) to the collection in $obj2 (Acquisition)
1833:                 $obj2->addQuantification($obj1);
1834: 
1835:             } // if joined row is not null
1836: 
1837:                 // Add objects for joined Analysis rows
1838: 
1839:                 $key3 = AnalysisPeer::getPrimaryKeyHashFromRow($row, $startcol3);
1840:                 if ($key3 !== null) {
1841:                     $obj3 = AnalysisPeer::getInstanceFromPool($key3);
1842:                     if (!$obj3) {
1843: 
1844:                         $cls = AnalysisPeer::getOMClass();
1845: 
1846:                     $obj3 = new $cls();
1847:                     $obj3->hydrate($row, $startcol3);
1848:                     AnalysisPeer::addInstanceToPool($obj3, $key3);
1849:                 } // if $obj3 already loaded
1850: 
1851:                 // Add the $obj1 (Quantification) to the collection in $obj3 (Analysis)
1852:                 $obj3->addQuantification($obj1);
1853: 
1854:             } // if joined row is not null
1855: 
1856:                 // Add objects for joined Contact rows
1857: 
1858:                 $key4 = ContactPeer::getPrimaryKeyHashFromRow($row, $startcol4);
1859:                 if ($key4 !== null) {
1860:                     $obj4 = ContactPeer::getInstanceFromPool($key4);
1861:                     if (!$obj4) {
1862: 
1863:                         $cls = ContactPeer::getOMClass();
1864: 
1865:                     $obj4 = new $cls();
1866:                     $obj4->hydrate($row, $startcol4);
1867:                     ContactPeer::addInstanceToPool($obj4, $key4);
1868:                 } // if $obj4 already loaded
1869: 
1870:                 // Add the $obj1 (Quantification) to the collection in $obj4 (Contact)
1871:                 $obj4->addQuantification($obj1);
1872: 
1873:             } // if joined row is not null
1874: 
1875:             $results[] = $obj1;
1876:         }
1877:         $stmt->closeCursor();
1878: 
1879:         return $results;
1880:     }
1881: 
1882:     /**
1883:      * Returns the TableMap related to this peer.
1884:      * This method is not needed for general use but a specific application could have a need.
1885:      * @return TableMap
1886:      * @throws PropelException Any exceptions caught during processing will be
1887:      *       rethrown wrapped into a PropelException.
1888:      */
1889:     public static function getTableMap()
1890:     {
1891:         return Propel::getDatabaseMap(QuantificationPeer::DATABASE_NAME)->getTable(QuantificationPeer::TABLE_NAME);
1892:     }
1893: 
1894:     /**
1895:      * Add a TableMap instance to the database for this peer class.
1896:      */
1897:     public static function buildTableMap()
1898:     {
1899:       $dbMap = Propel::getDatabaseMap(BaseQuantificationPeer::DATABASE_NAME);
1900:       if (!$dbMap->hasTable(BaseQuantificationPeer::TABLE_NAME)) {
1901:         $dbMap->addTableObject(new QuantificationTableMap());
1902:       }
1903:     }
1904: 
1905:     /**
1906:      * The class that the Peer will make instances of.
1907:      *
1908:      *
1909:      * @return string ClassName
1910:      */
1911:     public static function getOMClass($row = 0, $colnum = 0)
1912:     {
1913:         return QuantificationPeer::OM_CLASS;
1914:     }
1915: 
1916:     /**
1917:      * Performs an INSERT on the database, given a Quantification or Criteria object.
1918:      *
1919:      * @param      mixed $values Criteria or Quantification object containing data that is used to create the INSERT statement.
1920:      * @param      PropelPDO $con the PropelPDO connection to use
1921:      * @return mixed           The new primary key.
1922:      * @throws PropelException Any exceptions caught during processing will be
1923:      *       rethrown wrapped into a PropelException.
1924:      */
1925:     public static function doInsert($values, PropelPDO $con = null)
1926:     {
1927:         if ($con === null) {
1928:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1929:         }
1930: 
1931:         if ($values instanceof Criteria) {
1932:             $criteria = clone $values; // rename for clarity
1933:         } else {
1934:             $criteria = $values->buildCriteria(); // build Criteria from Quantification object
1935:         }
1936: 
1937:         if ($criteria->containsKey(QuantificationPeer::QUANTIFICATION_ID) && $criteria->keyContainsValue(QuantificationPeer::QUANTIFICATION_ID) ) {
1938:             throw new PropelException('Cannot insert a value for auto-increment primary key ('.QuantificationPeer::QUANTIFICATION_ID.')');
1939:         }
1940: 
1941: 
1942:         // Set the correct dbName
1943:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1944: 
1945:         try {
1946:             // use transaction because $criteria could contain info
1947:             // for more than one table (I guess, conceivably)
1948:             $con->beginTransaction();
1949:             $pk = BasePeer::doInsert($criteria, $con);
1950:             $con->commit();
1951:         } catch (PropelException $e) {
1952:             $con->rollBack();
1953:             throw $e;
1954:         }
1955: 
1956:         return $pk;
1957:     }
1958: 
1959:     /**
1960:      * Performs an UPDATE on the database, given a Quantification or Criteria object.
1961:      *
1962:      * @param      mixed $values Criteria or Quantification object containing data that is used to create the UPDATE statement.
1963:      * @param      PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
1964:      * @return int             The number of affected rows (if supported by underlying database driver).
1965:      * @throws PropelException Any exceptions caught during processing will be
1966:      *       rethrown wrapped into a PropelException.
1967:      */
1968:     public static function doUpdate($values, PropelPDO $con = null)
1969:     {
1970:         if ($con === null) {
1971:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
1972:         }
1973: 
1974:         $selectCriteria = new Criteria(QuantificationPeer::DATABASE_NAME);
1975: 
1976:         if ($values instanceof Criteria) {
1977:             $criteria = clone $values; // rename for clarity
1978: 
1979:             $comparison = $criteria->getComparison(QuantificationPeer::QUANTIFICATION_ID);
1980:             $value = $criteria->remove(QuantificationPeer::QUANTIFICATION_ID);
1981:             if ($value) {
1982:                 $selectCriteria->add(QuantificationPeer::QUANTIFICATION_ID, $value, $comparison);
1983:             } else {
1984:                 $selectCriteria->setPrimaryTableName(QuantificationPeer::TABLE_NAME);
1985:             }
1986: 
1987:         } else { // $values is Quantification object
1988:             $criteria = $values->buildCriteria(); // gets full criteria
1989:             $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
1990:         }
1991: 
1992:         // set the correct dbName
1993:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
1994: 
1995:         return BasePeer::doUpdate($selectCriteria, $criteria, $con);
1996:     }
1997: 
1998:     /**
1999:      * Deletes all rows from the quantification table.
2000:      *
2001:      * @param      PropelPDO $con the connection to use
2002:      * @return int             The number of affected rows (if supported by underlying database driver).
2003:      * @throws PropelException
2004:      */
2005:     public static function doDeleteAll(PropelPDO $con = null)
2006:     {
2007:         if ($con === null) {
2008:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
2009:         }
2010:         $affectedRows = 0; // initialize var to track total num of affected rows
2011:         try {
2012:             // use transaction because $criteria could contain info
2013:             // for more than one table or we could emulating ON DELETE CASCADE, etc.
2014:             $con->beginTransaction();
2015:             $affectedRows += BasePeer::doDeleteAll(QuantificationPeer::TABLE_NAME, $con, QuantificationPeer::DATABASE_NAME);
2016:             // Because this db requires some delete cascade/set null emulation, we have to
2017:             // clear the cached instance *after* the emulation has happened (since
2018:             // instances get re-added by the select statement contained therein).
2019:             QuantificationPeer::clearInstancePool();
2020:             QuantificationPeer::clearRelatedInstancePool();
2021:             $con->commit();
2022: 
2023:             return $affectedRows;
2024:         } catch (PropelException $e) {
2025:             $con->rollBack();
2026:             throw $e;
2027:         }
2028:     }
2029: 
2030:     /**
2031:      * Performs a DELETE on the database, given a Quantification or Criteria object OR a primary key value.
2032:      *
2033:      * @param      mixed $values Criteria or Quantification object or primary key or array of primary keys
2034:      *              which is used to create the DELETE statement
2035:      * @param      PropelPDO $con the connection to use
2036:      * @return int The number of affected rows (if supported by underlying database driver).  This includes CASCADE-related rows
2037:      *              if supported by native driver or if emulated using Propel.
2038:      * @throws PropelException Any exceptions caught during processing will be
2039:      *       rethrown wrapped into a PropelException.
2040:      */
2041:      public static function doDelete($values, PropelPDO $con = null)
2042:      {
2043:         if ($con === null) {
2044:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
2045:         }
2046: 
2047:         if ($values instanceof Criteria) {
2048:             // invalidate the cache for all objects of this type, since we have no
2049:             // way of knowing (without running a query) what objects should be invalidated
2050:             // from the cache based on this Criteria.
2051:             QuantificationPeer::clearInstancePool();
2052:             // rename for clarity
2053:             $criteria = clone $values;
2054:         } elseif ($values instanceof Quantification) { // it's a model object
2055:             // invalidate the cache for this single object
2056:             QuantificationPeer::removeInstanceFromPool($values);
2057:             // create criteria based on pk values
2058:             $criteria = $values->buildPkeyCriteria();
2059:         } else { // it's a primary key, or an array of pks
2060:             $criteria = new Criteria(QuantificationPeer::DATABASE_NAME);
2061:             $criteria->add(QuantificationPeer::QUANTIFICATION_ID, (array) $values, Criteria::IN);
2062:             // invalidate the cache for this object(s)
2063:             foreach ((array) $values as $singleval) {
2064:                 QuantificationPeer::removeInstanceFromPool($singleval);
2065:             }
2066:         }
2067: 
2068:         // Set the correct dbName
2069:         $criteria->setDbName(QuantificationPeer::DATABASE_NAME);
2070: 
2071:         $affectedRows = 0; // initialize var to track total num of affected rows
2072: 
2073:         try {
2074:             // use transaction because $criteria could contain info
2075:             // for more than one table or we could emulating ON DELETE CASCADE, etc.
2076:             $con->beginTransaction();
2077: 
2078:             $affectedRows += BasePeer::doDelete($criteria, $con);
2079:             QuantificationPeer::clearRelatedInstancePool();
2080:             $con->commit();
2081: 
2082:             return $affectedRows;
2083:         } catch (PropelException $e) {
2084:             $con->rollBack();
2085:             throw $e;
2086:         }
2087:     }
2088: 
2089:     /**
2090:      * Validates all modified columns of given Quantification object.
2091:      * If parameter $columns is either a single column name or an array of column names
2092:      * than only those columns are validated.
2093:      *
2094:      * NOTICE: This does not apply to primary or foreign keys for now.
2095:      *
2096:      * @param      Quantification $obj The object to validate.
2097:      * @param      mixed $cols Column name or array of column names.
2098:      *
2099:      * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
2100:      */
2101:     public static function doValidate($obj, $cols = null)
2102:     {
2103:         $columns = array();
2104: 
2105:         if ($cols) {
2106:             $dbMap = Propel::getDatabaseMap(QuantificationPeer::DATABASE_NAME);
2107:             $tableMap = $dbMap->getTable(QuantificationPeer::TABLE_NAME);
2108: 
2109:             if (! is_array($cols)) {
2110:                 $cols = array($cols);
2111:             }
2112: 
2113:             foreach ($cols as $colName) {
2114:                 if ($tableMap->hasColumn($colName)) {
2115:                     $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
2116:                     $columns[$colName] = $obj->$get();
2117:                 }
2118:             }
2119:         } else {
2120: 
2121:         }
2122: 
2123:         return BasePeer::doValidate(QuantificationPeer::DATABASE_NAME, QuantificationPeer::TABLE_NAME, $columns);
2124:     }
2125: 
2126:     /**
2127:      * Retrieve a single object by pkey.
2128:      *
2129:      * @param      int $pk the primary key.
2130:      * @param      PropelPDO $con the connection to use
2131:      * @return Quantification
2132:      */
2133:     public static function retrieveByPK($pk, PropelPDO $con = null)
2134:     {
2135: 
2136:         if (null !== ($obj = QuantificationPeer::getInstanceFromPool((string) $pk))) {
2137:             return $obj;
2138:         }
2139: 
2140:         if ($con === null) {
2141:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
2142:         }
2143: 
2144:         $criteria = new Criteria(QuantificationPeer::DATABASE_NAME);
2145:         $criteria->add(QuantificationPeer::QUANTIFICATION_ID, $pk);
2146: 
2147:         $v = QuantificationPeer::doSelect($criteria, $con);
2148: 
2149:         return !empty($v) > 0 ? $v[0] : null;
2150:     }
2151: 
2152:     /**
2153:      * Retrieve multiple objects by pkey.
2154:      *
2155:      * @param      array $pks List of primary keys
2156:      * @param      PropelPDO $con the connection to use
2157:      * @return Quantification[]
2158:      * @throws PropelException Any exceptions caught during processing will be
2159:      *       rethrown wrapped into a PropelException.
2160:      */
2161:     public static function retrieveByPKs($pks, PropelPDO $con = null)
2162:     {
2163:         if ($con === null) {
2164:             $con = Propel::getConnection(QuantificationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
2165:         }
2166: 
2167:         $objs = null;
2168:         if (empty($pks)) {
2169:             $objs = array();
2170:         } else {
2171:             $criteria = new Criteria(QuantificationPeer::DATABASE_NAME);
2172:             $criteria->add(QuantificationPeer::QUANTIFICATION_ID, $pks, Criteria::IN);
2173:             $objs = QuantificationPeer::doSelect($criteria, $con);
2174:         }
2175: 
2176:         return $objs;
2177:     }
2178: 
2179: } // BaseQuantificationPeer
2180: 
2181: // This is the static code needed to register the TableMap for this table with the main Propel class.
2182: //
2183: BaseQuantificationPeer::buildTableMap();
2184: 
2185: 
tbro API documentation generated by ApiGen 2.8.0