|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.query.lucene.join.Join
public class Join
Join implements the result of a join.
| Field Summary | |
|---|---|
protected List<ScoreNode[]> |
buffer
A buffer for joined score node rows. |
protected Condition |
condition
The join condition. |
protected ScoreNode[] |
emptyInnerHits
An array of empty inner query hits. |
protected boolean |
innerJoin
Whether this is an inner join. |
protected MultiColumnQueryHits |
outer
The outer query hits. |
protected int |
outerScoreNodeIndex
The score node index of the outer query hits. |
protected Name[] |
selectorNames
The selector names. |
| Method Summary | |
|---|---|
void |
close()
Releases resources held by this hits instance. |
static Join |
create(MultiColumnQueryHits left,
MultiColumnQueryHits right,
JoinType joinType,
JoinConditionImpl condition,
org.apache.lucene.index.IndexReader reader,
HierarchyResolver resolver,
org.apache.lucene.search.SortComparatorSource scs,
HierarchyManager hmgr)
Creates a new join result. |
protected static int |
getIndex(MultiColumnQueryHits source,
Name selectorName)
Returns the index of the selector with the given selectorName
within the given source. |
Name[] |
getSelectorNames()
|
int |
getSize()
This default implementation always returns -1. |
protected static MultiColumnQueryHits |
getSourceWithName(Name selectorName,
MultiColumnQueryHits left,
MultiColumnQueryHits right)
|
ScoreNode[] |
nextScoreNodes()
Returns the next score nodes in this QueryHits or null if
there are no more score nodes. |
void |
skip(int n)
Skips a n score nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final MultiColumnQueryHits outer
protected final int outerScoreNodeIndex
protected final boolean innerJoin
protected final Condition condition
protected final Name[] selectorNames
protected final ScoreNode[] emptyInnerHits
protected final List<ScoreNode[]> buffer
| Method Detail |
|---|
public static Join create(MultiColumnQueryHits left,
MultiColumnQueryHits right,
JoinType joinType,
JoinConditionImpl condition,
org.apache.lucene.index.IndexReader reader,
HierarchyResolver resolver,
org.apache.lucene.search.SortComparatorSource scs,
HierarchyManager hmgr)
throws IOException
left - the left query hits.right - the right query hits.joinType - the join type.condition - the QOM join condition.reader - the index reader.resolver - the hierarchy resolver.scs - the sort comparator source of the index.hmgr - the hierarchy manager of the workspace.
IOException - if an error occurs while executing the join.
public ScoreNode[] nextScoreNodes()
throws IOException
null if
there are no more score nodes.
nextScoreNodes in interface MultiColumnQueryHitsIOException - if an error occurs while reading from the index.public Name[] getSelectorNames()
getSelectorNames in interface MultiColumnQueryHitsScoreNodes
returned by MultiColumnQueryHits.nextScoreNodes().
public void close()
throws IOException
outer source and the condition.
close in interface CloseableHitsIOException - if an error occurs while releasing resources.public int getSize()
-1.
getSize in interface CloseableHits-1.
public void skip(int n)
throws IOException
n score nodes.
Skips by calling nextScoreNodes() n times. Sub
classes may provide a more performance implementation.
skip in interface CloseableHitsn - the number of score nodes to skip.
IOException - if an error occurs while skipping.
protected static MultiColumnQueryHits getSourceWithName(Name selectorName,
MultiColumnQueryHits left,
MultiColumnQueryHits right)
protected static int getIndex(MultiColumnQueryHits source,
Name selectorName)
selectorName
within the given source.
source - a source.selectorName - a selector name.
-1 if the name does
not exist in source.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||