Class Neo4jItemWriter<T>

java.lang.Object
org.springframework.batch.item.data.Neo4jItemWriter<T>
All Implemented Interfaces:
ItemWriter<T>, org.springframework.beans.factory.InitializingBean

@Deprecated public class Neo4jItemWriter<T> extends Object implements ItemWriter<T>, org.springframework.beans.factory.InitializingBean
Deprecated.
since 5.0 in favor of the item writer from https://github.com/spring-projects/spring-batch-extensions/blob/main/spring-batch-neo4j

A ItemWriter implementation that writes to a Neo4j database.

This writer is thread-safe once all properties are set (normal singleton behavior) so it can be used in multiple concurrent transactions.

Author:
Michael Minella, Glenn Renfro, Mahmoud Ben Hassine
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.apache.commons.logging.Log
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Checks mandatory properties
    protected void
    doWrite(List<? extends T> items)
    Deprecated.
    Performs the actual write using the template.
    void
    setDelete(boolean delete)
    Deprecated.
    Boolean flag indicating whether the writer should save or delete the item at write time.
    void
    setSessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
    Deprecated.
    Establish the session factory that will be used to create Session instances for interacting with Neo4j.
    void
    write(List<? extends T> items)
    Deprecated.
    Write all items to the data store.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      protected static final org.apache.commons.logging.Log logger
      Deprecated.
  • Constructor Details

    • Neo4jItemWriter

      public Neo4jItemWriter()
      Deprecated.
  • Method Details

    • setDelete

      public void setDelete(boolean delete)
      Deprecated.
      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.
    • setSessionFactory

      public void setSessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
      Deprecated.
      Establish the session factory that will be used to create Session instances for interacting with Neo4j.
      Parameters:
      sessionFactory - sessionFactory to be used.
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Deprecated.
      Checks mandatory properties
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
      See Also:
      • InitializingBean.afterPropertiesSet()
    • write

      public void write(List<? extends T> items) throws Exception
      Deprecated.
      Write all items to the data store.
      Specified by:
      write in interface ItemWriter<T>
      Parameters:
      items - items to be written
      Throws:
      Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.
      See Also:
    • doWrite

      protected void doWrite(List<? extends T> items)
      Deprecated.
      Performs the actual write using the template. This can be overridden by a subclass if necessary.
      Parameters:
      items - the list of items to be persisted.