- 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> staticLabels, Properties properties) Creates a new base object from aSymbolicNamename, a list of labels and a set of properties. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal AliasedExpressionCreates an alias for this node.final SortItemCreates a new sort item of this node in ascending order.final SortItemCreates a new sort item of this node in descending order.Returns the labels associated with thisNode.protected final PropertiesReturns set of properties for this node.final SymbolicNameReturn a symbolic name.final Optional<SymbolicName>Returns an optional symbolic name.final ConditionA condition that checks for the presence of labels on a node.final ConditionhasLabels(LabelExpression labels) Deprecated, for removal: This API element is subject to removal in a future version.final ConditionReturns a condition that checks for the presence of a label expression on a node.final FunctionInvocationReturns a new function invocation returning the internal id of this node.final ConditionCreates a new condition whether this node is equal to otherNode.final ConditionisNotEqualTo(Node otherNode) Creates a new condition whether this node is not equal to otherNode.final ConditionCreates a new condition based on this node whether it is not null.final ConditionisNull()Creates a new condition based on this node whether it is null.final FunctionInvocationlabels()Returns a new function invocation returning the labels of this node.final Operationmutate(MapExpression properties) Creates anOperationmutating the properties of this container to a new value.final 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 MapProjectionCreates a map projection based on this container.final MapProjectionUnwraps the list of entries into an array before creating a projection out of it.final PropertyCreates a newPropertyassociated with this element.final PropertyReturns a newPropertyassociated with this element.final Propertyproperty(Expression lookup) Creates a newPropertyassociated with this element.final RelationshiprelationshipBetween(Node other, String... types) Starts building an undirected relationship between thisnodeand theother.final RelationshiprelationshipFrom(Node other, String... types) Starts building an incoming relationship starting at theothernode.final RelationshiprelationshipTo(Node other, String... types) Starts building an outgoing relationship to theothernode.final Operationset(MapExpression properties) Creates anSET operationsetting the properties of this container to a new value.final 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 properties.abstract 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, 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 objectstaticLabels- 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.- Returns:
- set of properties for this node
-
getLabels
Description copied from interface:NodeReturns the labels associated with thisNode. -
getSymbolicName
Description copied from interface:NamedReturns an optional symbolic name.- Specified by:
getSymbolicNamein interfaceNamed- Returns:
- an optional symbolic name
-
getRequiredSymbolicName
Description copied from interface:NamedReturn a symbolic name.- Specified by:
getRequiredSymbolicNamein interfaceNamed- Returns:
- a symbolic name
-
accept
Description copied from interface:Visitable -
hasLabels
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NodeReturns a condition that checks for the presence of a label expression on a node. -
hasLabels
Description copied from interface:NodeA condition that checks for the presence of labels on a node. -
hasLabels
Description copied from interface:NodeReturns a 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
Description copied from interface:NodeReturns a new function invocation returning the internal id of this node.- Specified by:
internalIdin interfaceNode- Returns:
- a new function invocation returning the internal id of this node
-
labels
Description copied from interface:NodeReturns a new function invocation returning the labels of this node. -
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
Description copied from interface:PropertyAccessorReturns a newPropertyassociated with this element.- 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:
-