Module: Neo4j::Core::Node

Included in:
Node
Defined in:
lib/neo4j-core/node/node.rb,
lib/neo4j-core/node/class_methods.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#_java_nodeObject

This method can be used to access the none wrapped neo4j node/relationship java object. Notice that this method is defined in the Java::OrgNeo4jKernel::impl.core.NodeProxy or RelationshipProxy which is return by Neo4j::Node.new



24
25
26
# File 'lib/neo4j-core/node/node.rb', line 24

def _java_node
  self
end

#classObject

Overrides the class so that the java object feels like a Ruby object.



35
36
37
# File 'lib/neo4j-core/node/node.rb', line 35

def class
  Neo4j::Node
end

#delObject

Delete the node and all its relationship.

It might raise an exception if this method was called without a Transaction, or if it failed to delete the node (it maybe was already deleted).

If this method raise an exception you may also get an exception when the transaction finish. This method is defined in the Java::OrgNeo4jKernel::impl.core.NodeProxy which is return by Neo4j::Node.new



15
16
17
18
19
# File 'lib/neo4j-core/node/node.rb', line 15

def del
  _rels.each { |r| r.del }
  delete
  nil
end

#exist?true, false

Same as Neo4j::Node#exist? or Neo4j::Relationship#exist?



30
31
32
# File 'lib/neo4j-core/node/node.rb', line 30

def exist?
  Neo4j::Node.exist?(self)
end