protected function processProgramPaymentPlan($row)
 {
     if ($row) {
         $manager = $this->getContainer()->get('doctrine.orm.entity_manager');
         $programPaymentPlanRepo = $manager->getRepository('TSK\\ProgramBundle\\Entity\\ProgramPaymentPlan');
         $programRepo = $manager->getRepository('TSK\\ProgramBundle\\Entity\\Program');
         $program = $programRepo->findOneBy(array('legacyProgramId' => $row[0]));
         if ($program) {
             $programPaymentPlan = $programPaymentPlanRepo->findOneBy(array('program' => $program, 'name' => $row[1]));
             if (!$programPaymentPlan) {
                 $programPaymentPlan = new ProgramPaymentPlan();
                 $programPaymentPlan->setProgram($program);
                 $programPaymentPlan->setName($row[1]);
                 $programPaymentPlan->setPrice($row[2]);
                 $programPaymentPlan->setPaymentsData(array('paymentsData' => json_encode($this->processPaymentsData($row[3]))));
                 $programPaymentPlan->setDeferralDurationMonths($row[4]);
                 $programPaymentPlan->setDeferralDistributionStrategy($row[5]);
                 $programPaymentPlan->setDeferralRate($row[6]);
                 $programPaymentPlan->setIsActive(true);
                 $manager->persist($programPaymentPlan);
                 $manager->flush();
             }
         } else {
             throw new \Exception('Unable to find program ' . $row[0]);
         }
     }
 }