@API(value=MAINTAINED) public class NestedField extends BaseNestedField
QueryComponent
that evaluates a nested component against a Message
-valued field.childComponent
Constructor and Description |
---|
NestedField(String fieldName,
ExpressionRef<QueryComponent> childComponent) |
NestedField(String fieldName,
QueryComponent childComponent) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
equalsWithoutChildren(PlannerExpression otherExpression) |
<M extends Message> |
evalMessage(FDBRecordStoreBase<M> store,
EvaluationContext context,
FDBRecord<M> record,
Message message)
Return whether or not the given record matches this component.
|
int |
hashCode() |
int |
planHash()
Return a hash similar to
hashCode , but with the additional guarantee that is is stable across JVMs. |
String |
toString() |
void |
validate(Descriptors.Descriptor descriptor)
Validate that the given descriptor is consistent with this component.
|
QueryComponent |
withOtherChild(QueryComponent newChild) |
asNestedWith, getChild, getPlannerExpressionChildren, isAsync
asUnnestedWith, findFieldDescriptor, getFieldName, getFieldValue, getName, requireMessageField, requirePrimitiveField, requireScalarField, unnestedWith, validateFieldExistence
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asUnnestedWith, eval, evalAsync, evalMessageAsync
combineHashes, iterablePlanHash, objectPlanHash, objectsPlanHash, planHash, planHash, planHashUnordered, stringHashUnordered
acceptPropertyVisitor, bindTo
public NestedField(@Nonnull String fieldName, @Nonnull QueryComponent childComponent)
@API(value=EXPERIMENTAL) public NestedField(@Nonnull String fieldName, @Nonnull ExpressionRef<QueryComponent> childComponent)
@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.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 void validate(@Nonnull Descriptors.Descriptor descriptor)
QueryComponent
descriptor
- a record type descriptor, or a submessage descriptorpublic QueryComponent withOtherChild(QueryComponent newChild)
withOtherChild
in interface ComponentWithSingleChild
withOtherChild
in class BaseNestedField
@API(value=EXPERIMENTAL) public boolean equalsWithoutChildren(@Nonnull PlannerExpression otherExpression)
public int planHash()
PlanHashable
hashCode
, but with the additional guarantee that is is stable across JVMs.planHash
in interface PlanHashable
planHash
in class BaseField