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