From e4d9cce81b2009b7edb54f705cdf8615c38b73c5 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:28:45 -0700 Subject: [PATCH 1/2] fix(doc): Fix return types for batch interface --- .../com/google/cloud/datastore/Batch.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java index eb4abd854..16e4313fd 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java @@ -53,9 +53,13 @@ interface Response { /** * {@inheritDoc} * - *

If an entity for {@code entity.getKey()} does not exists, {@code entity} is inserted. + *

If an entity for {@code entity.getKey()} does not exist, {@code entity} is inserted. * Otherwise, {@link #submit()} will throw a {@link DatastoreException} with {@link * DatastoreException#getReason()} equal to {@code "ALREADY_EXISTS"}. + * + * @param entity the entity to be added to the datastore + * @return The entity that was added + * @throws DatastoreException if there was any failure */ @Override Entity add(FullEntity entity); @@ -67,6 +71,10 @@ interface Response { * exists, {@link #submit()} will throw a {@link DatastoreException} with {@link * DatastoreException#getReason()} equal to {@code "ALREADY_EXISTS"}. All entities in {@code * entities} whose key did not exist are inserted. + * + * @param entities entities to be added to the datastore + * @return A list of entities that have been added + * @throws DatastoreException if there was any failure */ @Override List add(FullEntity... entities); @@ -74,10 +82,15 @@ interface Response { /** * Submit the batch to the Datastore. * - * @throws DatastoreException if there was any failure or if batch is not longer active + * @return Response of the batch submit operation. + * @throws DatastoreException if there was any failure or if batch is no longer active */ Response submit(); - /** Returns the batch associated {@link Datastore}. */ + /** + * Returns the batch associated {@link Datastore}. + * + * @return The batch associated datastore + * */ Datastore getDatastore(); } From 1badd4452644056f759f773a7be6fc6f46d62752 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 29 Oct 2024 00:33:26 +0000 Subject: [PATCH 2/2] chore: generate libraries at Tue Oct 29 00:30:42 UTC 2024 --- .../src/main/java/com/google/cloud/datastore/Batch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java index 16e4313fd..882a4db25 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/Batch.java @@ -91,6 +91,6 @@ interface Response { * Returns the batch associated {@link Datastore}. * * @return The batch associated datastore - * */ + */ Datastore getDatastore(); }