public class TransitiveSetTraverser
extends java.lang.Object
Map<String, BitSet> selection = new HashMap<String, BitSet>();
/// select the movies with ordinals 1 and 4.
BitSet selectedMovies = new BitSet();
selectedMovies.set(1);
selectedMovies.set(4);
selection.put("Movie", movies);
We can add the references, and the transitive references, of our selection. After the following call returns, our selection will be augmented with these matches:
TransitiveSetTraverser.addTransitiveMatches(readEngine, selection);
Given a selection, we can also add any records which reference anything in the selection. This is essentially the opposite operation as above; it can be said that addTransitiveMatches traverses down, while addReferencingOutsideClosure traverses up. After the following call returns, our selection will be augmented with this selection:
Modifier and Type | Class and Description |
---|---|
static interface |
TransitiveSetTraverser.TransitiveSetTraverserAction |
Constructor and Description |
---|
TransitiveSetTraverser() |
Modifier and Type | Method and Description |
---|---|
static void |
addReferencingOutsideClosure(HollowReadStateEngine stateEngine,
java.util.Map<java.lang.String,java.util.BitSet> matches)
Augment the given selection with any records outside the selection which reference
(or transitively reference) any records in the selection.
|
static void |
addTransitiveMatches(HollowReadStateEngine stateEngine,
java.util.Map<java.lang.String,java.util.BitSet> matches)
Augment the given selection by adding the references, and the transitive references, of our selection.
|
static void |
removeReferencedOutsideClosure(HollowReadStateEngine stateEngine,
java.util.Map<java.lang.String,java.util.BitSet> matches)
Remove any records from the given selection which are referenced by other records not in the selection.
|
public static void addTransitiveMatches(HollowReadStateEngine stateEngine, java.util.Map<java.lang.String,java.util.BitSet> matches)
stateEngine
- the state enginematches
- the map to which matches are placedpublic static void removeReferencedOutsideClosure(HollowReadStateEngine stateEngine, java.util.Map<java.lang.String,java.util.BitSet> matches)
stateEngine
- the state enginematches
- the matchespublic static void addReferencingOutsideClosure(HollowReadStateEngine stateEngine, java.util.Map<java.lang.String,java.util.BitSet> matches)
stateEngine
- the state enginematches
- the matches