java.lang.Object
java.lang.Record
org.litebridge.orm.engine.ast.ConditionWithIdNode
- Record Components:
previous- the previous node in the chainlogicOperator- the logic operator (AND/OR)operator- the operator (EQ, USING, etc.)id- the ID/primary key value
- All Implemented Interfaces:
ConditionQueryNode,QueryNode
public record ConditionWithIdNode(@Nullable QueryNode previous, LogicOperator logicOperator, Operator operator, @Nullable Object id)
extends Record
implements ConditionQueryNode
Query condition node for selecting a record by its primary key.
-
Constructor Summary
ConstructorsConstructorDescriptionConditionWithIdNode(@Nullable QueryNode previous, LogicOperator logicOperator, Operator operator, @Nullable Object id) Creates an instance of aConditionWithIdNoderecord 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 Objectid()Returns the value of theidrecord component.Returns the value of thelogicOperatorrecord component.operator()Returns the value of theoperatorrecord component.@Nullable QueryNodeprevious()Returns the value of thepreviousrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConditionWithIdNode
public ConditionWithIdNode(@Nullable QueryNode previous, LogicOperator logicOperator, Operator operator, @Nullable Object id) Creates an instance of aConditionWithIdNoderecord class.- Parameters:
previous- the value for thepreviousrecord componentlogicOperator- the value for thelogicOperatorrecord componentoperator- the value for theoperatorrecord componentid- the value for theidrecord 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
-
operator
Returns the value of theoperatorrecord component.- Returns:
- the value of the
operatorrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-