Class RecordTypeSource
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.view.Source
-
- com.apple.foundationdb.record.query.plan.temp.view.RecordTypeSource
-
@API(EXPERIMENTAL) public class RecordTypeSource extends Source
ASource
representing the stream of all records of a particular type or types.
-
-
Constructor Summary
Constructors Constructor Description RecordTypeSource(String recordTypeName)
RecordTypeSource(Set<String> recordTypeNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stream<SourceEntry>
evalSourceEntriesFor(SourceEntry entry)
Produce the stream of source entries that this source represents, drawing the values for dependent sources from the given source entry if needed.Set<String>
getRecordTypeNames()
Set<Source>
getSources()
Get the set of all sources of ancestor's of this source, include this source itself.boolean
supportsSourceIn(ViewExpressionComparisons comparisons, Source other)
Check whether this source can be replaced by the given source in the givenViewExpressionComparisons
.String
toString()
RecordTypeSource
withSourceMappedInto(Source originalSource, Source duplicateSource)
Replace the given duplicate source with the given original source everywhere that it occurs in this source, including in ancestor sources.-
Methods inherited from class com.apple.foundationdb.record.query.plan.temp.view.Source
addDependentSource, equals, evalSourceEntriesFor, hashCode
-
-
-
-
Method Detail
-
getSources
public Set<Source> getSources()
Description copied from class:Source
Get the set of all sources of ancestor's of this source, include this source itself.- Specified by:
getSources
in classSource
- Returns:
- a set of the sources of all (inclusive) ancestors of this source
-
supportsSourceIn
public boolean supportsSourceIn(@Nonnull ViewExpressionComparisons comparisons, @Nonnull Source other)
Description copied from class:Source
Check whether this source can be replaced by the given source in the givenViewExpressionComparisons
. In general, this source can be replaced by the given source if and only if:- The sources match each other "structurally" (i.e., differ only in a pointer-equality sense).
- The elements with comparisons in the
ViewExpressionComparisons
do not use this source.
- Specified by:
supportsSourceIn
in classSource
- Parameters:
comparisons
- a view expression comparisons that specifies which sources are used and unusedother
- a candidate replacement for this source- Returns:
- whether this source can be replaced by
other
- See Also:
Source.withSourceMappedInto(Source, Source)
,Element.matchSourcesWith(ViewExpressionComparisons, Element)
-
withSourceMappedInto
@Nonnull public RecordTypeSource withSourceMappedInto(@Nonnull Source originalSource, @Nonnull Source duplicateSource)
Description copied from class:Source
Replace the given duplicate source with the given original source everywhere that it occurs in this source, including in ancestor sources.- Specified by:
withSourceMappedInto
in classSource
- Parameters:
originalSource
- a source to replace all occurrences of the duplicate source withduplicateSource
- a source to replace with the original source- Returns:
- a copy of this source with all occurrences of the duplicate source replaced with the original source
-
evalSourceEntriesFor
@Nonnull protected Stream<SourceEntry> evalSourceEntriesFor(@Nonnull SourceEntry entry)
Description copied from class:Source
Produce the stream of source entries that this source represents, drawing the values for dependent sources from the given source entry if needed.- Specified by:
evalSourceEntriesFor
in classSource
- Parameters:
entry
- a source entry to draw the input for this source from- Returns:
- a stream of source entries, each of which has a value associated with this source
-
-