Record Class PropertyDefinition

java.lang.Object
java.lang.Record
org.umlg.sqlg.structure.PropertyDefinition
Record Components:
propertyType - The type of the property
multiplicity - The multiplicity of the property
defaultLiteral - The default value of the property
checkConstraint - A constraint on valid values for the property.
temp - Only to be used internally. If true then the multiplicity will not be validated.

public record PropertyDefinition(PropertyType propertyType, Multiplicity multiplicity, String defaultLiteral, String checkConstraint, boolean temp) extends Record
Represents a Vertex or Edge property.
  • Constructor Details

    • PropertyDefinition

      public PropertyDefinition(PropertyType propertyType, Multiplicity multiplicity, String defaultLiteral, String checkConstraint, boolean temp)
      Creates an instance of a PropertyDefinition record class.
      Parameters:
      propertyType - the value for the propertyType record component
      multiplicity - the value for the multiplicity record component
      defaultLiteral - the value for the defaultLiteral record component
      checkConstraint - the value for the checkConstraint record component
      temp - the value for the temp record component
  • Method Details

    • of

      public static PropertyDefinition of(PropertyType propertyType)
    • temp

      public static PropertyDefinition temp(PropertyType propertyType)
    • of

      public static PropertyDefinition of(PropertyType propertyType, Multiplicity multiplicity)
    • of

      public static PropertyDefinition of(PropertyType propertyType, Multiplicity multiplicity, String defaultLiteral)
    • of

      public static PropertyDefinition of(PropertyType propertyType, Multiplicity multiplicity, String defaultLiteral, String checkConstraint)
    • toNotifyJson

      public com.fasterxml.jackson.databind.node.ObjectNode toNotifyJson()
    • fromNotifyJson

      public static PropertyDefinition fromNotifyJson(com.fasterxml.jackson.databind.JsonNode jsonNode)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • propertyType

      public PropertyType propertyType()
      Returns the value of the propertyType record component.
      Returns:
      the value of the propertyType record component
    • multiplicity

      public Multiplicity multiplicity()
      Returns the value of the multiplicity record component.
      Returns:
      the value of the multiplicity record component
    • defaultLiteral

      public String defaultLiteral()
      Returns the value of the defaultLiteral record component.
      Returns:
      the value of the defaultLiteral record component
    • checkConstraint

      public String checkConstraint()
      Returns the value of the checkConstraint record component.
      Returns:
      the value of the checkConstraint record component
    • temp

      public boolean temp()
      Returns the value of the temp record component.
      Returns:
      the value of the temp record component