@API(status=INTERNAL,
since="6.0")
public final class MappingSupport
extends Object
| Modifier and Type | Method and Description |
|---|---|
static Object |
getRelationshipOrRelationshipPropertiesObject(Neo4jMappingContext neo4jMappingContext,
boolean hasRelationshipProperties,
boolean isDynamicAssociation,
Object valueToStore,
PersistentPropertyAccessor<?> propertyAccessor)
Extract the relationship properties or just the related object if there are no relationship properties
attached.
|
static Predicate<org.neo4j.driver.Value> |
isListContainingOnly(org.neo4j.driver.types.Type collectionType,
org.neo4j.driver.types.Type requiredType)
A helper that produces a predicate to check whether a
Value is a list value and contains only other
values with a given type. |
static Collection<?> |
unifyRelationshipValue(Neo4jPersistentProperty property,
Object rawValue)
The value for a relationship can be a scalar object (1:1), a collection (1:n), a map (1:n, but with dynamic
relationship types) or a map (1:n) with properties for each relationship.
|
public static Collection<?> unifyRelationshipValue(Neo4jPersistentProperty property, @Nullable Object rawValue)
rawValue - The raw value to unifypublic static Predicate<org.neo4j.driver.Value> isListContainingOnly(org.neo4j.driver.types.Type collectionType, org.neo4j.driver.types.Type requiredType)
Value is a list value and contains only other
values with a given type.collectionType - The required collection type systemrequiredType - The required typepublic static Object getRelationshipOrRelationshipPropertiesObject(Neo4jMappingContext neo4jMappingContext, boolean hasRelationshipProperties, boolean isDynamicAssociation, Object valueToStore, PersistentPropertyAccessor<?> propertyAccessor)
neo4jMappingContext - - current mapping contexthasRelationshipProperties - - does this relationship has propertiesisDynamicAssociation - - is the defined relationship a dynamic associationvalueToStore - - either a plain object or RelationshipPropertiesWithEntityHolderpropertyAccessor - - PropertyAccessor for the valueCopyright © 2019–2021 Neo4j, Neo4j Sweden AB. All rights reserved.