Module org.neo4j.driver
Package org.neo4j.driver.internal.value
Class EntityValueAdapter<V extends Entity>
java.lang.Object
org.neo4j.driver.internal.types.InternalMapAccessorWithDefaultValue
org.neo4j.driver.internal.value.ValueAdapter
org.neo4j.driver.internal.value.ObjectValueAdapter<V>
org.neo4j.driver.internal.value.EntityValueAdapter<V>
- All Implemented Interfaces:
org.neo4j.bolt.connection.values.Value,org.neo4j.driver.internal.AsValue,InternalValue,MapAccessor,MapAccessorWithDefaultValue,Value
- Direct Known Subclasses:
NodeValue,RelationshipValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasEntity()Returns the value as aEntity, if possible.asMap()Return the underlying map as a map of string keys and values converted usingValue.asObject().Return the underlying map as a map of string keys and values converted using the supplied function.Retrieve the value of the property with the given keykeys()If the underlying value supportskey-based indexing, return an iterable of the keys in the map, this applies tomap,nodeandTypeSystem.RELATIONSHIP()relationship} values.intsize()If the underlying value is a collection type, return the number of values in the collection.Methods inherited from class org.neo4j.driver.internal.value.ObjectValueAdapter
asObject, equals, hashCode, toStringMethods inherited from class org.neo4j.driver.internal.value.ValueAdapter
asBoltVector, asBoolean, asBoolean, asByteArray, asByteArray, asDouble, asDouble, asFloat, asFloat, asInt, asInt, asIsoDuration, asIsoDuration, asList, asList, asList, asList, asLocalDate, asLocalDate, asLocalDateTime, asLocalDateTime, asLocalTime, asLocalTime, asLong, asLong, asMap, asMap, asMapped, asNode, asNumber, asOffsetDateTime, asOffsetDateTime, asOffsetTime, asOffsetTime, asPath, asPoint, asPoint, asRelationship, asString, asString, asUnsupportedType, asValue, asVector, asZonedDateTime, asZonedDateTime, computeOrDefault, containsKey, get, hasType, isEmpty, isFalse, isNull, isTrue, typeConstructor, values, valuesMethods inherited from class org.neo4j.driver.internal.types.InternalMapAccessorWithDefaultValue
get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.neo4j.driver.internal.value.InternalValue
as, as, asBoltIsoDuration, asBoltMap, asBoltPoint, boltValues, getBoltValueMethods inherited from interface org.neo4j.driver.types.MapAccessorWithDefaultValue
get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getMethods inherited from interface org.neo4j.bolt.connection.values.Value
boltValueType
-
Constructor Details
-
EntityValueAdapter
-
-
Method Details
-
asEntity
Description copied from interface:ValueReturns the value as aEntity, if possible.- Specified by:
asEntityin interfaceValue- Overrides:
asEntityin classValueAdapter- Returns:
- the value as a
Entity, if possible
-
asMap
Description copied from interface:MapAccessorReturn the underlying map as a map of string keys and values converted usingValue.asObject().This is equivalent to calling
MapAccessor.asMap(Function)withValues.ofObject().- Specified by:
asMapin interfaceMapAccessor- Overrides:
asMapin classValueAdapter- Returns:
- the value as a Java map
-
asMap
Description copied from interface:MapAccessorReturn the underlying map as a map of string keys and values converted using the supplied function.- Specified by:
asMapin interfaceMapAccessor- Overrides:
asMapin classValueAdapter- Type Parameters:
T- the type of map values- Parameters:
mapFunction- a function to map from Value to T. SeeValuesfor some predefined functions, such asValues.ofBoolean(),Values.ofList(Function).- Returns:
- the value as a map from string keys to values of type T obtained from mapping the original map values, if possible
- See Also:
-
size
public int size()Description copied from interface:ValueIf the underlying value is a collection type, return the number of values in the collection.For
TypeSystem.LIST()list} values, this will return the size of the list.For
mapvalues, this will return the number of entries in the map.For
nodeandTypeSystem.RELATIONSHIP()relationship} values, this will return the number of properties.For
pathvalues, this returns the length (number of relationships) in the path.- Specified by:
sizein interfaceMapAccessor- Specified by:
sizein interfaceValue- Overrides:
sizein classValueAdapter- Returns:
- the number of values in an underlying collection
-
keys
Description copied from interface:ValueIf the underlying value supportskey-based indexing, return an iterable of the keys in the map, this applies tomap,nodeandTypeSystem.RELATIONSHIP()relationship} values.- Specified by:
keysin interfaceMapAccessor- Specified by:
keysin interfaceValue- Overrides:
keysin classValueAdapter- Returns:
- the keys in the value
-
get
Description copied from interface:MapAccessorRetrieve the value of the property with the given key- Specified by:
getin interfaceMapAccessor- Overrides:
getin classValueAdapter- Parameters:
key- the key of the property- Returns:
- the property's value or a
NullValueif no such key exists
-