Class Neo4jItemWriterBuilder<T>
- java.lang.Object
- org.springframework.batch.item.data.builder.Neo4jItemWriterBuilder<T>
public class Neo4jItemWriterBuilder<T> extends java.lang.Object
A builder implementation for theNeo4jItemWriter
- Since:
- 4.0
- Author:
- Glenn Renfro
- See Also:
Neo4jItemWriter
Constructor Summary
Constructors Constructor Description Neo4jItemWriterBuilder()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Neo4jItemWriter<T>
build()
Validates and builds aNeo4jItemWriter
.Neo4jItemWriterBuilder<T>
delete(boolean delete)
Boolean flag indicating whether the writer should save or delete the item at write time.Neo4jItemWriterBuilder<T>
sessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
Establish the session factory that will be used to createSession
instances for interacting with Neo4j.
Method Detail
delete
public Neo4jItemWriterBuilder<T> delete(boolean delete)
Boolean flag indicating whether the writer should save or delete the item at write time.- Parameters:
delete
- true if write should delete item, false if item should be saved. Default is false.- Returns:
- The current instance of the builder
- See Also:
Neo4jItemWriter.setDelete(boolean)
sessionFactory
public Neo4jItemWriterBuilder<T> sessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
Establish the session factory that will be used to createSession
instances for interacting with Neo4j.- Parameters:
sessionFactory
- sessionFactory to be used.- Returns:
- The current instance of the builder
- See Also:
Neo4jItemWriter.setSessionFactory(SessionFactory)
build
public Neo4jItemWriter<T> build()
Validates and builds aNeo4jItemWriter
.- Returns:
- a
Neo4jItemWriter