Class TransactionWrapper

java.lang.Object
com.googlecode.objectify.util.cmd.TransactionWrapper
All Implemented Interfaces:
com.google.cloud.datastore.DatastoreBatchWriter, com.google.cloud.datastore.DatastoreReader, com.google.cloud.datastore.DatastoreReaderWriter, com.google.cloud.datastore.DatastoreWriter, com.google.cloud.datastore.Transaction

public class TransactionWrapper extends Object implements com.google.cloud.datastore.Transaction
Simple pass-through to the base methods.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.cloud.datastore.Transaction

    com.google.cloud.datastore.Transaction.Response
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.cloud.datastore.Entity
    add(com.google.cloud.datastore.FullEntity<?> entity)
     
    List<com.google.cloud.datastore.Entity>
    add(com.google.cloud.datastore.FullEntity<?>... entities)
     
    void
    addWithDeferredIdAllocation(com.google.cloud.datastore.FullEntity<?>... entities)
     
    com.google.cloud.datastore.Transaction.Response
     
    void
    delete(com.google.cloud.datastore.Key... keys)
     
    List<com.google.cloud.datastore.Entity>
    fetch(com.google.cloud.datastore.Key... keys)
     
    com.google.cloud.datastore.Entity
    get(com.google.cloud.datastore.Key key)
     
    Iterator<com.google.cloud.datastore.Entity>
    get(com.google.cloud.datastore.Key... key)
     
    com.google.cloud.datastore.Datastore
     
    com.google.protobuf.ByteString
     
    boolean
     
    com.google.cloud.datastore.Entity
    put(com.google.cloud.datastore.FullEntity<?> entity)
     
    List<com.google.cloud.datastore.Entity>
    put(com.google.cloud.datastore.FullEntity<?>... entities)
     
    void
    putWithDeferredIdAllocation(com.google.cloud.datastore.FullEntity<?>... entities)
     
    void
     
    <T> com.google.cloud.datastore.QueryResults<T>
    run(com.google.cloud.datastore.Query<T> query)
     
    void
    update(com.google.cloud.datastore.Entity... entities)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.cloud.datastore.DatastoreReader

    runAggregation
  • Constructor Details

    • TransactionWrapper

      public TransactionWrapper()
  • Method Details

    • get

      public com.google.cloud.datastore.Entity get(com.google.cloud.datastore.Key key)
      Specified by:
      get in interface com.google.cloud.datastore.DatastoreReader
      Specified by:
      get in interface com.google.cloud.datastore.Transaction
    • get

      public Iterator<com.google.cloud.datastore.Entity> get(com.google.cloud.datastore.Key... key)
      Specified by:
      get in interface com.google.cloud.datastore.DatastoreReader
      Specified by:
      get in interface com.google.cloud.datastore.Transaction
    • fetch

      public List<com.google.cloud.datastore.Entity> fetch(com.google.cloud.datastore.Key... keys)
      Specified by:
      fetch in interface com.google.cloud.datastore.DatastoreReader
      Specified by:
      fetch in interface com.google.cloud.datastore.Transaction
    • run

      public <T> com.google.cloud.datastore.QueryResults<T> run(com.google.cloud.datastore.Query<T> query)
      Specified by:
      run in interface com.google.cloud.datastore.DatastoreReader
      Specified by:
      run in interface com.google.cloud.datastore.Transaction
    • addWithDeferredIdAllocation

      public void addWithDeferredIdAllocation(com.google.cloud.datastore.FullEntity<?>... entities)
      Specified by:
      addWithDeferredIdAllocation in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      addWithDeferredIdAllocation in interface com.google.cloud.datastore.Transaction
    • add

      public com.google.cloud.datastore.Entity add(com.google.cloud.datastore.FullEntity<?> entity)
      Specified by:
      add in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      add in interface com.google.cloud.datastore.DatastoreWriter
      Specified by:
      add in interface com.google.cloud.datastore.Transaction
    • add

      public List<com.google.cloud.datastore.Entity> add(com.google.cloud.datastore.FullEntity<?>... entities)
      Specified by:
      add in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      add in interface com.google.cloud.datastore.DatastoreWriter
      Specified by:
      add in interface com.google.cloud.datastore.Transaction
    • update

      public void update(com.google.cloud.datastore.Entity... entities)
      Specified by:
      update in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      update in interface com.google.cloud.datastore.DatastoreWriter
      Specified by:
      update in interface com.google.cloud.datastore.Transaction
    • delete

      public void delete(com.google.cloud.datastore.Key... keys)
      Specified by:
      delete in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      delete in interface com.google.cloud.datastore.DatastoreWriter
      Specified by:
      delete in interface com.google.cloud.datastore.Transaction
    • putWithDeferredIdAllocation

      public void putWithDeferredIdAllocation(com.google.cloud.datastore.FullEntity<?>... entities)
      Specified by:
      putWithDeferredIdAllocation in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      putWithDeferredIdAllocation in interface com.google.cloud.datastore.Transaction
    • put

      public com.google.cloud.datastore.Entity put(com.google.cloud.datastore.FullEntity<?> entity)
      Specified by:
      put in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      put in interface com.google.cloud.datastore.DatastoreWriter
      Specified by:
      put in interface com.google.cloud.datastore.Transaction
    • put

      public List<com.google.cloud.datastore.Entity> put(com.google.cloud.datastore.FullEntity<?>... entities)
      Specified by:
      put in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      put in interface com.google.cloud.datastore.DatastoreWriter
      Specified by:
      put in interface com.google.cloud.datastore.Transaction
    • commit

      public com.google.cloud.datastore.Transaction.Response commit()
      Specified by:
      commit in interface com.google.cloud.datastore.Transaction
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface com.google.cloud.datastore.DatastoreBatchWriter
      Specified by:
      isActive in interface com.google.cloud.datastore.Transaction
    • getDatastore

      public com.google.cloud.datastore.Datastore getDatastore()
      Specified by:
      getDatastore in interface com.google.cloud.datastore.Transaction
    • getTransactionId

      public com.google.protobuf.ByteString getTransactionId()
      Specified by:
      getTransactionId in interface com.google.cloud.datastore.Transaction
    • rollback

      public void rollback()
      Specified by:
      rollback in interface com.google.cloud.datastore.Transaction