java.lang.Object
java.lang.Record
org.litebridge.orm.api.select.model.ConditionSpec
- Record Components:
lhsColumn- the left-hand side column namelhsExpression- the left-hand side expressionoperator- the condition operatorvalue- the raw right-hand side value
public record ConditionSpec(@Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, @Nullable Operator operator, @Nullable Object value)
extends Record
Specification for a condition in a database query.
This is used in a SQL query WHERE clause, JOIN clause, etc.
A condition consists of a column, an operator, and an optional value. The operator dictates how the column will be compared to the provided value.
-
Constructor Summary
ConstructorsConstructorDescriptionConditionSpec(@Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, @Nullable Operator operator, @Nullable Object value) Creates an instance of aConditionSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thelhsColumnrecord component.@Nullable ExpressionSpecReturns the value of thelhsExpressionrecord component.@Nullable Operatoroperator()Returns the value of theoperatorrecord component.final StringtoString()Returns a string representation of this record class.@Nullable Objectvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
ConditionSpec
public ConditionSpec(@Nullable String lhsColumn, @Nullable ExpressionSpec lhsExpression, @Nullable Operator operator, @Nullable Object value) Creates an instance of aConditionSpecrecord class.- Parameters:
lhsColumn- the value for thelhsColumnrecord componentlhsExpression- the value for thelhsExpressionrecord componentoperator- the value for theoperatorrecord componentvalue- the value for thevaluerecord 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). -
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
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-