Class JoinNode

java.lang.Object
org.litebridge.orm.api.select.ast.JoinNode
All Implemented Interfaces:
QueryNode

public final class JoinNode extends Object implements QueryNode
Represents a JOIN clause metadata in the query AST.
  • Constructor Details

    • JoinNode

      public JoinNode(@Nullable QueryNode previous, String type, @Nullable Class<?> dtoClass, @Nullable Class<?> sourceDtoClass, @Nullable String tableName)
      Constructs a new JoinNode.
      Parameters:
      previous - the previous node in the chain
      type - the type of join (e.g., INNER, LEFT)
      dtoClass - the DTO class being joined
      sourceDtoClass - the source DTO class
      tableName - the name of the table being joined
    • JoinNode

      public JoinNode(@Nullable QueryNode previous, String type, @Nullable Class<?> dtoClass, @Nullable String tableName)
      Constructs a new JoinNode without a source DTO class.
      Parameters:
      previous - the previous node in the chain
      type - the type of join
      dtoClass - the DTO class being joined
      tableName - the name of the table being joined
  • Method Details

    • previous

      public @Nullable QueryNode previous()
      Description copied from interface: QueryNode
      Returns the previous node in the chain, or null if this is the root node.
      Specified by:
      previous in interface QueryNode
      Returns:
      the previous node
    • type

      public String type()
      Returns the type of join.
      Returns:
      the join type
    • dtoClass

      public @Nullable Class<?> dtoClass()
      Returns the DTO class being joined.
      Returns:
      the DTO class
    • sourceDtoClass

      public @Nullable Class<?> sourceDtoClass()
      Returns the source DTO class.
      Returns:
      the source DTO class
    • tableName

      public @Nullable String tableName()
      Returns the name of the table being joined.
      Returns:
      the table name
    • condition

      public @Nullable QueryNode condition()
      Returns the join condition node.
      Returns:
      the condition node
    • withCondition

      public JoinNode withCondition(@Nullable QueryNode condition)
      Sets the join condition node.
      Parameters:
      condition - the condition node to set
      Returns:
      this join node instance
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object