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
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 -
Method Summary
Modifier and TypeMethodDescriptioncom.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
commit()
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
isActive()
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
rollback()
<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 interfacecom.google.cloud.datastore.DatastoreReader
- Specified by:
get
in interfacecom.google.cloud.datastore.Transaction
-
get
- Specified by:
get
in interfacecom.google.cloud.datastore.DatastoreReader
- Specified by:
get
in interfacecom.google.cloud.datastore.Transaction
-
fetch
- Specified by:
fetch
in interfacecom.google.cloud.datastore.DatastoreReader
- Specified by:
fetch
in interfacecom.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 interfacecom.google.cloud.datastore.DatastoreReader
- Specified by:
run
in interfacecom.google.cloud.datastore.Transaction
-
addWithDeferredIdAllocation
public void addWithDeferredIdAllocation(com.google.cloud.datastore.FullEntity<?>... entities) - Specified by:
addWithDeferredIdAllocation
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
addWithDeferredIdAllocation
in interfacecom.google.cloud.datastore.Transaction
-
add
public com.google.cloud.datastore.Entity add(com.google.cloud.datastore.FullEntity<?> entity) - Specified by:
add
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
add
in interfacecom.google.cloud.datastore.DatastoreWriter
- Specified by:
add
in interfacecom.google.cloud.datastore.Transaction
-
add
public List<com.google.cloud.datastore.Entity> add(com.google.cloud.datastore.FullEntity<?>... entities) - Specified by:
add
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
add
in interfacecom.google.cloud.datastore.DatastoreWriter
- Specified by:
add
in interfacecom.google.cloud.datastore.Transaction
-
update
public void update(com.google.cloud.datastore.Entity... entities) - Specified by:
update
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
update
in interfacecom.google.cloud.datastore.DatastoreWriter
- Specified by:
update
in interfacecom.google.cloud.datastore.Transaction
-
delete
public void delete(com.google.cloud.datastore.Key... keys) - Specified by:
delete
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
delete
in interfacecom.google.cloud.datastore.DatastoreWriter
- Specified by:
delete
in interfacecom.google.cloud.datastore.Transaction
-
putWithDeferredIdAllocation
public void putWithDeferredIdAllocation(com.google.cloud.datastore.FullEntity<?>... entities) - Specified by:
putWithDeferredIdAllocation
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
putWithDeferredIdAllocation
in interfacecom.google.cloud.datastore.Transaction
-
put
public com.google.cloud.datastore.Entity put(com.google.cloud.datastore.FullEntity<?> entity) - Specified by:
put
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
put
in interfacecom.google.cloud.datastore.DatastoreWriter
- Specified by:
put
in interfacecom.google.cloud.datastore.Transaction
-
put
public List<com.google.cloud.datastore.Entity> put(com.google.cloud.datastore.FullEntity<?>... entities) - Specified by:
put
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
put
in interfacecom.google.cloud.datastore.DatastoreWriter
- Specified by:
put
in interfacecom.google.cloud.datastore.Transaction
-
commit
public com.google.cloud.datastore.Transaction.Response commit()- Specified by:
commit
in interfacecom.google.cloud.datastore.Transaction
-
isActive
public boolean isActive()- Specified by:
isActive
in interfacecom.google.cloud.datastore.DatastoreBatchWriter
- Specified by:
isActive
in interfacecom.google.cloud.datastore.Transaction
-
getDatastore
public com.google.cloud.datastore.Datastore getDatastore()- Specified by:
getDatastore
in interfacecom.google.cloud.datastore.Transaction
-
getTransactionId
public com.google.protobuf.ByteString getTransactionId()- Specified by:
getTransactionId
in interfacecom.google.cloud.datastore.Transaction
-
rollback
public void rollback()- Specified by:
rollback
in interfacecom.google.cloud.datastore.Transaction
-