Record Class UsingNode

java.lang.Object
java.lang.Record
org.litebridge.orm.engine.ast.UsingNode
Record Components:
previous - The root MergeNode for the MERGE INTO statement
table - The name of the table to merge into
dtoClass - The DTO class to merge into
on - AST nodes representing the condition(s) to use for matching rows
All Implemented Interfaces:
QueryNode

public record UsingNode(MergeNode previous, @Nullable String table, @Nullable Class<?> dtoClass, @Nullable QueryNode query, @Nullable ValuesSpec values, @Nullable String alias, QueryNode on) extends Record implements QueryNode
Represents a USING clause in a MERGE statement in the query AST.
  • Constructor Details

    • UsingNode

      public UsingNode(MergeNode previous, QueryNode query, @Nullable String alias, QueryNode on)
    • UsingNode

      public UsingNode(MergeNode previous, ValuesSpec values, @Nullable String alias, QueryNode on)
    • UsingNode

      public UsingNode(MergeNode previous, @Nullable String table, @Nullable Class<?> dtoClass, @Nullable QueryNode query, @Nullable ValuesSpec values, @Nullable String alias, QueryNode on)
      Creates an instance of a UsingNode record class.
      Parameters:
      previous - the value for the previous record component
      table - the value for the table record component
      dtoClass - the value for the dtoClass record component
      query - the value for the query record component
      values - the value for the values record component
      alias - the value for the alias record component
      on - the value for the on 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 MergeNode previous()
      Returns the value of the previous record component.
      Specified by:
      previous in interface QueryNode
      Returns:
      the value of the previous record component
    • table

      public @Nullable String table()
      Returns the value of the table record component.
      Returns:
      the value of the table record component
    • dtoClass

      public @Nullable Class<?> dtoClass()
      Returns the value of the dtoClass record component.
      Returns:
      the value of the dtoClass record component
    • query

      public @Nullable QueryNode query()
      Returns the value of the query record component.
      Returns:
      the value of the query record component
    • values

      public @Nullable ValuesSpec values()
      Returns the value of the values record component.
      Returns:
      the value of the values record component
    • alias

      public @Nullable String alias()
      Returns the value of the alias record component.
      Returns:
      the value of the alias record component
    • on

      public QueryNode on()
      Returns the value of the on record component.
      Returns:
      the value of the on record component