org.springframework.batch.item.data.builder

## 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 the `Neo4jItemWriter`
  Since:
    4.0
  Author:
    Glenn Renfro
  See Also:
    `Neo4jItemWriter`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Neo4jItemWriterBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Neo4jItemWriter<T>` | `build()` Validates and builds a `Neo4jItemWriter`.
    `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 create `Session` instances for interacting with Neo4j.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Neo4jItemWriterBuilder

          public Neo4jItemWriterBuilder()

  - ### 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 create `Session` 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 a `Neo4jItemWriter`.
      Returns:
        a `Neo4jItemWriter`