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