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