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 void
add(int idx, Object o)
boolean
add(Object o)
boolean
addAll(int idx, Collection c)
boolean
addAll(Collection c)
void
clear()
void
close()
Close the list.void
close(boolean remove)
boolean
contains(Object o)
boolean
containsAll(Collection c)
boolean
equals(Object o)
Object
get(int idx)
ResultList
getDelegate()
Object
getUserObject()
Get the opaque user object attached to this receiver.int
hashCode()
int
indexOf(Object o)
boolean
isClosed()
Returns true if the list has been closed.boolean
isEmpty()
boolean
isProviderOpen()
Returns true if the provider backing this list is open.Iterator
iterator()
int
lastIndexOf(Object o)
ListIterator
listIterator()
ListIterator
listIterator(int idx)
Object
remove(int idx)
boolean
remove(Object o)
boolean
removeAll(Collection c)
boolean
retainAll(Collection c)
Object
set(int idx, Object o)
void
setUserObject(Object opaque)
Set the opaque user object to this receiver.int
size()
List
subList(int start, int end)
Object[]
toArray()
Object[]
toArray(Object[] a)
String
toString()
Object
writeReplace()
-
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:ResultList
Returns true if the provider backing this list is open.- Specified by:
isProviderOpen
in interfaceResultList
-
getUserObject
public Object getUserObject()
Description copied from interface:ResultList
Get the opaque user object attached to this receiver.- Specified by:
getUserObject
in interfaceResultList
-
setUserObject
public void setUserObject(Object opaque)
Description copied from interface:ResultList
Set the opaque user object to this receiver.- Specified by:
setUserObject
in interfaceResultList
-
isClosed
public boolean isClosed()
Description copied from interface:ResultList
Returns true if the list has been closed.- Specified by:
isClosed
in interfaceResultList
-
close
public void close()
Description copied from interface:ResultList
Close the list.- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceResultList
-
close
public void close(boolean remove)
-
size
public int size()
- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceList
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
-
iterator
public Iterator iterator()
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
add
public boolean add(Object o)
- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceList
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceList
-
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceList
-
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceList
-
addAll
public boolean addAll(int idx, Collection c)
-
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceList
-
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceList
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceList
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList
-
listIterator
public ListIterator listIterator()
- Specified by:
listIterator
in interfaceList
-
listIterator
public ListIterator listIterator(int idx)
- Specified by:
listIterator
in interfaceList
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
writeReplace
public Object writeReplace()
-
-