Class QueryRecordFunction<T>

  • Type Parameters:
    T - the result type of the function
    All Implemented Interfaces:
    PlanHashable

    @API(MAINTAINED)
    public class QueryRecordFunction<T>
    extends Object
    implements PlanHashable
    Class that provides context for asserting about a specially calculated value.
    • Method Detail

      • equalsValue

        @Nonnull
        public QueryComponent equalsValue​(@Nonnull
                                          Object comparand)
        Checks if the calculated value has a value equal to the given comparand.
        Parameters:
        comparand - the object to compare with the value in the calculated value
        Returns:
        a new component for doing the actual evaluation
      • notEquals

        @Nonnull
        public QueryComponent notEquals​(@Nonnull
                                        Object comparand)
        Checks if the calculated value has a value not equal to the given comparand.
        Parameters:
        comparand - the object to compare with the value in the calculated value
        Returns:
        a new component for doing the actual evaluation
      • greaterThan

        @Nonnull
        public QueryComponent greaterThan​(@Nonnull
                                          Object comparand)
        Checks if the calculated value has a value greater than the given comparand.
        Parameters:
        comparand - the object to compare with the value in the calculated value
        Returns:
        a new component for doing the actual evaluation
      • greaterThanOrEquals

        @Nonnull
        public QueryComponent greaterThanOrEquals​(@Nonnull
                                                  Object comparand)
        Checks if the calculated value has a value greater than or equal to the given comparand.
        Parameters:
        comparand - the object to compare with the value in the calculated value
        Returns:
        a new component for doing the actual evaluation
      • lessThan

        @Nonnull
        public QueryComponent lessThan​(@Nonnull
                                       Object comparand)
        Checks if the calculated value has a value less than the given comparand.
        Parameters:
        comparand - the object to compare with the value in the calculated value
        Returns:
        a new component for doing the actual evaluation
      • lessThanOrEquals

        @Nonnull
        public QueryComponent lessThanOrEquals​(@Nonnull
                                               Object comparand)
        Checks if the calculated value has a value less than or equal to the given comparand.
        Parameters:
        comparand - the object to compare with the value in the calculated value
        Returns:
        a new component for doing the actual evaluation
      • in

        @Nonnull
        public QueryComponent in​(@Nonnull
                                 List<?> comparand)
        Checks if the result for this function is in the given list.
        Parameters:
        comparand - a list of elements
        Returns:
        a new component for doing the actual evaluation
      • in

        @Nonnull
        public QueryComponent in​(@Nonnull
                                 String param)
        Checks if the result for this function is in the list that is bound to the given param.
        Parameters:
        param - a param that will be bound to a list in the execution context
        Returns:
        a new component for doing the actual evaluation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • planHash

        public int planHash​(@Nonnull
                            PlanHashable.PlanHashKind hashKind)
        Description copied from interface: PlanHashable
        Return a hash similar to hashCode, but with the additional guarantee that is is stable across JVMs.
        Specified by:
        planHash in interface PlanHashable
        Parameters:
        hashKind - the "kind" of hash to calculate. Each kind of hash has a particular logic with regards to included and excluded items.
        Returns:
        a stable hash code