Package org.apache.openjpa.kernel
Class QueryImpl.RemoveOnCloseResultList
- java.lang.Object
-
- org.apache.openjpa.kernel.QueryImpl.RemoveOnCloseResultList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable,java.util.Collection,java.util.List,ResultList,Closeable
- Enclosing class:
- QueryImpl
public class QueryImpl.RemoveOnCloseResultList extends java.lang.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, java.lang.Object o)booleanadd(java.lang.Object o)booleanaddAll(int idx, java.util.Collection c)booleanaddAll(java.util.Collection c)voidclear()voidclose()Close the list.voidclose(boolean remove)booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection c)booleanequals(java.lang.Object o)java.lang.Objectget(int idx)ResultListgetDelegate()java.lang.ObjectgetUserObject()Get the opaque user object attached to this receiver.inthashCode()intindexOf(java.lang.Object o)booleanisClosed()Returns true if the list has been closed.booleanisEmpty()booleanisProviderOpen()Returns true if the provider backing this list is open.java.util.Iteratoriterator()intlastIndexOf(java.lang.Object o)java.util.ListIteratorlistIterator()java.util.ListIteratorlistIterator(int idx)java.lang.Objectremove(int idx)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection c)booleanretainAll(java.util.Collection c)java.lang.Objectset(int idx, java.lang.Object o)voidsetUserObject(java.lang.Object opaque)Set the opaque user object to this receiver.intsize()java.util.ListsubList(int start, int end)java.lang.Object[]toArray()java.lang.Object[]toArray(java.lang.Object[] a)java.lang.StringtoString()java.lang.ObjectwriteReplace()
-
-
-
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 java.lang.Object getUserObject()
Description copied from interface:ResultListGet the opaque user object attached to this receiver.- Specified by:
getUserObjectin interfaceResultList
-
setUserObject
public void setUserObject(java.lang.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 interfacejava.util.Collection- Specified by:
sizein interfacejava.util.List
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection- Specified by:
isEmptyin interfacejava.util.List
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection- Specified by:
containsin interfacejava.util.List
-
iterator
public java.util.Iterator iterator()
- Specified by:
iteratorin interfacejava.util.Collection- Specified by:
iteratorin interfacejava.lang.Iterable- Specified by:
iteratorin interfacejava.util.List
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection- Specified by:
toArrayin interfacejava.util.List
-
toArray
public java.lang.Object[] toArray(java.lang.Object[] a)
- Specified by:
toArrayin interfacejava.util.Collection- Specified by:
toArrayin interfacejava.util.List
-
add
public boolean add(java.lang.Object o)
- Specified by:
addin interfacejava.util.Collection- Specified by:
addin interfacejava.util.List
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection- Specified by:
removein interfacejava.util.List
-
containsAll
public boolean containsAll(java.util.Collection c)
- Specified by:
containsAllin interfacejava.util.Collection- Specified by:
containsAllin interfacejava.util.List
-
addAll
public boolean addAll(java.util.Collection c)
- Specified by:
addAllin interfacejava.util.Collection- Specified by:
addAllin interfacejava.util.List
-
addAll
public boolean addAll(int idx, java.util.Collection c)- Specified by:
addAllin interfacejava.util.List
-
removeAll
public boolean removeAll(java.util.Collection c)
- Specified by:
removeAllin interfacejava.util.Collection- Specified by:
removeAllin interfacejava.util.List
-
retainAll
public boolean retainAll(java.util.Collection c)
- Specified by:
retainAllin interfacejava.util.Collection- Specified by:
retainAllin interfacejava.util.List
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection- Specified by:
clearin interfacejava.util.List
-
get
public java.lang.Object get(int idx)
- Specified by:
getin interfacejava.util.List
-
set
public java.lang.Object set(int idx, java.lang.Object o)- Specified by:
setin interfacejava.util.List
-
add
public void add(int idx, java.lang.Object o)- Specified by:
addin interfacejava.util.List
-
remove
public java.lang.Object remove(int idx)
- Specified by:
removein interfacejava.util.List
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOfin interfacejava.util.List
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOfin interfacejava.util.List
-
listIterator
public java.util.ListIterator listIterator()
- Specified by:
listIteratorin interfacejava.util.List
-
listIterator
public java.util.ListIterator listIterator(int idx)
- Specified by:
listIteratorin interfacejava.util.List
-
subList
public java.util.List subList(int start, int end)- Specified by:
subListin interfacejava.util.List
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin interfacejava.util.Collection- Specified by:
equalsin interfacejava.util.List- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection- Specified by:
hashCodein interfacejava.util.List- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
writeReplace
public java.lang.Object writeReplace()
-
-