java.lang.Object
org.neo4j.cypherdsl.core.SymbolicName
- All Implemented Interfaces:
Visitable,Expression,IdentifiableElement
@API(status=EXPERIMENTAL,
since="1.0")
public final class SymbolicName
extends Object
implements Expression, IdentifiableElement
A symbolic name to identify nodes, relationships and aliased items.
While OpenCypher extends the UNICODE IDENTIFIER AND PATTERN SYNTAX with some characters, this DSL uses the same identifier Java itself uses for simplicity and until otherwise needed.
- Since:
- 1.0
- Author:
- Michael J. Simons, Andreas Berger
-
Method Summary
Modifier and TypeMethodDescription@NotNull ExpressionTransform this element into an expression@NotNull SymbolicNameCreates a new symbolic name by concatenatingotherValueto this names value.booleangetValue()inthashCode()@NotNull MapProjectionCreates a map projection based on this node.@NotNull MapProjectionA list will never be a valid entry for a map projection, so this convenient method prevents trying to create one from a list of objects.toString()Mostvisitableswill render themselves into a Cypher fragment preceded with the actual classname.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.neo4j.cypherdsl.core.Expression
add, as, as, ascending, asCondition, concat, contains, descending, divide, endsWith, eq, gt, gte, hasSize, in, includesAll, includesAny, isEmpty, isEqualTo, isFalse, isNotEqualTo, isNotNull, isNull, isTrue, lt, lte, matches, matches, multiply, ne, pow, property, remainder, size, sorted, startsWith, subtract
-
Method Details
-
getValue
- Returns:
- The value of this symbolic name.
-
concat
Creates a new symbolic name by concatenatingotherValueto this names value. Returns this ifotherValueis empty.- Parameters:
otherValue- The value to concat.- Returns:
- A new symbolic name
-
project
A list will never be a valid entry for a map projection, so this convenient method prevents trying to create one from a list of objects. It will delegate toproject(Object...)with the content of the list.- Parameters:
entries- A list of entries for the projection- Returns:
- A map projection.
- Since:
- 2021.0.0
-
project
Creates a map projection based on this node. The node needs a symbolic name for this to work.Entries of type
Stringinentriesfollowed by anExpressionwill be treated as map keys pointing to the expression in the projection,Stringentries alone will be treated as property lookups on the node.- Parameters:
entries- A list of entries for the projection- Returns:
- A map projection.
- Since:
- 2021.0.0
-
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.
-
equals
-
hashCode
public int hashCode() -
asExpression
Description copied from interface:IdentifiableElementTransform this element into an expression- Specified by:
asExpressionin interfaceIdentifiableElement- Returns:
- this element as an expression. Will return the same instance if it is already an expression.
-