BATCH-2567: Allow to access MongoItemWriter.template from a subclass
JIRA: https://jira.spring.io/browse/BATCH-2567
This commit is contained in:
committed by
Michael Minella
parent
b2f91ae395
commit
cae2cabdce
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,6 +76,16 @@ public class MongoItemWriter<T> implements ItemWriter<T>, InitializingBean {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the {@link MongoOperations} to be used to save items to be written.
|
||||
* This can be called by a subclass if necessary.
|
||||
*
|
||||
* @return template the template implementation to be used.
|
||||
*/
|
||||
protected MongoOperations getTemplate() {
|
||||
return template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the name of the Mongo collection to be written to.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user