Module: Neo4j::Core::Property::Java

Included in:
Node, Relationship
Defined in:
lib/neo4j-core/property/java.rb

Overview

This module is only used for documentation purpose It simplify declares the java methods which are available Java org.neo4j.graphdb.PropertyContainer

Instance Method Summary collapse

Instance Method Details

#get_property(key, default_value = nil) ⇒ String, ...

Returns the property value associated with the given key, or a default value. The value is of one of the valid property types, i.e. a Java primitive, a String or an array of any of the valid types. If there’s no property associated with key an unchecked exception is raised. The idiomatic way to avoid an exception for an unknown key and instead get null back is to use a default value: Object valueOrNull = nodeOrRel.getProperty( key, null )

Raises:

  • an exception if not given a default value and there is no property for the given key

See Also:

  • Neo4j::Core:Property#[]


24
25
# File 'lib/neo4j-core/property/java.rb', line 24

def get_property(key, default_value = nil)
end

#graph_databaseJava::Neo4jGraphdbGraphDatabaseService

Get the GraphDatabaseService that this Node or Relationship belongs to.



12
13
# File 'lib/neo4j-core/property/java.rb', line 12

def graph_database
end

#property_keysObject



28
29
# File 'lib/neo4j-core/property/java.rb', line 28

def property_keys
end

#remove_property(key) ⇒ String, ...

Removes the property associated with the given key and returns the old value.



35
36
# File 'lib/neo4j-core/property/java.rb', line 35

def remove_property(key)
end

#set_property(key, value) ⇒ Object

Sets the property value for the given key to value. The property value must be one of the valid property types, i.e:

  • boolean or boolean[]

  • byte or byte[]

  • short or short[]

  • int or int[]

  • long or long[]

  • float or float[]

  • double or double[]

  • char or char[]

  • java.lang.String or String[]

Notice that JRuby does map Ruby primitive object (e.g. Fixnum) to java primitives automatically. Also, nil is not an accepted property value.



54
55
# File 'lib/neo4j-core/property/java.rb', line 54

def set_property(key, value)
end