Package org.apache.openjpa.lib.rop
Class RandomAccessResultList
- java.lang.Object
-
- org.apache.openjpa.lib.rop.AbstractResultList
-
- org.apache.openjpa.lib.rop.AbstractNonSequentialResultList
-
- org.apache.openjpa.lib.rop.RandomAccessResultList
-
- All Implemented Interfaces:
Serializable,Iterable,Collection,List,ResultList,Closeable
- Direct Known Subclasses:
SoftRandomAccessResultList
public class RandomAccessResultList extends AbstractNonSequentialResultList
Random-access result list implementation. It maintains a map of the items that we have already instantiated.- Author:
- Marc Prud'hommeaux, Abe White
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.openjpa.lib.rop.AbstractNonSequentialResultList
PAST_END
-
-
Constructor Summary
Constructors Constructor Description RandomAccessResultList(ResultObjectProvider rop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the list.booleanequals(Object other)protected ObjectgetInternal(int index)Implement this method andList.size().inthashCode()booleanisClosed()Returns true if the list has been closed.booleanisProviderOpen()Returns true if the provider backing this list is open.protected MapnewRowMap()Override this method to control what kind of map is used for the instantiated rows.intsize()StringtoString()ObjectwriteReplace()-
Methods inherited from class org.apache.openjpa.lib.rop.AbstractNonSequentialResultList
contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, subList, toArray, toArray
-
Methods inherited from class org.apache.openjpa.lib.rop.AbstractResultList
add, add, addAll, addAll, assertOpen, clear, getUserObject, remove, remove, removeAll, retainAll, set, setUserObject
-
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
-
RandomAccessResultList
public RandomAccessResultList(ResultObjectProvider rop)
-
-
Method Detail
-
newRowMap
protected Map newRowMap()
Override this method to control what kind of map is used for the instantiated rows.
-
isProviderOpen
public boolean isProviderOpen()
Description copied from interface:ResultListReturns true if the provider backing this list is open.
-
isClosed
public boolean isClosed()
Description copied from interface:ResultListReturns true if the list has been closed.
-
close
public void close()
Description copied from interface:ResultListClose the list.
-
getInternal
protected Object getInternal(int index)
Description copied from class:AbstractNonSequentialResultListImplement this method andList.size(). ReturnAbstractNonSequentialResultList.PAST_ENDif the index is out of bounds.- Specified by:
getInternalin classAbstractNonSequentialResultList
-
size
public int size()
-
writeReplace
public Object writeReplace() throws ObjectStreamException
- Throws:
ObjectStreamException
-
hashCode
public int hashCode()
-
-