Record Class StatementCatalog.Property

java.lang.Object
java.lang.Record
org.neo4j.cypherdsl.core.StatementCatalog.Property
Record Components:
owningToken - Zero or many owning tokens for a property
name - The name of the resolved property
Enclosing interface:
StatementCatalog

public static record StatementCatalog.Property(Set<StatementCatalog.Token> owningToken, String name) extends Record
A property that has been resolved. In case this property has been resolved for an entity, the entity itself will be defined by its set of tokens. Tokens are guaranteed to be sorted and will be of the same type.
  • Constructor Details

    • Property

      public Property(String name)
      Creates a new property without an owner.
      Parameters:
      name - The name of the resolved property
    • Property

      public Property(StatementCatalog.Token owningToken, String name)
      Creates a new property with a single owning token.
      Parameters:
      owningToken - The owning token
      name - The name of the resolved property
    • Property

      public Property(Set<StatementCatalog.Token> owningToken, String name)
      The constructor enforces the use of unmodifiable sets and unique types accross tokens.
      Parameters:
      owningToken - Zero or many owning tokens for a property
      name - The name of the resolved property
  • Method Details

    • owningType

      public Optional<StatementCatalog.Token.Type> owningType()
      Returns:
      An optional, owning type.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • owningToken

      public Set<StatementCatalog.Token> owningToken()
      Returns the value of the owningToken record component.
      Returns:
      the value of the owningToken record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component