Interface Property

All Superinterfaces:
Expression, IdentifiableElement, Visitable

@API(status=STABLE, since="1.0") public non-sealed interface Property extends Expression, IdentifiableElement
A property. A property might belong to a container such as a Node or Relationship, but it's not uncommon to extract single properties from maps or from various datatypes such as a duration returned from stored procedures. The container can be retrieved via getContainer() in case the property belongs to a node or relationship.

A property has always a reference to the name of the object it was extracted from.

Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • getName

      @API(status=STABLE, since="2021.1.0") @NotNull @Contract(pure=true) @NotNull String getName()
      Returns the concatenated names of the property or the external reference (See referencedAs(String)) if set.
      Returns:
      A name to reference the property under in an external application
    • getNames

      @NotNull @Contract(pure=true) @NotNull List<PropertyLookup> getNames()
      Returns:
      The actual property being looked up. The order matters, so this will return a list, not a collection.
    • getContainer

      @Contract(pure=true) Named getContainer()
      Returns:
      The container "owning" this property.
    • getContainerReference

      @API(status=INTERNAL, since="2023.1.0") @NotNull @Contract(pure=true) default @NotNull Expression getContainerReference()
      Returns:
      A reference to the container owning this property
    • referencedAs

      @API(status=STABLE, since="2021.1.0") @NotNull @Contract(pure=true) @NotNull Property referencedAs(String newReference)
      Creates a new property with an external reference.
      Parameters:
      newReference - An arbitrary, external reference
      Returns:
      A new property
    • to

      @NotNull @Contract(pure=true) @NotNull Operation to(Expression expression)
      Creates an Operation setting this property to a new value. The property does not track the operations created with this method.
      Parameters:
      expression - expression describing the new value
      Returns:
      A new operation.