public function fromObject($dbBatchJob)
 {
     parent::fromObject($dbBatchJob);
     $this->queueTime = $dbBatchJob->getQueueTime(null);
     // to return the timestamp and not string
     $this->finishTime = $dbBatchJob->getFinishTime(null);
     // to return the timestamp and not string
     if (!$dbBatchJob instanceof BatchJob) {
         return $this;
     }
     $dbData = $dbBatchJob->getData();
     $this->fromData($dbBatchJob, $dbData);
     if ($this->data) {
         $this->jobSubType = $this->data->fromSubType($dbBatchJob->getJobSubType());
     }
     return $this;
 }
Пример #2
0
 public function fromBatchJob($dbBatchJob, BatchJobLock $dbBatchJobLock = null)
 {
     parent::fromObject($dbBatchJob);
     $this->queueTime = $dbBatchJob->getQueueTime(null);
     // to return the timestamp and not string
     $this->finishTime = $dbBatchJob->getFinishTime(null);
     // to return the timestamp and not string
     if (!$dbBatchJob instanceof BatchJob) {
         return $this;
     }
     $dbData = $dbBatchJob->getData();
     $this->fromData($dbBatchJob, $dbData);
     if ($this->data) {
         $this->jobSubType = $this->data->fromSubType($dbBatchJob->getJobSubType());
     }
     if ($dbBatchJobLock) {
         $this->fromLockObject($dbBatchJob, $dbBatchJobLock);
     } else {
         $this->lockVersion = $dbBatchJob->getLockInfo()->getLockVersion();
         $this->estimatedEffort = $dbBatchJob->getLockInfo()->getEstimatedEffort();
     }
     return $this;
 }