java.lang.Object
java.lang.Record
org.litebridge.orm.engine.ast.ConditionNode
- Record Components:
previous- the previous node in the chainlogicOperator- the logic operator (AND/OR)lhsColumn- the left-hand side column namelhsExpression- the left-hand side expressionoperator- the operator (EQ, USING, etc.)rhs- the right-hand side valuerhsColumn- the right-hand side column name
- All Implemented Interfaces:
ConditionQueryNode,QueryNode
public record ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, Operator operator, @Nullable Object rhs, @Nullable String rhsColumn)
extends Record
implements ConditionQueryNode
Represents a condition within a JOIN, WHERE or HAVING clause in the query AST.
-
Constructor Summary
ConstructorsConstructorDescriptionConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, Operator operator, @Nullable Object rhs) Creates a newConditionNodeinstance without a right-hand side column.ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, Operator operator, @Nullable Object rhs, @Nullable String rhsColumn) Creates an instance of aConditionNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thelhsColumnrecord component.@Nullable ExpressionSpecReturns the value of thelhsExpressionrecord component.Returns the value of thelogicOperatorrecord component.operator()Returns the value of theoperatorrecord component.@Nullable QueryNodeprevious()Returns the value of thepreviousrecord component.@Nullable Objectrhs()Returns the value of therhsrecord component.@Nullable StringReturns the value of therhsColumnrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConditionNode
public ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, Operator operator, @Nullable Object rhs) Creates a newConditionNodeinstance without a right-hand side column.- Parameters:
previous- the previous node in the chainlogicOperator- the logic operator (AND/OR)lhsColumn- the left-hand side column namelhsExpression- the left-hand side expressionoperator- the operator (EQ, USING, etc.)rhs- the right-hand side value
-
ConditionNode
public ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, Operator operator, @Nullable Object rhs, @Nullable String rhsColumn) Creates an instance of aConditionNoderecord class.- Parameters:
previous- the value for thepreviousrecord componentlogicOperator- the value for thelogicOperatorrecord componentlhsColumn- the value for thelhsColumnrecord componentlhsExpression- the value for thelhsExpressionrecord componentoperator- the value for theoperatorrecord componentrhs- the value for therhsrecord componentrhsColumn- the value for therhsColumnrecord component
-
-
Method Details
-
equals
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 withObjects::equals(Object,Object). -
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. -
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. -
previous
Returns the value of thepreviousrecord component. -
logicOperator
Returns the value of thelogicOperatorrecord component.- Returns:
- the value of the
logicOperatorrecord component
-
lhsColumn
Returns the value of thelhsColumnrecord component.- Returns:
- the value of the
lhsColumnrecord component
-
lhsExpression
Returns the value of thelhsExpressionrecord component.- Returns:
- the value of the
lhsExpressionrecord component
-
operator
Returns the value of theoperatorrecord component.- Returns:
- the value of the
operatorrecord component
-
rhs
Returns the value of therhsrecord component.- Returns:
- the value of the
rhsrecord component
-
rhsColumn
Returns the value of therhsColumnrecord component.- Returns:
- the value of the
rhsColumnrecord component
-