Package com.onec.query
Record Class Predicate
java.lang.Object
java.lang.Record
com.onec.query.Predicate
public record Predicate(Path path, Predicate.Op op, Object value, Object value2, List<?> values)
extends Record
A WHERE condition on a
Path. value/values carry the operands;
which fields apply depends on Predicate.Op:
EQ NE GT GTE LT LTE LIKEusevalueBETWEENusesvalue(low) andvalue2(high)INusesvaluesIS_NULL IS_NOT_NULLuse no operand
Ref operands are unwrapped to their UUID at bind time by the engine.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
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.op()Returns the value of theoprecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.value2()Returns the value of thevalue2record component.List<?> values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
Predicate
Creates an instance of aPredicaterecord class.- Parameters:
path- the value for thepathrecord componentop- the value for theoprecord componentvalue- the value for thevaluerecord componentvalue2- the value for thevalue2record componentvalues- the value for thevaluesrecord 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). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
op
Returns the value of theoprecord component.- Returns:
- the value of the
oprecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
value2
Returns the value of thevalue2record component.- Returns:
- the value of the
value2record component
-
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-