public final class ForwardQueryResult<E> extends AbstractRDBMSQueryResult<E> implements Serializable
If the query had a range defined and this was not handled in the datastore query then this QueryResult will skip the unrequired records and just return the range requested.
Modifier and Type | Field and Description |
---|---|
protected boolean |
moreResultSetRows
Whether there are still more rows to be processed in the ResultSet.
|
protected List |
resultIds |
protected List<E> |
resultObjs
The Result Objects.
|
bulkLoadedValueByMemberNumber, closeStatementWithResultSet, rof, rs
api, closed, connectionListeners, loadResultsAtCommit, query, resultSizeMethod, size
modCount
Constructor and Description |
---|
ForwardQueryResult(org.datanucleus.store.query.Query query,
ResultObjectFactory<E> rof,
ResultSet rs,
Collection candidates)
Constructor of the result from a Query.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Method to close the results, making the results unusable thereafter.
|
protected void |
closeResults()
Internal method to close the ResultSet.
|
protected void |
closingConnection()
Method called to inform the query result that the connection is being closed so perform
any required operations now, or rest in peace.
|
boolean |
contains(Object o)
Method to check if the specified object is contained in this result.
|
boolean |
containsAll(Collection c)
Method to check if all of the specified objects are contained here.
|
boolean |
equals(Object o) |
E |
get(int index)
Method to retrieve a particular element from the list.
|
protected int |
getSizeUsingMethod()
Method to get the size using the "resultSizeMethod".
|
int |
hashCode() |
void |
initialise() |
boolean |
isEmpty()
Accessor for whether there are any results.
|
Iterator<E> |
iterator()
Accessor for an iterator for the results.
|
ListIterator<E> |
listIterator()
Accessor for an iterator for the results.
|
protected E |
nextResultSetElement()
Accessor for the next object from the ResultSet.
|
Object[] |
toArray()
Method to return the results as an array.
|
Object[] |
toArray(Object[] a)
Method to return the results as an array.
|
protected Object |
writeReplace()
Handle serialisation by returning a java.util.ArrayList of all of the results for this query
after disconnecting the query which has the consequence of enforcing the load of all objects.
|
disconnect, registerMemberBulkResultSet, setCloseStatementWithResultSet
add, add, addAll, addConnectionListener, assertIsOpen, clear, indexOf, isOpen, lastIndexOf, remove, set, size, subList
listIterator, removeRange
addAll, remove, removeAll, retainAll, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream
addAll, remove, removeAll, replaceAll, retainAll, sort, spliterator
protected boolean moreResultSetRows
protected List resultIds
public ForwardQueryResult(org.datanucleus.store.query.Query query, ResultObjectFactory<E> rof, ResultSet rs, Collection candidates) throws SQLException
query
- The Queryrof
- The factory to retrieve results fromrs
- The ResultSet from the Query Statementcandidates
- Candidate elementsSQLException
- if can't read ResultSetpublic void initialise() throws SQLException
initialise
in class AbstractRDBMSQueryResult<E>
SQLException
protected E nextResultSetElement()
protected void closeResults()
closeResults
in class AbstractRDBMSQueryResult<E>
public void close()
close
in interface org.datanucleus.store.query.QueryResult<E>
close
in class AbstractRDBMSQueryResult<E>
protected void closingConnection()
closingConnection
in class org.datanucleus.store.query.AbstractQueryResult<E>
public ListIterator<E> listIterator()
listIterator
in interface List<E>
listIterator
in class org.datanucleus.store.query.AbstractQueryResult<E>
public boolean contains(Object o)
public boolean containsAll(Collection c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
containsAll
in class org.datanucleus.store.query.AbstractQueryResult<E>
c
- The collection of objectspublic boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface List<E>
equals
in class AbstractRDBMSQueryResult<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface List<E>
hashCode
in class AbstractRDBMSQueryResult<E>
public E get(int index)
public boolean isEmpty()
protected int getSizeUsingMethod()
getSizeUsingMethod
in class org.datanucleus.store.query.AbstractQueryResult<E>
public Object[] toArray()
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
- Thrown if an error occursCopyright © 2017. All rights reserved.