|
Neo4j Community | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.unsafe.batchinsert.BatchInserterImpl
public class BatchInserterImpl
| Method Summary | |
|---|---|
void |
createNode(long id,
Map<String,Object> properties)
Creates a node with supplied id and properties. |
long |
createNode(Map<String,Object> properties)
Creates a node assigning next available id to id and also adds any properties supplied. |
long |
createRelationship(long node1,
long node2,
RelationshipType type,
Map<String,Object> properties)
Creates a relationship between two nodes of a specific type. |
GraphDatabaseService |
getBatchGraphDbService()
Deprecated. as of Neo4j 1.7 |
IdGeneratorFactory |
getIdGeneratorFactory()
|
org.neo4j.kernel.impl.index.IndexStore |
getIndexStore()
|
Map<String,Object> |
getNodeProperties(long nodeId)
Returns a map containing all the properties of this node. |
long |
getReferenceNode()
Returns the reference node id or -1 if it doesn't exist. |
BatchRelationship |
getRelationshipById(long relId)
Gets a relationship by id. |
Iterable<Long> |
getRelationshipIds(long nodeId)
Returns an iterable over all the relationship ids connected to node with supplied id. |
Map<String,Object> |
getRelationshipProperties(long relId)
Returns a map containing all the properties of the relationships. |
Iterable<BatchRelationship> |
getRelationships(long nodeId)
Returns an iterable of relationships connected
to the node with supplied id. |
org.neo4j.kernel.impl.batchinsert.SimpleRelationship |
getSimpleRelationshipById(long relId)
|
Iterable<org.neo4j.kernel.impl.batchinsert.SimpleRelationship> |
getSimpleRelationships(long nodeId)
|
String |
getStoreDir()
Returns the path to this Neo4j store. |
boolean |
nodeExists(long nodeId)
Checks if a node with the given id exists. |
boolean |
nodeHasProperty(long node,
String propertyName)
Returns true iff the node with id node has a property with name
propertyName. |
boolean |
relationshipHasProperty(long relationship,
String propertyName)
Returns true iff the relationship with id relationship has a
property with name propertyName. |
void |
removeNodeProperty(long node,
String propertyName)
Removes the property named property from the node with id
id, if present. |
void |
removeRelationshipProperty(long relationship,
String propertyName)
Removes the property named property from the relationship with id
id, if present. |
void |
setNodeProperties(long node,
Map<String,Object> properties)
Sets the properties of a node. |
void |
setNodeProperty(long node,
String propertyName,
Object propertyValue)
Sets the property with name propertyName of node with id
node to the value propertyValue. |
void |
setRelationshipProperties(long rel,
Map<String,Object> properties)
Sets the properties of a relationship. |
void |
setRelationshipProperty(long relationship,
String propertyName,
Object propertyValue)
Sets the property with name propertyName of relationship with id
relationship to the value propertyValue. |
void |
shutdown()
Shuts down this batch inserter syncing all changes that are still only in memory to disk. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean nodeHasProperty(long node,
String propertyName)
BatchInserternode has a property with name
propertyName.
nodeHasProperty in interface BatchInserternode - The node id of the node to check.propertyName - The property name to check for
public boolean relationshipHasProperty(long relationship,
String propertyName)
BatchInserterrelationship has a
property with name propertyName.
relationshipHasProperty in interface BatchInserterrelationship - The relationship id of the relationship to check.propertyName - The property name to check for
public void setNodeProperty(long node,
String propertyName,
Object propertyValue)
BatchInserterpropertyName of node with id
node to the value propertyValue. If the property exists
it is updated, otherwise created.
setNodeProperty in interface BatchInserternode - The node id of the node whose property is to be setpropertyName - The name of the property to setpropertyValue - The value of the property to set
public void setRelationshipProperty(long relationship,
String propertyName,
Object propertyValue)
BatchInserterpropertyName of relationship with id
relationship to the value propertyValue. If the property
exists it is updated, otherwise created.
setRelationshipProperty in interface BatchInserterrelationship - The node id of the relationship whose property is to
be setpropertyName - The name of the property to setpropertyValue - The value of the property to set
public void removeNodeProperty(long node,
String propertyName)
BatchInserterproperty from the node with id
id, if present.
removeNodeProperty in interface BatchInserternode - The id of the node from which to remove the propertypropertyName - The name of the property
public void removeRelationshipProperty(long relationship,
String propertyName)
BatchInserterproperty from the relationship with id
id, if present.
removeRelationshipProperty in interface BatchInserterrelationship - The id of the relationship from which to remove the
propertypropertyName - The name of the propertypublic long createNode(Map<String,Object> properties)
BatchInserter
createNode in interface BatchInserterproperties - a map containing properties or null if no
properties should be added.
public void createNode(long id,
Map<String,Object> properties)
BatchInserter
createNode in interface BatchInserterid - the id of the node to create.properties - map containing properties or null if no
properties should be added.
public long createRelationship(long node1,
long node2,
RelationshipType type,
Map<String,Object> properties)
BatchInserter
createRelationship in interface BatchInserternode1 - the start node.node2 - the end node.type - relationship type.properties - map containing properties or null if no
properties should be added.
public void setNodeProperties(long node,
Map<String,Object> properties)
BatchInserter
For best performance try supply all the nodes properties upon creation
of the node. This method will delete any existing properties so using it
together with BatchInserter.getNodeProperties(long) will have bad performance.
setNodeProperties in interface BatchInserternode - the id of the node.properties - map containing the properties or null to
clear all properties.
public void setRelationshipProperties(long rel,
Map<String,Object> properties)
BatchInserter
For best performance try supply all the relationship properties upon
creation of the relationship. This method will delete any existing
properties so using it together with
BatchInserter.getRelationshipProperties(long) will have bad performance.
setRelationshipProperties in interface BatchInserterrel - the id of the relationship.properties - map containing the properties or null to
clear all properties.public boolean nodeExists(long nodeId)
BatchInserter
nodeExists in interface BatchInserternodeId - the id of the node.
true if the node exists.public Map<String,Object> getNodeProperties(long nodeId)
BatchInserter
getNodeProperties in interface BatchInserternodeId - the id of the node.
public Iterable<Long> getRelationshipIds(long nodeId)
BatchInserter
getRelationshipIds in interface BatchInserternodeId - the id of the node.
public Iterable<BatchRelationship> getRelationships(long nodeId)
BatchInserterrelationships connected
to the node with supplied id.
getRelationships in interface BatchInserternodeId - the id of the node.
public Iterable<org.neo4j.kernel.impl.batchinsert.SimpleRelationship> getSimpleRelationships(long nodeId)
public BatchRelationship getRelationshipById(long relId)
BatchInserter
getRelationshipById in interface BatchInserterrelId - the relationship id.
public org.neo4j.kernel.impl.batchinsert.SimpleRelationship getSimpleRelationshipById(long relId)
public Map<String,Object> getRelationshipProperties(long relId)
BatchInserter
getRelationshipProperties in interface BatchInserterrelId - the id of the relationship.
public void shutdown()
BatchInserterAfter this method has been invoked any other method call to this batch inserter is illegal.
shutdown in interface BatchInserterpublic String toString()
toString in class Objectpublic String getStoreDir()
BatchInserter
getStoreDir in interface BatchInserterpublic long getReferenceNode()
BatchInserter-1 if it doesn't exist.
getReferenceNode in interface BatchInserter@Deprecated public GraphDatabaseService getBatchGraphDbService()
public org.neo4j.kernel.impl.index.IndexStore getIndexStore()
public IdGeneratorFactory getIdGeneratorFactory()
|
Neo4j Community | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||