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