Class AndComponent
- java.lang.Object
-
- com.apple.foundationdb.record.query.expressions.AndOrComponent
-
- com.apple.foundationdb.record.query.expressions.AndComponent
-
- All Implemented Interfaces:
PlanHashable
,ComponentWithChildren
,QueryComponent
,QueryHashable
@API(MAINTAINED) public class AndComponent extends AndOrComponent
AQueryComponent
that is satisfied when all of its child components are satisfied. For tri-valued logic:- If all children are
true
, thentrue
. - If any child is
false
, thenfalse
. - Else
null
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.PlanHashable
PlanHashable.PlanHashKind
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.QueryHashable
QueryHashable.QueryHashKind
-
-
Constructor Summary
Constructors Constructor Description AndComponent(List<QueryComponent> operands)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
GraphExpansion
expand(CorrelationIdentifier base, List<String> fieldNamePrefix)
Expand this query component into a data flow graph.static AndComponent
from(List<? extends QueryComponent> operands)
List<QueryComponent>
getChildren()
Children for this component, at least 2 of them.int
hashCode()
boolean
isOr()
int
planHash(PlanHashable.PlanHashKind hashKind)
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.int
queryHash(QueryHashable.QueryHashKind hashKind)
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.String
toString()
void
validate(Descriptors.Descriptor descriptor)
QueryComponent
withOtherChildren(List<QueryComponent> newChildren)
-
Methods inherited from class com.apple.foundationdb.record.query.expressions.AndOrComponent
evalMessage, evalMessageAsync, isAsync
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.query.expressions.ComponentWithChildren
getChildren
-
Methods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash
-
Methods inherited from interface com.apple.foundationdb.record.query.expressions.QueryComponent
eval, evalAsync, expand, validate
-
-
-
-
Constructor Detail
-
AndComponent
public AndComponent(@Nonnull List<QueryComponent> operands)
-
-
Method Detail
-
from
@Nonnull public static AndComponent from(@Nonnull List<? extends QueryComponent> operands)
-
isOr
public boolean isOr()
- Specified by:
isOr
in classAndOrComponent
-
withOtherChildren
public QueryComponent withOtherChildren(List<QueryComponent> newChildren)
-
expand
public GraphExpansion expand(@Nonnull CorrelationIdentifier base, @Nonnull List<String> fieldNamePrefix)
Description copied from interface:QueryComponent
Expand this query component into a data flow graph. The returned graph represents an adequate representation of the component as composition of relational expressions and operators.- Parameters:
base
- a an alias that refers to the data flow equivalent of an input to this componentfieldNamePrefix
- a list of field names that accumulate a field nesting chain for non-repeated fields- Returns:
- a new
GraphExpansion
representing the query graph equivalent of this query component - See Also:
TODO make this method private in Java 11
-
planHash
public int planHash(@Nonnull PlanHashable.PlanHashKind hashKind)
Description copied from interface:PlanHashable
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.- 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
-
queryHash
public int queryHash(@Nonnull QueryHashable.QueryHashKind hashKind)
Description copied from interface:QueryHashable
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.- 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
-
validate
public void validate(@Nonnull Descriptors.Descriptor descriptor)
-
getChildren
@Nonnull public List<QueryComponent> getChildren()
Children for this component, at least 2 of them.- Returns:
- the children of this component
-
-