- Type Parameters:
SELF
- The type of this node
- All Implemented Interfaces:
Visitable
,ExposesProperties<Node>
,ExposesRelationships<Relationship>
,IdentifiableElement
,Named
,Node
,PatternElement
,PropertyContainer
- Since:
- 2021.1.0
- Author:
- Michael J. Simons
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new base object from a set of labels.protected
NodeBase
(SymbolicName symbolicName, List<NodeLabel> labels, Properties properties) Creates a new base object from aSymbolicName
name, a list of labels and a set of properties -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final @NotNull AliasedExpression
Creates an alias for this node.final @NotNull SortItem
Creates a new sort item of this node in ascending order.final @NotNull SortItem
Creates a new sort item of this node in descending order.protected final Properties
final @NotNull SymbolicName
final @NotNull Optional
<SymbolicName> final @NotNull Condition
A condition that checks for the presence of labels on a node.final @NotNull FunctionInvocation
final @NotNull Condition
Creates a new condition whether this node is equal to otherNode.final @NotNull Condition
isNotEqualTo
(Node otherNode) Creates a new condition whether this node is not equal to otherNode.final @NotNull Condition
Creates a new condition based on this node whether it is not null.final @NotNull Condition
isNull()
Creates a new condition based on this node whether it is null.final @NotNull FunctionInvocation
labels()
final @NotNull Operation
mutate
(MapExpression properties) Creates anOperation
mutating the properties of this container to a new value.final @NotNull Operation
Creates anOperation
mutating the properties of this container to a new value.final SELF
Creates a copy of this node with a new symbolic name.abstract SELF
named
(SymbolicName newSymbolicName) This method needs to be implemented to provide new, type safe instances of this node.final @NotNull MapProjection
Creates a map projection based on this container.final @NotNull MapProjection
Unwraps the list of entries into an array before creating a projection out of it.final @NotNull Property
Creates a newProperty
associated with this property container.final @NotNull Property
final @NotNull Property
property
(Expression lookup) Creates a newProperty
associated with this property container.final @NotNull Relationship
relationshipBetween
(Node other, String... types) Starts building an undirected relationship between thisnode
and theother
.final @NotNull Relationship
relationshipFrom
(Node other, String... types) Starts building an incoming relationship starting at theother
node
.final @NotNull Relationship
relationshipTo
(Node other, String... types) Starts building an outgoing relationship to theother
node
.final @NotNull Operation
set
(MapExpression properties) Creates anSET operation
setting the properties of this container to a new value.final @NotNull Operation
Creates anSET operation
setting the properties of this container to a new value.toString()
Mostvisitables
will render themselves into a Cypher fragment preceded with the actual classname.final SELF
withProperties
(Object... keysAndValues) Creates a copy of this property container with additional properties.final SELF
withProperties
(Map<String, Object> newProperties) A new object with a new set of propertiesabstract SELF
withProperties
(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, wait
Methods inherited from interface org.neo4j.cypherdsl.core.ExposesRelationships
relationshipBetween, relationshipFrom, relationshipTo, relationshipWith
Methods inherited from interface org.neo4j.cypherdsl.core.Named
asExpression
Methods inherited from interface org.neo4j.cypherdsl.core.Node
as, ascending, descending, elementId, hasLabels, internalId, isEqualTo, isNotEqualTo, isNotNull, isNull, labels
Methods inherited from interface org.neo4j.cypherdsl.core.PatternElement
where
-
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 aSymbolicName
name, 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 seto f properties
-
-
Method Details
-
named
Description copied from interface:Node
Creates 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:ExposesProperties
Creates 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:
withProperties
in interfaceExposesProperties<SELF extends Node>
- Parameters:
keysAndValues
- A list of key and values. Must be an even number, with alternatingString
andExpression
.- Returns:
- The new property container.
-
withProperties
A new object with a new set of properties- Specified by:
withProperties
in 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:
withProperties
in 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:
getSymbolicName
in interfaceNamed
- Returns:
- An optional symbolic name.
-
getRequiredSymbolicName
- Specified by:
getRequiredSymbolicName
in interfaceNamed
- Returns:
- A symbolic name
-
accept
Description copied from interface:Visitable
-
hasLabels
Description copied from interface:Node
A condition that checks for the presence of labels on a node. -
isEqualTo
Description copied from interface:Node
Creates a new condition whether this node is equal to otherNode. -
isNotEqualTo
Description copied from interface:Node
Creates a new condition whether this node is not equal to otherNode.- Specified by:
isNotEqualTo
in interfaceNode
- Parameters:
otherNode
- The node to compare this node to.- Returns:
- A condition.
-
isNull
Description copied from interface:Node
Creates a new condition based on this node whether it is null. -
isNotNull
Description copied from interface:Node
Creates a new condition based on this node whether it is not null. -
descending
Description copied from interface:Node
Creates a new sort item of this node in descending order.- Specified by:
descending
in interfaceNode
- Returns:
- A sort item.
-
ascending
Description copied from interface:Node
Creates a new sort item of this node in ascending order. -
as
Description copied from interface:Node
Creates an alias for this node. -
internalId
- Specified by:
internalId
in interfaceNode
- Returns:
- A new function invocation returning the internal id of this node.
-
labels
-
relationshipTo
Description copied from interface:ExposesRelationships
Starts building an outgoing relationship to theother
node
.- Specified by:
relationshipTo
in 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:ExposesRelationships
Starts building an incoming relationship starting at theother
node
.- Specified by:
relationshipFrom
in 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:ExposesRelationships
Starts building an undirected relationship between thisnode
and theother
.- Specified by:
relationshipBetween
in 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:Visitable
Mostvisitables
will 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. UsingtoString
is 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:PropertyContainer
Creates a newProperty
associated with this property container. This property can be used as a lookup in other expressions. It does not add a value to the property.Note: The property container does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.
- Specified by:
property
in interfacePropertyContainer
- Parameters:
name
- property name, must not be null or empty.- Returns:
- a new
Property
associated with this named container
-
property
- Specified by:
property
in interfacePropertyContainer
- Parameters:
names
- a list of nested property names- Returns:
- a new
Property
associated with this named container - See Also:
-
property
Description copied from interface:PropertyContainer
Creates a newProperty
associated with this property container. This property can be used as a lookup in other expressions. It does not add a value to the property.The new
Property
object is a dynamic lookup, based on theexpression
passed 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 property container does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.
- Specified by:
property
in interfacePropertyContainer
- Parameters:
lookup
- the expression that is evaluated to lookup this property.- Returns:
- a new
Property
associated with this named container
-
mutate
Description copied from interface:PropertyContainer
Creates anOperation
mutating the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
mutate
in interfacePropertyContainer
- Parameters:
parameter
- the new properties- Returns:
- A new operation.
-
mutate
Description copied from interface:PropertyContainer
Creates anOperation
mutating the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
mutate
in interfacePropertyContainer
- Parameters:
properties
- the new properties- Returns:
- A new operation.
-
set
Description copied from interface:PropertyContainer
Creates anSET operation
setting the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
set
in interfacePropertyContainer
- Parameters:
parameter
- the new properties- Returns:
- A new operation.
-
set
Description copied from interface:PropertyContainer
Creates anSET operation
setting the properties of this container to a new value. The container does not track the operations created with this method.- Specified by:
set
in interfacePropertyContainer
- Parameters:
properties
- the new properties- Returns:
- A new operation.
-
project
Description copied from interface:PropertyContainer
Unwraps the list of entries into an array before creating a projection out of it.- Specified by:
project
in interfacePropertyContainer
- Parameters:
entries
- A list of entries for the projection- Returns:
- A map projection.
- See Also:
-
project
Description copied from interface:PropertyContainer
Creates a map projection based on this container. The container needs a symbolic name for this to work.- Specified by:
project
in interfacePropertyContainer
- Parameters:
entries
- A list of entries for the projection- Returns:
- A map projection.
- See Also:
-