Record Class CanonicalRecord

java.lang.Object
java.lang.Record
guru.interlis.convconf.runtime.CanonicalRecord

public record CanonicalRecord(String className, String ident, String parent, String structAttr, Map<String,String> values) extends Record
Canonical record bridging source and target logical models.
  • Constructor Details

    • CanonicalRecord

      public CanonicalRecord(String className, String ident, String parent, String structAttr, Map<String,String> values)
      Creates an instance of a CanonicalRecord record class.
      Parameters:
      className - the value for the className record component
      ident - the value for the ident record component
      parent - the value for the parent record component
      structAttr - the value for the structAttr record component
      values - the value for the values record component
  • Method Details

    • of

      public static CanonicalRecord of(String className, String ident)
    • 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.
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • ident

      public String ident()
      Returns the value of the ident record component.
      Returns:
      the value of the ident record component
    • parent

      public String parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • structAttr

      public String structAttr()
      Returns the value of the structAttr record component.
      Returns:
      the value of the structAttr record component
    • values

      public Map<String,String> values()
      Returns the value of the values record component.
      Returns:
      the value of the values record component