Package org.apache.openjpa.lib.rop
Class SimpleResultList
- java.lang.Object
-
- org.apache.openjpa.lib.rop.AbstractResultList
-
- org.apache.openjpa.lib.rop.AbstractNonSequentialResultList
-
- org.apache.openjpa.lib.rop.SimpleResultList
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable,java.util.Collection,java.util.List,ResultList,Closeable
public class SimpleResultList extends AbstractNonSequentialResultList
An almost statelessResultListdesigned for use with result object providers backed by efficient random-access data structures, such as theListResultObjectProvider. This result list does not perform any caching.- Author:
- 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 SimpleResultList(ResultObjectProvider rop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the list.java.lang.ObjectgetInternal(int index)Implement this method andList.size().booleanisClosed()Returns true if the list has been closed.booleanisProviderOpen()Returns true if the provider backing this list is open.intsize()java.lang.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
-
-
-
-
Constructor Detail
-
SimpleResultList
public SimpleResultList(ResultObjectProvider rop)
-
-
Method Detail
-
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
public java.lang.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 java.lang.Object writeReplace() throws java.io.ObjectStreamException- Throws:
java.io.ObjectStreamException
-
-