类 Neo4jItemWriter<T>

  • 所有已实现的接口:
    ItemWriter<T>, org.springframework.beans.factory.InitializingBean

    public class Neo4jItemWriter<T>
    extends java.lang.Object
    implements ItemWriter<T>, org.springframework.beans.factory.InitializingBean

    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.

    作者:
    Michael Minella, Glenn Renfro, Mahmoud Ben Hassine
    • 字段概要

      字段 
      修饰符和类型字段说明
      protected static org.apache.commons.logging.Loglogger 
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidafterPropertiesSet()
      Checks mandatory properties
      protected voiddoWrite​(java.util.List<? extends T> items)
      Performs the actual write using the template.
      voidsetDelete​(boolean delete)
      Boolean flag indicating whether the writer should save or delete the item at write time.
      voidsetSessionFactory​(org.neo4j.ogm.session.SessionFactory sessionFactory)
      Establish the session factory that will be used to create Session instances for interacting with Neo4j.
      voidwrite​(java.util.List<? extends T> items)
      Write all items to the data store.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • logger

        protected static final org.apache.commons.logging.Log logger
    • 方法详细资料

      • setDelete

        public void setDelete​(boolean delete)
        Boolean flag indicating whether the writer should save or delete the item at write time.
        参数:
        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)
        Establish the session factory that will be used to create Session instances for interacting with Neo4j.
        参数:
        sessionFactory - sessionFactory to be used.
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Checks mandatory properties
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
        另请参阅:
        InitializingBean.afterPropertiesSet()
      • write

        public void write​(java.util.List<? extends T> items)
                   throws java.lang.Exception
        Write all items to the data store.
        指定者:
        write 在接口中 ItemWriter<T>
        参数:
        items - items to be written
        抛出:
        java.lang.Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.
        另请参阅:
        ItemWriter.write(java.util.List)
      • doWrite

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