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
-
#get_property(key, default_value = nil) ⇒ String, ...
Returns the property value associated with the given key, or a default value.
-
#graph_database ⇒ Java::Neo4jGraphdbGraphDatabaseService
Get the GraphDatabaseService that this Node or Relationship belongs to.
-
#property_keys ⇒ Object
All existing property keys, or an empty iterable if this property container has no properties.
-
#remove_property(key) ⇒ String, ...
Removes the property associated with the given key and returns the old value.
-
#set_property(key, value) ⇒ Object
Sets the property value for the given key to value.
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 )
24 25 |
# File 'lib/neo4j-core/property/java.rb', line 24 def get_property(key, default_value = nil) end |
#graph_database ⇒ Java::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_keys ⇒ Object
Returns all existing property keys, or an empty iterable if this property container has no properties.
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 |