Skip to content

Commit

Permalink
fix(doc): Fix return types for batch interface (#1645)
Browse files Browse the repository at this point in the history
* fix(doc): Fix return types for batch interface

* chore: generate libraries at Tue Oct 29 00:30:42 UTC 2024

---------

Co-authored-by: cloud-java-bot <[email protected]>
  • Loading branch information
cindy-peng and cloud-java-bot authored Oct 29, 2024
1 parent 173a883 commit 1189211
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ interface Response {
/**
* {@inheritDoc}
*
* <p>If an entity for {@code entity.getKey()} does not exists, {@code entity} is inserted.
* <p>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);
Expand All @@ -67,17 +71,26 @@ 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<Entity> add(FullEntity<?>... entities);

/**
* 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();
}

0 comments on commit 1189211

Please sign in to comment.