diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/MongoItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/MongoItemWriter.java index 81d003b51f..9ea598c5d4 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/MongoItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/MongoItemWriter.java @@ -121,6 +121,15 @@ public void setMode(final Mode mode) { this.mode = mode; } + /** + * Get the operating {@link Mode} of the item writer. + * @return the operating mode + * @since 5.1 + */ + public Mode getMode() { + return mode; + } + /** * Set the {@link MongoOperations} to be used to save items to be written. * @param template the template implementation to be used. @@ -146,6 +155,15 @@ public void setCollection(String collection) { this.collection = collection; } + /** + * Get the Mongo collection name. + * @return the collection name + * @since 5.1 + */ + public String getCollection() { + return collection; + } + /** * If a transaction is active, buffer items to be written just before commit. * Otherwise write items using the provided template.