public abstract class AbstractQueryResult extends AbstractList implements QueryResult, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed
Whether the results are close.
|
protected List<ManagedConnectionResourceListener> |
connectionListeners
List of listeners to notify when the query results are closed.
|
protected boolean |
loadResultsAtCommit
Whether to load any unread results at commit (when connection is closed).
|
protected static Localiser |
LOCALISER
Localiser for messages.
|
protected Query |
query
The Query object.
|
protected String |
resultSizeMethod
Method for getting the size of the results.
|
protected int |
size
size of the query results.
|
modCount| Constructor and Description |
|---|
AbstractQueryResult(Query query)
Constructor of the result from a Query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element)
Method to add a result.
|
boolean |
add(Object o)
Method to add results.
|
boolean |
addAll(int index,
Collection c)
Method to add results.
|
void |
addConnectionListener(ManagedConnectionResourceListener listener)
Method to register a listener to be notified when the query result is closing.
|
protected void |
assertIsOpen()
Internal method to throw an Exception if the ResultSet is open.
|
void |
clear()
Method to clear the results.
|
void |
close()
Method to close the results, meaning that they are inaccessible after this point.
|
protected abstract void |
closeResults()
Inform the query result that we are closing the results now.
|
protected abstract void |
closingConnection()
Inform the query result that the connection is being closed so perform
any 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.
|
void |
disconnect()
Method to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves
like a List.
|
abstract boolean |
equals(Object o)
Equality operator for QueryResults.
|
abstract Object |
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()
Accessor for the hashcode of this object
|
int |
indexOf(Object o)
Method to check the index of a result.
|
boolean |
isEmpty()
Returns true if this collection contains no elements.
|
protected boolean |
isOpen()
Accessor whether the results are open.
|
abstract Iterator |
iterator()
Accessor for an iterator for the results.
|
int |
lastIndexOf(Object o)
Method to check the last index of a result.
|
abstract ListIterator |
listIterator()
Accessor for a list iterator for the results.
|
Object |
remove(int index)
Method to remove a result.
|
Object |
set(int index,
Object element)
Method to set the position of a result.
|
int |
size()
Method to return the size of the result.
|
List |
subList(int fromIndex,
int toIndex)
Method return a sub list of results.
|
Object[] |
toArray()
Method to return the results as an array.
|
Object[] |
toArray(Object[] a)
Method to return the results as an array.
|
listIterator, removeRangeaddAll, remove, removeAll, retainAll, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, remove, removeAll, retainAllprotected static final Localiser LOCALISER
protected boolean closed
protected Query query
protected List<ManagedConnectionResourceListener> connectionListeners
protected int size
protected String resultSizeMethod
protected boolean loadResultsAtCommit
public AbstractQueryResult(Query query)
query - The Querypublic void disconnect()
disconnect in interface QueryResultprotected abstract void closingConnection()
protected abstract void closeResults()
public void close()
close in interface QueryResultpublic void addConnectionListener(ManagedConnectionResourceListener listener)
listener - The listenerprotected boolean isOpen()
protected void assertIsOpen()
public void add(int index,
Object element)
add in interface Listadd in class AbstractListindex - The position to addelement - The results to addpublic boolean add(Object o)
add in interface Collectionadd in interface Listadd in class AbstractListo - The result to addpublic boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in class AbstractListindex - The position to addc - The results to addpublic void clear()
clear in interface Collectionclear in interface Listclear in class AbstractListpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Listcontains in class AbstractCollectiono - The objectpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface ListcontainsAll in class AbstractCollectionc - The collection of objectspublic abstract boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in class AbstractListo - The object to compare againstpublic abstract Object get(int index)
get in interface Listget in class AbstractListindex - The index of the elementpublic int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in class AbstractListpublic int indexOf(Object o)
indexOf in interface ListindexOf in class AbstractListo - The resultpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface ListisEmpty in class AbstractCollectionpublic abstract Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listiterator in class AbstractListpublic int lastIndexOf(Object o)
lastIndexOf in interface ListlastIndexOf in class AbstractListo - The resultpublic abstract ListIterator listIterator()
listIterator in interface ListlistIterator in class AbstractListpublic Object remove(int index)
remove in interface Listremove in class AbstractListindex - The position of the result.public Object set(int index, Object element)
set in interface Listset in class AbstractListindex - Position of the resultelement - The resultpublic int size()
size in interface Collectionsize in interface Listsize in class AbstractCollectionpublic List subList(int fromIndex, int toIndex)
subList in interface ListsubList in class AbstractListfromIndex - start positiontoIndex - end position (exclusive)public Object[] toArray()
toArray in interface CollectiontoArray in interface ListtoArray in class AbstractCollectionpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface ListtoArray in class AbstractCollectiona - The array to copy into.protected int getSizeUsingMethod()
Copyright © 2013. All Rights Reserved.