|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.query.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 QueryResult
public boolean retainAll(java.util.Collection collection)
retainAll
in interface java.util.Collection
collection
- ignored.
public boolean contains(java.lang.Object obj)
contains
in interface java.util.Collection
obj
- 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.Collection
obj
- an array into which to place the
objects from the result collection.
public java.util.Iterator iterator()
iterator
in interface java.util.Collection
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
public boolean removeAll(java.util.Collection collection)
removeAll
in interface java.util.Collection
collection
- ignored.
public boolean remove(java.lang.Object obj)
remove
in interface java.util.Collection
obj
- ignored.
public void clear()
clear
in interface java.util.Collection
public boolean addAll(java.util.Collection collection)
addAll
in interface java.util.Collection
collection
- ignored.
public int size()
size
in interface java.util.Collection
public boolean containsAll(java.util.Collection collection)
containsAll
in interface java.util.Collection
collection
- 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.Collection
obj
- ignored.
public boolean isEmpty()
isEmpty
in interface java.util.Collection
true
if the result collection is empty.public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection
obj
- 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.Collection
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |