/** * Retrieve a single object by pkey. * * @param int $pk the primary key. * @param PropelPDO $con the connection to use * @return Percentiles */ public static function retrieveByPK($pk, PropelPDO $con = null) { if (null !== ($obj = PercentilesPeer::getInstanceFromPool((string) $pk))) { return $obj; } if ($con === null) { $con = Propel::getConnection(PercentilesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $criteria = new Criteria(PercentilesPeer::DATABASE_NAME); $criteria->add(PercentilesPeer::ID, $pk); $v = PercentilesPeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; }