Record Class InsertDtoValuesNode

java.lang.Object
java.lang.Record
org.litebridge.orm.engine.ast.InsertDtoValuesNode
Record Components:
previous - the previous node in the chain
dto - the DTO instance to extract values to insert from
All Implemented Interfaces:
QueryNode

public record InsertDtoValuesNode(@Nullable QueryNode previous, Object dto) extends Record implements QueryNode
Represents a VALUES clause of an INSERT STATEMENT in the query AST, specifically for extracting and inserting values from a DTO instance.
  • Constructor Details

    • InsertDtoValuesNode

      public InsertDtoValuesNode(@Nullable QueryNode previous, Object dto)
      Creates an instance of a InsertDtoValuesNode record class.
      Parameters:
      previous - the value for the previous record component
      dto - the value for the dto record component
  • Method Details

    • equals

      public 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.
    • hashCode

      public 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
    • 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
    • previous

      public @Nullable QueryNode previous()
      Returns the value of the previous record component.
      Specified by:
      previous in interface QueryNode
      Returns:
      the value of the previous record component
    • dto

      public Object dto()
      Returns the value of the dto record component.
      Returns:
      the value of the dto record component