public class Neo4jItemWriter<T> extends Object implements ItemWriter<T>, org.springframework.beans.factory.InitializingBean
A ItemWriter implementation that writes to a Neo4j database using an
implementation of Spring Data's Neo4jOperations.
This writer is thread safe once all properties are set (normal singleton behavior) so it can be used in multiple concurrent transactions.
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
Neo4jItemWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Checks mandatory properties
|
protected void |
doWrite(List<? extends T> items)
Performs the actual write using the template.
|
void |
setDelete(boolean delete) |
void |
setTemplate(org.springframework.data.neo4j.template.Neo4jOperations template)
Set the
Neo4jOperations to be used to save items |
void |
write(List<? extends T> items)
Write all items to the data store.
|
public void setDelete(boolean delete)
public void setTemplate(org.springframework.data.neo4j.template.Neo4jOperations template)
Neo4jOperations to be used to save itemstemplate - the template implementation to be usedpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionInitializingBean.afterPropertiesSet()public void write(List<? extends T> items) throws Exception
write in interface ItemWriter<T>Exception - if there are errors. The framework will catch the
exception and convert or rethrow it as appropriate.ItemWriter.write(java.util.List)Copyright © 2014 Pivotal. All rights reserved.