java.lang.Object
java.lang.Record
org.litebridge.db.spi.query.LogicCondition
- Record Components:
logicOperator- The logical operator used to combine this condition with the previous one.condition- The condition itself.
Logically combined condition.
-
Constructor Summary
ConstructorsConstructorDescriptionLogicCondition(SelectExpression lhs, Operator operator, @Nullable Object value) Constructs a logical condition with the specified left-hand side (LHS) expression, operator, and value.LogicCondition(LogicOperator logicOperator, Condition condition) Creates an instance of aLogicConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelogicOperatorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LogicCondition
Constructs a logical condition with the specified left-hand side (LHS) expression, operator, and value.This constructor automatically creates a
Conditionwith the provided parameters and uses theNOOPlogical operator to signify that this condition is not combined with a previous one.- Parameters:
lhs- The left-hand side expression of the condition.operator- The operator used to compare or relate the LHS to the value.value- The value or operand to be compared with the LHS. This can benullfor certain operators likeIS_NULLandIS_NOT_NULL.
-
LogicCondition
Creates an instance of aLogicConditionrecord class.- Parameters:
logicOperator- the value for thelogicOperatorrecord componentcondition- the value for theconditionrecord component
-
-
Method Details
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
logicOperator
Returns the value of thelogicOperatorrecord component.- Returns:
- the value of the
logicOperatorrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-