public static function populateObject($row)
 {
     $hvrRem = new HighValueRuleReminder();
     $hvrRem->setSeq($row['seq']);
     $hvrRem->setFolderSeq($row['folderseq']);
     $hvrRem->setHighValueRuleSeq($row['highvalueruleseq']);
     $hvrRem->setHighValue($row['highvalue']);
     if ($row['truncatedHighValue']) {
         $hvrRem->setHighValue($row['truncatedHighValue']);
     }
     $hvrRem->setHighValueChannelNo($row['highvaluechannelno']);
     $hvrRem->setReminderDate($row['reminderdate']);
     $hvrRem->setReminderMobile($row['remindermobile']);
     $hvrRem->setReminderEmail($row['reminderemail']);
     return $hvrRem;
 }
 }
 $maxWQD = $arr[0]['wqdfiledataseq'];
 $avgValue = $arr[0][1];
 echo " - Average value found :" . $avgValue . " from seq " . $lastWQDSeq . " to lastSeq :- " . $maxWQD;
 if ($maxWQD != 0) {
     $highValueRule->setLastRuleHitFileDataSeq($maxWQD);
 }
 if ($avgValue > $highValue) {
     echo "\nFound high value occurence";
     $frequency = $highValueRule->getFrequency();
     $hits = $highValueRule->getRuleHits();
     $totHits = $hits + 1;
     $highValueRule->setRuleHits($totHits);
     if ($totHits >= $frequency) {
         echo "\nTotal Hits: {$totHits} and frequency is {$frequency}";
         $highValueReminder = new HighValueRuleReminder();
         $highValueReminder->setFolderSeq($ruleFolderSeq);
         $highValueReminder->setHighValue($avgValue);
         $highValueReminder->setHighValueChannelNo($parameter);
         $highValueReminder->setHighValueRuleSeq($highValueRule->getSeq());
         $highValueReminder->setReminderDate(date("Y-m-d  H:i:s"));
         $highValueReminder->setReminderEmail($highValueRule->getEmail());
         $highValueReminder->setReminderMobile($highValueRule->getMobile());
         $highValueReminder->setReminderIsSent(0);
         $highValueRule->setRuleHits(0);
         $HVRRDS->Save($highValueReminder);
         echo "\nSaved Reminder now";
     }
 }
 //var_dump($highValueRule);
 $HVRDS->Save($highValueRule);