Record Class MappingPlan.FieldMapping

java.lang.Object
java.lang.Record
org.litebridge.orm.persistence.MappingPlan.FieldMapping
Enclosing class:
MappingPlan

public static record MappingPlan.FieldMapping(int index, FieldAccessor accessor, Class<?> fieldType, boolean isRelatedDto, boolean isNestedDto, @Nullable FieldAccessor relatedPkAccessor) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    FieldMapping(int index, FieldAccessor accessor, Class<?> fieldType, boolean isRelatedDto, boolean isNestedDto, @Nullable FieldAccessor relatedPkAccessor)
    Creates an instance of a FieldMapping record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the accessor record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fieldType record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the index record component.
    boolean
    Returns the value of the isNestedDto record component.
    boolean
    Returns the value of the isRelatedDto record component.
    @Nullable FieldAccessor
    Returns the value of the relatedPkAccessor record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FieldMapping

      public FieldMapping(int index, FieldAccessor accessor, Class<?> fieldType, boolean isRelatedDto, boolean isNestedDto, @Nullable FieldAccessor relatedPkAccessor)
      Creates an instance of a FieldMapping record class.
      Parameters:
      index - the value for the index record component
      accessor - the value for the accessor record component
      fieldType - the value for the fieldType record component
      isRelatedDto - the value for the isRelatedDto record component
      isNestedDto - the value for the isNestedDto record component
      relatedPkAccessor - the value for the relatedPkAccessor record component
  • Method Details

    • 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.
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • accessor

      public FieldAccessor accessor()
      Returns the value of the accessor record component.
      Returns:
      the value of the accessor record component
    • fieldType

      public Class<?> fieldType()
      Returns the value of the fieldType record component.
      Returns:
      the value of the fieldType record component
    • isRelatedDto

      public boolean isRelatedDto()
      Returns the value of the isRelatedDto record component.
      Returns:
      the value of the isRelatedDto record component
    • isNestedDto

      public boolean isNestedDto()
      Returns the value of the isNestedDto record component.
      Returns:
      the value of the isNestedDto record component
    • relatedPkAccessor

      public @Nullable FieldAccessor relatedPkAccessor()
      Returns the value of the relatedPkAccessor record component.
      Returns:
      the value of the relatedPkAccessor record component