|
||||||||||
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 has a property with name . |
boolean |
relationshipHasProperty(long relationship,
String propertyName)
Returns true iff the relationship with id has a property with name . |
void |
removeNodeProperty(long node,
String propertyName)
Removes the property named from the node with id , if present. |
void |
removeRelationshipProperty(long relationship,
String propertyName)
Removes the property named from the relationship with 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 of node with id to the value . |
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 of relationship with id to the value . |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean nodeHasProperty(long node, String propertyName)
BatchInserter
nodeHasProperty
in interface BatchInserter
node
- The node id of the node to check.propertyName
- The property name to check for
public boolean relationshipHasProperty(long relationship, String propertyName)
BatchInserter
relationshipHasProperty
in interface BatchInserter
relationship
- The relationship id of the relationship to check.propertyName
- The property name to check for
public void setNodeProperty(long node, String propertyName, Object propertyValue)
BatchInserter
setNodeProperty
in interface BatchInserter
node
- 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 setpublic void setRelationshipProperty(long relationship, String propertyName, Object propertyValue)
BatchInserter
setRelationshipProperty
in interface BatchInserter
relationship
- 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 setpublic void removeNodeProperty(long node, String propertyName)
BatchInserter
removeNodeProperty
in interface BatchInserter
node
- The id of the node from which to remove the propertypropertyName
- The name of the propertypublic void removeRelationshipProperty(long relationship, String propertyName)
BatchInserter
removeRelationshipProperty
in interface BatchInserter
relationship
- 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 BatchInserter
properties
- 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 BatchInserter
id
- 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 BatchInserter
node1
- 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 BatchInserter
node
- 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 BatchInserter
rel
- 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 BatchInserter
nodeId
- the id of the node.
true
if the node exists.public Map<String,Object> getNodeProperties(long nodeId)
BatchInserter
getNodeProperties
in interface BatchInserter
nodeId
- the id of the node.
public Iterable<Long> getRelationshipIds(long nodeId)
BatchInserter
getRelationshipIds
in interface BatchInserter
nodeId
- the id of the node.
public Iterable<BatchRelationship> getRelationships(long nodeId)
BatchInserter
relationships
connected
to the node with supplied id.
getRelationships
in interface BatchInserter
nodeId
- 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 BatchInserter
relId
- the relationship id.
public org.neo4j.kernel.impl.batchinsert.SimpleRelationship getSimpleRelationshipById(long relId)
public Map<String,Object> getRelationshipProperties(long relId)
BatchInserter
getRelationshipProperties
in interface BatchInserter
relId
- the id of the relationship.
public void shutdown()
BatchInserter
After this method has been invoked any other method call to this batch inserter is illegal.
shutdown
in interface BatchInserter
public String toString()
toString
in class Object
public String getStoreDir()
BatchInserter
getStoreDir
in interface BatchInserter
public long getReferenceNode()
BatchInserter
-1
if it doesn't exist.
getReferenceNode
in interface BatchInserter
public GraphDatabaseService getBatchGraphDbService()
public org.neo4j.kernel.impl.index.IndexStore getIndexStore()
public IdGeneratorFactory getIdGeneratorFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |