Skip to content

Commit 4b889f9

Browse files
fmbenhassinemminella
authored andcommitted
BATCH-2587: Deprecate the use of the Neo4jOperations API
1 parent 1e938e3 commit 4b889f9

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/AbstractNeo4jItemReader.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,6 +55,7 @@
5555
* </p>
5656
*
5757
* @author Michael Minella
58+
* @author Mahmoud Ben Hassine
5859
* @since 3.07
5960
*/
6061
public abstract class AbstractNeo4jItemReader<T> extends
@@ -148,11 +149,22 @@ public void setOrderByStatement(String orderByStatement) {
148149
*
149150
* @param template the Neo4jOperations instance to use
150151
* @see Neo4jOperations
152+
* @deprecated This API will be removed in v4.x in favor of
153+
* {@code setSessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)}.
151154
*/
155+
@Deprecated
152156
public void setTemplate(Neo4jOperations template) {
153157
this.template = template;
154158
}
155159

160+
/**
161+
* Get the Neo4jOperations instance used by this reader.
162+
*
163+
* @return the Neo4jOperations instance used by this reader
164+
* @deprecated This API will be removed in v4.x in favor of
165+
* {@code org.neo4j.ogm.session.SessionFactory getSessionFactory()}.
166+
*/
167+
@Deprecated
156168
protected final Neo4jOperations getTemplate() {
157169
return this.template;
158170
}

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/Neo4jItemWriter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@
3838
* </p>
3939
*
4040
* @author Michael Minella
41+
* @author Mahmoud Ben Hassine
4142
*
4243
*/
4344
public class Neo4jItemWriter<T> implements ItemWriter<T>, InitializingBean {
@@ -57,7 +58,10 @@ public void setDelete(boolean delete) {
5758
* Set the {@link Neo4jOperations} to be used to save items
5859
*
5960
* @param template the template implementation to be used
61+
* @deprecated This API will be removed in v4.x in favor of
62+
* {@code setSessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)}.
6063
*/
64+
@Deprecated
6165
public void setTemplate(Neo4jOperations template) {
6266
this.template = template;
6367
}

0 commit comments

Comments
 (0)