code: public static void validatePersistedJobExecution(JobExecutionEntity execution) throws PersistenceException {
  
          if (execution.getExecutionId() <= 0) {
  
              long exId = execution.getExecutionId();
  
              PersistenceException e = new PersistenceException(new BatchIllegalIDPersistedException(Long.toString(exId)));
              logger.log(Level.SEVERE, "error.invalid.persisted.exe.id",
                         new Object[] { Long.toString(exId), e });
  
              throw e;
          }
  
      }
docs: Check persisted job execution id and throw exception if any ids violate
  batch id rule: Cannot be <= 0