- Type Parameters:
SELF- The type of this node
- All Implemented Interfaces:
Visitable,ExposesProperties<Node>,ExposesRelationships<Relationship>,IdentifiableElement,Named,Node,PatternElement,PropertyAccessor,PropertyContainer
- Since:
- 2021.1.0
- Author:
- Michael J. Simons
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new base object from a set of labels.protectedNodeBase(SymbolicName symbolicName, List<NodeLabel> labels, Properties properties) Creates a new base object from aSymbolicNamename, a list of labels and a set of properties -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal @NotNull AliasedExpressionCreates an alias for this node.final @NotNull SortItemCreates a new sort item of this node in ascending order.final @NotNull SortItemCreates a new sort item of this node in descending order.protected final Propertiesfinal @NotNull SymbolicNamefinal @NotNull Optional<SymbolicName>final @NotNull ConditionA condition that checks for the presence of labels on a node.final @NotNull ConditionhasLabels(LabelExpression labels) A condition that checks for the presence of a label expression on a nodefinal @NotNull FunctionInvocationfinal @NotNull ConditionCreates a new condition whether this node is equal to otherNode.final @NotNull ConditionisNotEqualTo(Node otherNode) Creates a new condition whether this node is not equal to otherNode.final @NotNull ConditionCreates a new condition based on this node whether it is not null.final @NotNull ConditionisNull()Creates a new condition based on this node whether it is null.final @NotNull FunctionInvocationlabels()final @NotNull Operationmutate(MapExpression properties) Creates anOperationmutating the properties of this container to a new value.final @NotNull OperationCreates anOperationmutating the properties of this container to a new value.final SELFCreates a copy of this node with a new symbolic name.abstract SELFnamed(SymbolicName newSymbolicName) This method needs to be implemented to provide new, type safe instances of this node.final @NotNull MapProjectionCreates a map projection based on this container.final @NotNull MapProjectionUnwraps the list of entries into an array before creating a projection out of it.final @NotNull PropertyCreates a newPropertyassociated with this element.final @NotNull Propertyproperty(@NotNull Expression lookup) Creates a newPropertyassociated with this element.final @NotNull Propertyfinal @NotNull RelationshiprelationshipBetween(Node other, String... types) Starts building an undirected relationship between thisnodeand theother.final @NotNull RelationshiprelationshipFrom(Node other, String... types) Starts building an incoming relationship starting at theothernode.final @NotNull RelationshiprelationshipTo(Node other, String... types) Starts building an outgoing relationship to theothernode.final @NotNull Operationset(MapExpression properties) Creates anSET operationsetting the properties of this container to a new value.final @NotNull OperationCreates anSET operationsetting the properties of this container to a new value.toString()Mostvisitableswill render themselves into a Cypher fragment preceded with the actual classname.final SELFwithProperties(Object... keysAndValues) Creates a copy of this property container with additional properties.final SELFwithProperties(Map<String, Object> newProperties) A new object with a new set of propertiesabstract SELFwithProperties(MapExpression newProperties) This method needs to be implemented to provide new, type safe instances of this node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.neo4j.cypherdsl.core.ExposesRelationships
relationshipBetween, relationshipFrom, relationshipTo, relationshipWithMethods inherited from interface org.neo4j.cypherdsl.core.Named
asExpressionMethods inherited from interface org.neo4j.cypherdsl.core.Node
as, ascending, descending, elementId, hasLabels, hasLabels, internalId, isEqualTo, isNotEqualTo, isNotNull, isNull, labelsMethods inherited from interface org.neo4j.cypherdsl.core.PatternElement
whereMethods inherited from interface org.neo4j.cypherdsl.core.PropertyAccessor
property, property, property
-
Constructor Details
-
NodeBase
Creates a new base object from a set of labels.- Parameters:
primaryLabel- The primary labeladditionalLabels- An optional list of additional ones.
-
NodeBase
Creates a new base object from aSymbolicNamename, a list of labels and a set of properties- Parameters:
symbolicName- The symbolic name for this node objectlabels- The list of labels, no primary is givenproperties- A set of properties
-
-
Method Details
-
named
Description copied from interface:NodeCreates a copy of this node with a new symbolic name. -
named
This method needs to be implemented to provide new, type safe instances of this node. -
withProperties
Description copied from interface:ExposesPropertiesCreates a copy of this property container with additional properties. Creates a property container without properties when no properties are passed to this method.- Specified by:
withPropertiesin interfaceExposesProperties<SELF extends Node>- Parameters:
keysAndValues- A list of key and values. Must be an even number, with alternatingStringandExpression.- Returns:
- The new property container.
-
withProperties
A new object with a new set of properties- Specified by:
withPropertiesin interfaceExposesProperties<SELF extends Node>- Parameters:
newProperties- A map with the new properties- Returns:
- A new object
-
withProperties
This method needs to be implemented to provide new, type safe instances of this node.- Specified by:
withPropertiesin interfaceExposesProperties<SELF extends Node>- Parameters:
newProperties- the new properties (can be null to remove exiting properties).- Returns:
- A new node
-
getProperties
- Returns:
- Set of properties for this node
-
getLabels
-
getSymbolicName
- Specified by:
getSymbolicNamein interfaceNamed- Returns:
- An optional symbolic name.
-
getRequiredSymbolicName
- Specified by:
getRequiredSymbolicNamein interfaceNamed- Returns:
- A symbolic name
-
accept
Description copied from interface:Visitable -
hasLabels
Description copied from interface:NodeA condition that checks for the presence of labels on a node. -
hasLabels
Description copied from interface:NodeA condition that checks for the presence of a label expression on a node -
isEqualTo
Description copied from interface:NodeCreates a new condition whether this node is equal to otherNode. -
isNotEqualTo
Description copied from interface:NodeCreates a new condition whether this node is not equal to otherNode.- Specified by:
isNotEqualToin interfaceNode- Parameters:
otherNode- The node to compare this node to.- Returns:
- A condition.
-
isNull
Description copied from interface:NodeCreates a new condition based on this node whether it is null. -
isNotNull
Description copied from interface:NodeCreates a new condition based on this node whether it is not null. -
descending
Description copied from interface:NodeCreates a new sort item of this node in descending order.- Specified by:
descendingin interfaceNode- Returns:
- A sort item.
-
ascending
Description copied from interface:NodeCreates a new sort item of this node in ascending order. -
as
Description copied from interface:NodeCreates an alias for this node. -
internalId
- Specified by:
internalIdin interfaceNode- Returns:
- A new function invocation returning the internal id of this node.
-
labels
-
relationshipTo
Description copied from interface:ExposesRelationshipsStarts building an outgoing relationship to theothernode.- Specified by:
relationshipToin interfaceExposesRelationships<Relationship>- Parameters:
other- The other end of the outgoing relationshiptypes- The types to match- Returns:
- An ongoing relationship definition, that can be used to specify the type
-
relationshipFrom
Description copied from interface:ExposesRelationshipsStarts building an incoming relationship starting at theothernode.- Specified by:
relationshipFromin interfaceExposesRelationships<Relationship>- Parameters:
other- The source of the incoming relationshiptypes- The types to match- Returns:
- An ongoing relationship definition, that can be used to specify the type
-
relationshipBetween
Description copied from interface:ExposesRelationshipsStarts building an undirected relationship between thisnodeand theother.- Specified by:
relationshipBetweenin interfaceExposesRelationships<Relationship>- Parameters:
other- The other end of the relationshiptypes- The types to match- Returns:
- An ongoing relationship definition, that can be used to specify the type
-
toString
Description copied from interface:VisitableMostvisitableswill render themselves into a Cypher fragment preceded with the actual classname. The representation however is not cached - in contrast to the ones for full statements. UsingtoStringis recommended for debugging purposes mainly, and not for production use.The concrete classname has been prepended to help debugging and actually to discourage using fragments to build queries without explicitly rendering them, either as statement or going through the renderer on purpose.
-
property
Description copied from interface:PropertyAccessorCreates a newPropertyassociated with this element. This property can be used as a lookup in other expressions. It does not add a value to the property.Note: The element does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.
- Specified by:
propertyin interfacePropertyAccessor- Parameters:
name- property name, must not be null or empty.- Returns:
- a new
Propertyassociated with this element
-
property
- Specified by:
propertyin interfacePropertyAccessor- Parameters:
names- a list of nested property names- Returns:
- a new
Propertyassociated with this element - See Also:
-
property
Description copied from interface:PropertyAccessorCreates a newPropertyassociated with this element. This property can be used as a lookup in other expressions. It does not add a value to the property.The new
Propertyobject is a dynamic lookup, based on theexpressionpassed to this method. The expression can be example another property, a function result or a Cypher parameter. A property defined in such a way will render asp[expression].Note: The element does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.
- Specified by:
propertyin interfacePropertyAccessor- Parameters:
lookup- the expression that is evaluated to lookup this property.- Returns:
- a new
Propertyassociated with this element
-
mutate
Description copied from interface:PropertyContainerCreates anOperationmutating the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
mutatein interfacePropertyContainer- Parameters:
parameter- the new properties- Returns:
- A new operation.
-
mutate
Description copied from interface:PropertyContainerCreates anOperationmutating the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
mutatein interfacePropertyContainer- Parameters:
properties- the new properties- Returns:
- A new operation.
-
set
Description copied from interface:PropertyContainerCreates anSET operationsetting the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
setin interfacePropertyContainer- Parameters:
parameter- the new properties- Returns:
- A new operation.
-
set
Description copied from interface:PropertyContainerCreates anSET operationsetting the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
setin interfacePropertyContainer- Parameters:
properties- the new properties- Returns:
- A new operation.
-
project
Description copied from interface:PropertyContainerUnwraps the list of entries into an array before creating a projection out of it.- Specified by:
projectin interfacePropertyContainer- Parameters:
entries- A list of entries for the projection- Returns:
- A map projection.
- See Also:
-
project
Description copied from interface:PropertyContainerCreates a map projection based on this container. The container needs a symbolic name for this to work.- Specified by:
projectin interfacePropertyContainer- Parameters:
entries- A list of entries for the projection- Returns:
- A map projection.
- See Also:
-