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
Result list that removes itself from the query's open result list
when it is closed. Public for testing.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int idx, Collection c) boolean
addAll
(Collection c) void
clear()
void
close()
Close the list.void
close
(boolean remove) boolean
boolean
boolean
get
(int idx) Get the opaque user object attached to this receiver.int
hashCode()
int
boolean
isClosed()
Returns true if the list has been closed.boolean
isEmpty()
boolean
Returns true if the provider backing this list is open.iterator()
int
listIterator
(int idx) remove
(int idx) boolean
boolean
boolean
void
setUserObject
(Object opaque) Set the opaque user object to this receiver.int
size()
subList
(int start, int end) Object[]
toArray()
Object[]
toString()
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 Details
-
RemoveOnCloseResultList
-
-
Method Details
-
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
Description copied from interface:ResultList
Get the opaque user object attached to this receiver.- Specified by:
getUserObject
in interfaceResultList
-
setUserObject
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
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
-
iterator
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
add
- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceList
-
remove
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceList
-
containsAll
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceList
-
addAll
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceList
-
addAll
-
removeAll
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceList
-
retainAll
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceList
-
clear
public void clear()- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceList
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList
-
listIterator
- Specified by:
listIterator
in interfaceList
-
listIterator
- Specified by:
listIterator
in interfaceList
-
subList
-
equals
-
hashCode
public int hashCode() -
toString
-
writeReplace
-