java.lang.Object
java.lang.Record
org.litebridge.orm.api.select.ast.ConditionNode
- Record Components:
previous- the previous node in the chainlogicOperator- the logic operator (AND/OR)lhs- the left-hand side expressionoperator- the operator (EQ, USING, etc.)rhs- the right-hand side valuerelationshipField- the field name of the relationship (if any)
- All Implemented Interfaces:
ConditionQueryNode,QueryNode
public record ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable ExpressionSpec lhs, Operator operator, @Nullable Object rhs, @Nullable String relationshipField)
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 ExpressionSpec lhs, Operator operator, @Nullable Object rhs) ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable ExpressionSpec lhs, Operator operator, @Nullable Object rhs, @Nullable String relationshipField) 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 ExpressionSpeclhs()Returns the value of thelhsrecord component.Returns the value of thelogicOperatorrecord component.operator()Returns the value of theoperatorrecord component.@Nullable QueryNodeprevious()Returns the value of thepreviousrecord component.@Nullable StringReturns the value of therelationshipFieldrecord component.@Nullable Objectrhs()Returns the value of therhsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConditionNode
public ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable ExpressionSpec lhs, Operator operator, @Nullable Object rhs) -
ConditionNode
public ConditionNode(@Nullable QueryNode previous, LogicOperator logicOperator, @Nullable ExpressionSpec lhs, Operator operator, @Nullable Object rhs, @Nullable String relationshipField) Creates an instance of aConditionNoderecord class.- Parameters:
previous- the value for thepreviousrecord componentlogicOperator- the value for thelogicOperatorrecord componentlhs- the value for thelhsrecord componentoperator- the value for theoperatorrecord componentrhs- the value for therhsrecord componentrelationshipField- the value for therelationshipFieldrecord 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
-
lhs
Returns the value of thelhsrecord component.- Returns:
- the value of the
lhsrecord 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
-
relationshipField
Returns the value of therelationshipFieldrecord component.- Returns:
- the value of the
relationshipFieldrecord component
-