Class InMemoryQueryResult
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
org.datanucleus.store.query.inmemory.InMemoryQueryResult
- All Implemented Interfaces:
Serializable
,Iterable
,Collection
,List
,QueryResult
Simple wrapper to results generated by the in-memory query process suitable for use by JDO/JPA.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) ApiAdapter
protected boolean
Whether the results are close.(package private) List
private static final long
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection c) boolean
addAll
(Collection c) protected void
Internal method to throw an Exception if the ResultSet is open.void
clear()
void
close()
Method to close the results, making them unusable thereafter.boolean
boolean
void
Method to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves like a List.get
(int index) int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
boolean
int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
Object[]
Methods inherited from class java.util.AbstractList
equals, hashCode, removeRange
Methods inherited from class java.util.AbstractCollection
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
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
api
ApiAdapter api -
results
List results -
closed
protected boolean closedWhether the results are close.
-
-
Constructor Details
-
InMemoryQueryResult
-
-
Method Details
-
close
public void close()Description copied from interface:QueryResult
Method to close the results, making them unusable thereafter.- Specified by:
close
in interfaceQueryResult
-
disconnect
public void disconnect()Description copied from interface:QueryResult
Method to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves like a List.- Specified by:
disconnect
in interfaceQueryResult
-
contains
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
- Overrides:
contains
in classAbstractCollection
-
containsAll
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceList
- Overrides:
containsAll
in classAbstractCollection
-
get
- Specified by:
get
in interfaceList
- Specified by:
get
in classAbstractList
-
indexOf
- Specified by:
indexOf
in interfaceList
- Overrides:
indexOf
in classAbstractList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceList
- Overrides:
isEmpty
in classAbstractCollection
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList
- Overrides:
lastIndexOf
in classAbstractList
-
subList
- Specified by:
subList
in interfaceList
- Overrides:
subList
in classAbstractList
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classAbstractCollection
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classAbstractCollection
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
- Specified by:
size
in classAbstractCollection
-
iterator
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in interfaceList
- Overrides:
iterator
in classAbstractList
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
assertIsOpen
protected void assertIsOpen()Internal method to throw an Exception if the ResultSet is open. -
addAll
- Specified by:
addAll
in interfaceList
- Overrides:
addAll
in classAbstractList
-
addAll
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceList
- Overrides:
addAll
in classAbstractCollection
-
add
- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceList
- Overrides:
add
in classAbstractList
-
add
- Specified by:
add
in interfaceList
- Overrides:
add
in classAbstractList
-
clear
public void clear()- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceList
- Overrides:
clear
in classAbstractList
-
remove
- Specified by:
remove
in interfaceList
- Overrides:
remove
in classAbstractList
-
remove
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceList
- Overrides:
remove
in classAbstractCollection
-
removeAll
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceList
- Overrides:
removeAll
in classAbstractCollection
-
retainAll
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceList
- Overrides:
retainAll
in classAbstractCollection
-
set
- Specified by:
set
in interfaceList
- Overrides:
set
in classAbstractList
-