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 Expression
Transform this element into an expression@NotNull SymbolicName
Creates a new symbolic name by concatenatingotherValue
to this names value.boolean
getValue()
int
hashCode()
@NotNull MapProjection
Creates a map projection based on this node.@NotNull MapProjection
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.toString()
Mostvisitables
will 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, wait
Methods 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 concatenatingotherValue
to this names value. Returns this ifotherValue
is 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
String
inentries
followed by anExpression
will be treated as map keys pointing to the expression in the projection,String
entries 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: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.
-
equals
-
hashCode
public int hashCode() -
asExpression
Description copied from interface:IdentifiableElement
Transform this element into an expression- Specified by:
asExpression
in interfaceIdentifiableElement
- Returns:
- this element as an expression. Will return the same instance if it is already an expression.
-