@Override
  public void createJob(UUID jobId, PortabilityJob job) throws IOException {
    Preconditions.checkNotNull(jobId);
    Transaction transaction = datastore.newTransaction();
    Entity shouldNotExist = transaction.get(getJobKey(jobId));
    if (shouldNotExist != null) {
      transaction.rollback();
      throw new IOException(
          "Record already exists for jobID: " + jobId + ". Record: " + shouldNotExist);
    }
    Entity entity = createNewEntity(jobId, job.toMap());
    try {
      transaction.put(entity);
    } catch (DatastoreException e) {
      transaction.rollback();
      throw new IOException(
          "Could not create initial record for jobID: " + jobId + ". Record: " + entity, e);
    }
    transaction.commit();
  }
Inserts a new {@link PortabilityJob} keyed by {@code jobId} in Datastore.

<p>To update an existing {@link PortabilityJob} instead, use {@link JobStore#update}.

@throws IOException if a job already exists for {@code jobId}, or if there was a different
    problem inserting the job.
extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleJobStore.java