Class AbstractRDBMSQueryResult<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.datanucleus.store.query.AbstractQueryResult<E>
org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,List<E>,SequencedCollection<E>,org.datanucleus.store.query.QueryResult<E>
- Direct Known Subclasses:
ForwardQueryResult,ScrollableQueryResult
public abstract class AbstractRDBMSQueryResult<E>
extends org.datanucleus.store.query.AbstractQueryResult<E>
Abstract representation of a QueryResult for RDBMS queries.
Based on the assumption that we have a JDBC ResultSet, and we are extracting the results using a ResultObjectFactory.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanprotected Collection<org.datanucleus.metadata.AbstractMemberMetaData> The members (of the candidate, if any) that are bulk loaded.Map of bulk-load (candidate) field values, keyed by the "id" of the candidate object.protected booleanDefault to closing the statement when closing the resultSet, but allow override.protected org.datanucleus.FetchPlanprotected ResultObjectFactory<E> ResultObjectFactory for converting the result set into objects.protected ResultSetThe ResultSet containing the results.private static final longFields inherited from class org.datanucleus.store.query.AbstractQueryResult
api, closed, connectionListeners, loadResultsAtCommit, query, resultSizeMethod, sizeFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRDBMSQueryResult(org.datanucleus.store.query.Query query, ResultObjectFactory<E> rof, ResultSet rs, org.datanucleus.FetchPlan fp) Constructor of the result from a Query. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddOwnerMemberCollectionElement(org.datanucleus.metadata.AbstractMemberMetaData mmd, Object owner, Object element) voidclose()Method to close the results, meaning that they are inaccessible after this point.protected voidInternal method to close the ResultSet.voidMethod to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves like a List.booleaninthashCode()abstract voidvoidregisterMemberBulkResultSet(IteratorStatement iterStmt, ResultSet rs) voidsetCloseStatementWithResultSet(boolean flag) Methods inherited from class org.datanucleus.store.query.AbstractQueryResult
add, add, addAll, addConnectionListener, assertIsOpen, clear, closingConnection, contains, containsAll, get, getSizeUsingMethod, indexOf, isEmpty, isOpen, iterator, lastIndexOf, listIterator, remove, set, size, subList, toArray, toArrayMethods inherited from class java.util.AbstractList
listIterator, removeRangeMethods inherited from class java.util.AbstractCollection
addAll, remove, removeAll, retainAll, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, getFirst, getLast, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
rs
The ResultSet containing the results. -
rof
ResultObjectFactory for converting the result set into objects. -
fp
protected org.datanucleus.FetchPlan fp -
bulkLoadedMmds
The members (of the candidate, if any) that are bulk loaded. -
bulkLoadedValueByMemberNumber
Map of bulk-load (candidate) field values, keyed by the "id" of the candidate object. The value is a "Map<fieldNumber, fieldValue>". -
closeStatementWithResultSet
protected boolean closeStatementWithResultSetDefault to closing the statement when closing the resultSet, but allow override. -
applyRangeChecks
boolean applyRangeChecks
-
-
Constructor Details
-
AbstractRDBMSQueryResult
public AbstractRDBMSQueryResult(org.datanucleus.store.query.Query query, ResultObjectFactory<E> rof, ResultSet rs, org.datanucleus.FetchPlan fp) Constructor of the result from a Query.- Parameters:
query- The Queryrof- The factory to retrieve results fromrs- The ResultSet from the Query Statementfp- FetchPlan
-
-
Method Details
-
setCloseStatementWithResultSet
public void setCloseStatementWithResultSet(boolean flag) -
registerMemberBulkResultSet
-
initialise
- Throws:
SQLException
-
addOwnerMemberCollectionElement
-
disconnect
public void disconnect()Method to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves like a List. All remaining results are read in at this point (unless selected not to be). -
close
public void close()Method to close the results, meaning that they are inaccessible after this point. -
closeResults
protected void closeResults()Internal method to close the ResultSet.- Specified by:
closeResultsin classorg.datanucleus.store.query.AbstractQueryResult<E>
-
equals
-
hashCode
public int hashCode()
-