类 Neo4jItemWriter<T>
- java.lang.Object
- org.springframework.batch.item.data.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.Log
logger
构造器概要
构造器 构造器 说明 Neo4jItemWriter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Checks mandatory propertiesprotected void
doWrite(java.util.List<? extends T> items)
Performs the actual write using the template.void
setDelete(boolean delete)
Boolean flag indicating whether the writer should save or delete the item at write time.void
setSessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
Establish the session factory that will be used to createSession
instances for interacting with Neo4j.void
write(java.util.List<? extends T> items)
Write all items to the data store.
字段详细资料
logger
protected static final org.apache.commons.logging.Log logger
构造器详细资料
Neo4jItemWriter
public Neo4jItemWriter()
方法详细资料
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 createSession
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)