|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jdo.query.BasicQueryResult
public class BasicQueryResult
This class implements the basic query execution strategy. It first orders the candidate set using the query helper orderCandidates method. It then iterates over the ordered candidate collection, filtering each one, using the query helper applyFilter method and removing the objects that fail the filter. All of the methods of Collection are then delegated to the result collection.
| Nested Class Summary | |
|---|---|
class |
BasicQueryResult.BasicQueryResultIterator
The internal query result iterator supports all iterator methods plus close, allowing early release of resources. |
| Constructor Summary | |
|---|---|
BasicQueryResult(QueryResultHelper qrh)
Creates new BasicQueryResult |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object obj)
This method throws UnsupportedOperationException because the collection is read-only. |
boolean |
addAll(java.util.Collection collection)
This method throws UnsupportedOperationException because the collection is read-only. |
void |
clear()
This method throws UnsupportedOperationException because the collection is read-only. |
void |
close()
This method closes the result set, closes all open iterators, and releases all resources that might be held by the result. |
boolean |
contains(java.lang.Object obj)
This method delegates to the result collection method. |
boolean |
containsAll(java.util.Collection collection)
This method delegates to the result collection method. |
boolean |
equals(java.lang.Object obj)
This method delegates to the result collection method. |
int |
hashCode()
This method delegates to the result collection method. |
boolean |
isEmpty()
This method delegates to the result collection method. |
java.util.Iterator |
iterator()
This method delegates to the result collection method. |
boolean |
remove(java.lang.Object obj)
This method throws UnsupportedOperationException because the collection is read-only. |
boolean |
removeAll(java.util.Collection collection)
This method throws UnsupportedOperationException because the collection is read-only. |
boolean |
retainAll(java.util.Collection collection)
This method throws UnsupportedOperationException because the collection is read-only. |
int |
size()
This method delegates to the result collection method. |
java.lang.Object[] |
toArray()
This method delegates to the result collection method. |
java.lang.Object[] |
toArray(java.lang.Object[] obj)
This method delegates to the result collection method. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicQueryResult(QueryResultHelper qrh)
qrh - the query result helper provided
by the query parser.| Method Detail |
|---|
public void close()
close in interface QueryResultpublic boolean retainAll(java.util.Collection collection)
retainAll in interface java.util.Collectioncollection - ignored.
public boolean contains(java.lang.Object obj)
contains in interface java.util.Collectionobj - the object to be tested.
true if the result collection contains
the parameter object.public java.lang.Object[] toArray(java.lang.Object[] obj)
toArray in interface java.util.Collectionobj - an array into which to place the
objects from the result collection.
public java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectionpublic java.lang.Object[] toArray()
toArray in interface java.util.Collectionpublic boolean removeAll(java.util.Collection collection)
removeAll in interface java.util.Collectioncollection - ignored.
public boolean remove(java.lang.Object obj)
remove in interface java.util.Collectionobj - ignored.
public void clear()
clear in interface java.util.Collectionpublic boolean addAll(java.util.Collection collection)
addAll in interface java.util.Collectioncollection - ignored.
public int size()
size in interface java.util.Collectionpublic boolean containsAll(java.util.Collection collection)
containsAll in interface java.util.Collectioncollection - a collection of elements to be tested.
true if the result collection contains all of the
elements in the parameter collection.public boolean add(java.lang.Object obj)
add in interface java.util.Collectionobj - ignored.
public boolean isEmpty()
isEmpty in interface java.util.Collectiontrue if the result collection is empty.public boolean equals(java.lang.Object obj)
equals in interface java.util.Collectionequals in class java.lang.Objectobj - the object to which to compare this object.
true if the result collection is equal to the parameter
collection.public int hashCode()
hashCode in interface java.util.CollectionhashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||