E - Type of "element" returned by this query resultpublic abstract class AbstractQueryResult<E> extends AbstractList<E> implements QueryResult<E>, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected ApiAdapter |
api |
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 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 |
|---|---|
boolean |
add(E o)
Method to add results.
|
void |
add(int index,
E element)
Method to add a result.
|
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 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()
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<E> |
iterator()
Accessor for an iterator for the results.
|
int |
lastIndexOf(Object o)
Method to check the last index of a result.
|
abstract ListIterator<E> |
listIterator()
Accessor for a list iterator for the results.
|
E |
remove(int index)
Method to remove a result.
|
E |
set(int index,
E element)
Method to set the position of a result.
|
int |
size()
Method to return the size of the result.
|
List<E> |
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, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, streamaddAll, remove, removeAll, replaceAll, retainAll, sort, spliteratorprotected boolean closed
protected Query query
protected List<ManagedConnectionResourceListener> connectionListeners
protected ApiAdapter api
protected int size
protected String resultSizeMethod
protected boolean loadResultsAtCommit
public AbstractQueryResult(Query query)
query - The Querypublic void disconnect()
disconnect in interface QueryResult<E>protected abstract void closingConnection()
protected abstract void closeResults()
public void close()
close in interface QueryResult<E>public void addConnectionListener(ManagedConnectionResourceListener listener)
listener - The listenerprotected boolean isOpen()
protected void assertIsOpen()
public void add(int index,
E element)
public boolean add(E o)
add in interface Collection<E>add in interface List<E>add in class AbstractList<E>o - The result to addpublic boolean addAll(int index,
Collection c)
public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>contains in class AbstractCollection<E>o - The objectpublic boolean containsAll(Collection c)
containsAll in interface Collection<E>containsAll in interface List<E>containsAll in class AbstractCollection<E>c - The collection of objectspublic abstract boolean equals(Object o)
equals in interface Collection<E>equals in interface List<E>equals in class AbstractList<E>o - The object to compare againstpublic abstract E get(int index)
public int hashCode()
hashCode in interface Collection<E>hashCode in interface List<E>hashCode in class AbstractList<E>public int indexOf(Object o)
public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>isEmpty in class AbstractCollection<E>public int lastIndexOf(Object o)
lastIndexOf in interface List<E>lastIndexOf in class AbstractList<E>o - The resultpublic abstract ListIterator<E> listIterator()
listIterator in interface List<E>listIterator in class AbstractList<E>public E remove(int index)
public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public List<E> subList(int fromIndex, int toIndex)
public Object[] toArray()
toArray in interface Collection<E>toArray in interface List<E>toArray in class AbstractCollection<E>public Object[] toArray(Object[] a)
toArray in interface Collection<E>toArray in interface List<E>toArray in class AbstractCollection<E>a - The array to copy into.protected int getSizeUsingMethod()
Copyright © 2017. All rights reserved.