/**
  * Gets an array of AdvertisementPositionApplications objects based on the input
  * advertisementPositionID parameter.
  *
  * @param int $advertisementPositionID
  * @param Connection $dbConnection
  * @return An array of AdvertisementPositionApplications
  */
 public function getAdvertismentPositionApplication($advertisementPositionID, $dbConnection = null)
 {
     $applications = null;
     try {
         if ($advertisementPositionID != null) {
             $applications = AdvertisementPositionApplicationDao::selectAdvertisementPositionApplications($advertisementPositionID, $dbConnection);
         }
     } catch (Exception $ex) {
         $applications = null;
     }
     return $applications;
 }
 public function updateAdvertisementApplication($memberID, $applicationDetails, $dbConnection)
 {
     $preparedStatement = null;
     $processed = false;
     try {
         if ($memberID != null & $applicationDetails->getVariable(AdvertisementPositionApplication::ADVERTISEMENT_POSITION_ID) !== null) {
             $updateQuery = AdvertisementPositionApplicationDao::getAdvertisementApplicationUpdateQuery($advertisementDetails);
             $preparedStatement = AdvertisementPositionApplicationDao::getAdvertisementUpdatePreparedStatement($updateQuery, $memberID, $advertisementDetails, $dbConnection);
             if ($preparedStatement->execute()) {
             }
             $processed = true;
             $preparedStatement = null;
         }
     } catch (Exception $ex) {
         echo 'Caught exception: ' . $ex->getMessage() . "\n";
     }
     return $processed;
 }