Example #1
0
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         if ($this->aRegTestPeriod !== null) {
             if (!$this->aRegTestPeriod->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aRegTestPeriod->getValidationFailures());
             }
         }
         if ($this->aTestSubject !== null) {
             if (!$this->aTestSubject->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aTestSubject->getValidationFailures());
             }
         }
         if ($this->aLocation !== null) {
             if (!$this->aLocation->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aLocation->getValidationFailures());
             }
         }
         if (($retval = TestSchedulePeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collTestGrades !== null) {
             foreach ($this->collTestGrades as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collTestApplScheds !== null) {
             foreach ($this->collTestApplScheds as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVTestApplScheds !== null) {
             foreach ($this->collVTestApplScheds as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVTestApplSched1s !== null) {
             foreach ($this->collVTestApplSched1s as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVTestApplSched2s !== null) {
             foreach ($this->collVTestApplSched2s as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVTestLocation1s !== null) {
             foreach ($this->collVTestLocation1s as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVTestLocation2s !== null) {
             foreach ($this->collVTestLocation2s as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }