Skip to content

Commit

Permalink
Add getters for collection and mode in MongoItemWriter
Browse files Browse the repository at this point in the history
Resolves #3973
  • Loading branch information
santfirax authored and fmbenhassine committed Aug 22, 2023
1 parent 83b2a2a commit 5e51547
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 5e51547

Please sign in to comment.