Package org.apache.openjpa.kernel
Class QueryImpl.RemoveOnCloseResultList
- java.lang.Object
-
- org.apache.openjpa.kernel.QueryImpl.RemoveOnCloseResultList
-
- All Implemented Interfaces:
Serializable,Iterable,Collection,List,ResultList,Closeable
- Enclosing class:
- QueryImpl
public class QueryImpl.RemoveOnCloseResultList extends Object implements ResultList
Result list that removes itself from the query's open result list when it is closed. Public for testing.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RemoveOnCloseResultList(ResultList res)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int idx, Object o)booleanadd(Object o)booleanaddAll(int idx, Collection c)booleanaddAll(Collection c)voidclear()voidclose()Close the list.voidclose(boolean remove)booleancontains(Object o)booleancontainsAll(Collection c)booleanequals(Object o)Objectget(int idx)ResultListgetDelegate()ObjectgetUserObject()Get the opaque user object attached to this receiver.inthashCode()intindexOf(Object o)booleanisClosed()Returns true if the list has been closed.booleanisEmpty()booleanisProviderOpen()Returns true if the provider backing this list is open.Iteratoriterator()intlastIndexOf(Object o)ListIteratorlistIterator()ListIteratorlistIterator(int idx)Objectremove(int idx)booleanremove(Object o)booleanremoveAll(Collection c)booleanretainAll(Collection c)Objectset(int idx, Object o)voidsetUserObject(Object opaque)Set the opaque user object to this receiver.intsize()ListsubList(int start, int end)Object[]toArray()Object[]toArray(Object[] a)StringtoString()ObjectwriteReplace()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
RemoveOnCloseResultList
public RemoveOnCloseResultList(ResultList res)
-
-
Method Detail
-
getDelegate
public ResultList getDelegate()
-
isProviderOpen
public boolean isProviderOpen()
Description copied from interface:ResultListReturns true if the provider backing this list is open.- Specified by:
isProviderOpenin interfaceResultList
-
getUserObject
public Object getUserObject()
Description copied from interface:ResultListGet the opaque user object attached to this receiver.- Specified by:
getUserObjectin interfaceResultList
-
setUserObject
public void setUserObject(Object opaque)
Description copied from interface:ResultListSet the opaque user object to this receiver.- Specified by:
setUserObjectin interfaceResultList
-
isClosed
public boolean isClosed()
Description copied from interface:ResultListReturns true if the list has been closed.- Specified by:
isClosedin interfaceResultList
-
close
public void close()
Description copied from interface:ResultListClose the list.- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceResultList
-
close
public void close(boolean remove)
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceList
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceList
-
iterator
public Iterator iterator()
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
add
public boolean add(Object o)
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceList
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceList
-
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceList
-
addAll
public boolean addAll(Collection c)
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceList
-
addAll
public boolean addAll(int idx, Collection c)
-
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceList
-
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceList
-
clear
public void clear()
- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceList
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList
-
listIterator
public ListIterator listIterator()
- Specified by:
listIteratorin interfaceList
-
listIterator
public ListIterator listIterator(int idx)
- Specified by:
listIteratorin interfaceList
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
writeReplace
public Object writeReplace()
-
-