@API(value=INTERNAL) public abstract class AndOrComponent extends Object implements ComponentWithChildren
And
and Or
query components.Constructor and Description |
---|
AndOrComponent(List<ExpressionRef<QueryComponent>> operands) |
Modifier and Type | Method and Description |
---|---|
<M extends Message> |
evalMessage(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record,
Message message)
Return whether or not the given record matches this component.
|
<M extends Message> |
evalMessageAsync(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record,
Message message)
Asynchronous version of
evalMessage . |
List<QueryComponent> |
getChildren()
Children for this component, at least 2 of them.
|
Iterator<? extends ExpressionRef<? extends PlannerExpression>> |
getPlannerExpressionChildren()
Return an iterator of references to the children of this planner expression.
|
boolean |
isAsync()
Get whether this component is asynchronous.
|
protected abstract boolean |
isOr() |
void |
validate(Descriptors.Descriptor descriptor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, withOtherChildren
eval, evalAsync, validate
iterablePlanHash, objectPlanHash, objectsPlanHash, planHash, planHash, planHash
acceptPropertyVisitor, bindTo, getPlannerExpressionChildren
public AndOrComponent(@Nonnull List<ExpressionRef<QueryComponent>> operands)
protected abstract boolean isOr()
@Nullable public <M extends Message> Boolean evalMessage(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> record, @Nullable Message message)
QueryComponent
evalMessage
.
Under ordinary circumstances, if record
is null
, then message
will be null
.
Otherwise, message
will be record.getRecord()
or some submessage of that, possibly null
if
the corresponding field is missing.evalMessage
in interface QueryComponent
M
- the type of recordstore
- the record store from which the record camecontext
- context for bound expressionsrecord
- the recordmessage
- the Protobuf message to evaluate againstQueryComponent.eval(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase<M>, com.apple.foundationdb.record.EvaluationContext, com.apple.foundationdb.record.provider.foundationdb.FDBRecord<M>)
@Nonnull public <M extends Message> CompletableFuture<Boolean> evalMessageAsync(@Nonnull FDBRecordStoreBase<M> store, @Nonnull EvaluationContext context, @Nullable FDBRecord<M> record, @Nullable Message message)
QueryComponent
evalMessage
.evalMessageAsync
in interface QueryComponent
M
- the type of recordstore
- the record store from which the record camecontext
- context for bound expressionsrecord
- the recordmessage
- the Protobuf message to evaluate againstQueryComponent.eval(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase<M>, com.apple.foundationdb.record.EvaluationContext, com.apple.foundationdb.record.provider.foundationdb.FDBRecord<M>)
public boolean isAsync()
QueryComponent
isAsync
in interface QueryComponent
true
if this component is better executed asynchronouslypublic void validate(@Nonnull Descriptors.Descriptor descriptor)
@Nonnull public List<QueryComponent> getChildren()
@Nonnull @API(value=EXPERIMENTAL) public Iterator<? extends ExpressionRef<? extends PlannerExpression>> getPlannerExpressionChildren()
PlannerExpression
Collections.emptyIterator()
is returned. The returned iterator should
be treated as an immutable object and may throw an exception if Iterator.remove()
is called.
The iterator must return its elements in a consistent order.getPlannerExpressionChildren
in interface PlannerExpression