public class Neo4jBatchInserterNode extends Object
Modifier and Type | Field and Description |
---|---|
protected Neo4jBatchDatabase |
batchDb
Neo4jBatchDatabase.
|
Constructor and Description |
---|
Neo4jBatchInserterNode(Neo4jBatchDatabase batchDb,
String labelsField,
String batchIndexName,
String batchIndexFieldName,
Boolean insertIndexFieldName,
Integer indexCacheSize)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected org.neo4j.graphdb.Label[] |
computeLabels(Object incoming) |
protected Map<String,Object> |
constructMapFromObject(Object obj,
List<String> columnList)
Convert a Talend object to a map of attributes.
|
void |
create(Object incoming,
List<String> columnList)
Insert a node.
|
void |
finish()
Finish the process.
|
protected Object |
getObjectProperty(Object obj,
String property)
Retrieve the value of a field on an object
|
protected Neo4jBatchDatabase batchDb
public Neo4jBatchInserterNode(Neo4jBatchDatabase batchDb, String labelsField, String batchIndexName, String batchIndexFieldName, Boolean insertIndexFieldName, Integer indexCacheSize) throws IOException
batchDb
- Batch inserter databaselabelsField
- Field name where to find labelsbatchIndexName
- Batch index namebatchIndexFieldName
- Batch index field nameinsertIndexFieldName
- If we have to save the index fieldindexCacheSize
- Size of the cache indexIOException
public void create(Object incoming, List<String> columnList)
incoming
- Talend objectcolumnList
- Attributes list of the Talend objectpublic void finish()
protected org.neo4j.graphdb.Label[] computeLabels(Object incoming) throws IllegalAccessException
IllegalAccessException
protected Object getObjectProperty(Object obj, String property) throws IllegalAccessException
obj
- the objectproperty
- the property to retrieveIllegalAccessException
protected Map<String,Object> constructMapFromObject(Object obj, List<String> columnList) throws IllegalAccessException
obj
- The talend objectcolumnList
- List of object propertiesIllegalAccessException
Copyright © 2017. All rights reserved.