Package org.neo4j.cypherdsl.core
Class SymbolicName
- java.lang.Object
-
- org.neo4j.cypherdsl.core.SymbolicName
-
- All Implemented Interfaces:
Expression
,Visitable
@API(status=EXPERIMENTAL, since="1.0") public class SymbolicName extends java.lang.Object implements Expression
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Condition
asCondition()
Transform this symbolic name so it can be used directly as condition.SymbolicName
concat(java.lang.String otherValue)
Creates a new symbolic name by concatenatingotherValue
to this names value.boolean
equals(java.lang.Object o)
java.lang.String
getValue()
int
hashCode()
MapProjection
project(java.lang.Object... entries)
Creates a map projection based on this node.MapProjection
project(java.util.List<java.lang.Object> entries)
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.java.lang.String
toString()
-
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, concat, contains, descending, divide, endsWith, eq, gt, gte, in, isEmpty, isEqualTo, isFalse, isNotEqualTo, isNotNull, isNull, isTrue, lt, lte, matches, matches, multiply, ne, pow, property, remainder, startsWith, subtract
-
-
-
-
Method Detail
-
getValue
@API(status=INTERNAL) public java.lang.String getValue()
- Returns:
- The value of this symbolic name.
-
concat
public SymbolicName concat(java.lang.String otherValue)
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
-
asCondition
public Condition asCondition()
Transform this symbolic name so it can be used directly as condition.- Returns:
- this name as a condition
- Since:
- 2021.0.0
-
project
public MapProjection project(java.util.List<java.lang.Object> entries)
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
public MapProjection project(java.lang.Object... entries)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-