public static function abortDbBatchJob(BatchJob $dbBatchJob, $force = false)
 {
     if (!$force && in_array($dbBatchJob->getStatus(), BatchJobPeer::getClosedStatusList())) {
         return $dbBatchJob;
     }
     $dbBatchJob->setAbort(1);
     // 1 = true
     // if not currently locked
     if (!$dbBatchJob->getSchedulerId()) {
         $dbBatchJob = self::updateBatchJob($dbBatchJob, BatchJob::BATCHJOB_STATUS_ABORTED);
     } else {
         $dbBatchJob->save();
     }
     // aborts all child jobs
     self::abortChildJobs($dbBatchJob);
     return $dbBatchJob;
 }