File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,16 @@ public void setDelete(boolean delete) {
84
84
this .delete = delete ;
85
85
}
86
86
87
+ /**
88
+ * Indicates if the items being passed to the writer are to be saved or removed from
89
+ * the data store. If is false (default), the items will be saved. If is true, the
90
+ * items will be removed.
91
+ * @return removal indicator
92
+ */
93
+ protected boolean isDelete () {
94
+ return delete ;
95
+ }
96
+
87
97
/**
88
98
* Set the {@link MongoOperations} to be used to save items to be written.
89
99
* @param template the template implementation to be used.
@@ -109,6 +119,14 @@ public void setCollection(String collection) {
109
119
this .collection = collection ;
110
120
}
111
121
122
+ /**
123
+ * Get the name of the Mongo collection to be written to.
124
+ * @return the name of the collection.
125
+ */
126
+ protected String getCollection () {
127
+ return collection ;
128
+ }
129
+
112
130
/**
113
131
* If a transaction is active, buffer items to be written just before commit.
114
132
* Otherwise write items using the provided template.
You can’t perform that action at this time.
0 commit comments