Interface PropertyAccessor

All Known Subinterfaces:
Case, Case.CaseEnding, Case.GenericCase, Case.SimpleCase, Condition, Expression, Literal<T>, Node, Property, PropertyContainer, Relationship, SubqueryExpression
All Known Implementing Classes:
AliasedExpression, Asterisk, BooleanLiteral, CollectExpression, Comparison, ConstantCondition, CountExpression, ExistentialSubquery, FunctionInvocation, HasLabelCondition, KeyValueMapEntry, ListComprehension, ListExpression, ListLiteral, ListOperator, MapExpression, MapLiteral, MapProjection, NestedExpression, NodeBase, NullLiteral, NumberLiteral, Operation, Parameter, PatternComprehension, PropertyLookup, RelationshipBase, StringLiteral, SymbolicName, TemporalLiteral

@API(status=STABLE, since="2024.1.0") public interface PropertyAccessor
This interface represents an element that has properties.
Since:
2024.1.0
Author:
Andreas Berger, Michael J. Simons
  • Method Details

    • property

      @NotNull @Contract(pure=true) default @NotNull Property property(@NotNull @NotNull String name)
      Creates a new Property associated with this element. This property can be used as a lookup in other expressions. It does not add a value to the property.

      Note: The element does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.

      Parameters:
      name - property name, must not be null or empty.
      Returns:
      a new Property associated with this element
    • property

      @NotNull @Contract(pure=true) @NotNull Property property(String... names)
      Parameters:
      names - a list of nested property names
      Returns:
      a new Property associated with this element
      See Also:
    • property

      @NotNull @Contract(pure=true) @NotNull Property property(@NotNull @NotNull Expression lookup)
      Creates a new Property associated with this element. 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 the expression 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 as p[expression].

      Note: The element does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.

      Parameters:
      lookup - the expression that is evaluated to lookup this property.
      Returns:
      a new Property associated with this element