Class RelationshipChain

    • Method Detail

      • named

        @NotNull
        public @NotNull RelationshipChain named​(String newSymbolicName)
        Replaces the last element of this chains with a copy of the relationship with the new symbolic name.
        Specified by:
        named in interface RelationshipPattern
        Parameters:
        newSymbolicName - The new symbolic name to use
        Returns:
        A new chain
      • named

        @NotNull
        public @NotNull RelationshipChain named​(SymbolicName newSymbolicName)
        Replaces the last element of this chains with a copy of the relationship with the new symbolic name.
        Specified by:
        named in interface RelationshipPattern
        Parameters:
        newSymbolicName - The new symbolic name to use
        Returns:
        A new chain
        Since:
        2021.1.1
      • properties

        @NotNull
        @Contract(pure=true)
        public @NotNull RelationshipChain properties​(MapExpression newProperties)
        Adds properties to the last element of this chain.
        Parameters:
        newProperties - the new properties (can be null to remove exiting properties).
        Returns:
        A new chain
      • properties

        @NotNull
        @Contract(pure=true)
        public @NotNull RelationshipChain properties​(Object... keysAndValues)
        Adds properties to the last element of this chain.
        Parameters:
        keysAndValues - A list of key and values. Must be an even number, with alternating String and Expression.
        Returns:
        A new chain
      • asCondition

        @NotNull
        public @NotNull Condition asCondition()
        Description copied from interface: RelationshipPattern
        Transform this pattern into a condition. All names of the patterns must be known upfront in the final statement, as PatternExpressions are not allowed to introduce new variables.
        Specified by:
        asCondition in interface RelationshipPattern
        Returns:
        A condition based on this pattern.
      • accept

        public void accept​(Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
        Specified by:
        accept in interface Visitable
        Parameters:
        visitor - the visitor to notify, must not be null.