org.intermine.objectstore.proxy
Interface LazyCollection<E>

Type Parameters:
E - The element type
All Superinterfaces:
java.util.Collection<E>, java.lang.Iterable<E>, Lazy, java.util.Set<E>
All Known Implementing Classes:
ProxyCollection, Results, SingletonResults

public interface LazyCollection<E>
extends Lazy, java.util.Set<E>

Class which uses an ObjectStore to perform lazy fetching of data


Method Summary
 java.util.List<E> asList()
          Return this Collection as a List.
 ResultsInfo getInfo()
          Returns Returns the current best estimate of the characteristics of the LazyCollection
 Query getQuery()
          Returns the Query used by this LazyCollection
 void setBatchSize(int size)
          Sets the number of rows requested from the ObjectStore whenever an execute call is made
 void setNoExplain()
          Sets this LazyCollection to bypass the explain check in ObjectStore.execute().
 void setNoOptimise()
          Sets this LazyCollection to bypass the optimiser
 
Methods inherited from interface org.intermine.objectstore.proxy.Lazy
getObjectStore
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

setNoOptimise

void setNoOptimise()
Sets this LazyCollection to bypass the optimiser


setNoExplain

void setNoExplain()
Sets this LazyCollection to bypass the explain check in ObjectStore.execute().


getQuery

Query getQuery()
Returns the Query used by this LazyCollection

Returns:
a Query

asList

java.util.List<E> asList()
Return this Collection as a List. This may create a new ArrayList if necessary so the returned List is not guaranteed to be consistent if the LazyCollection changes.

Returns:
a List

getInfo

ResultsInfo getInfo()
                    throws ObjectStoreException
Returns Returns the current best estimate of the characteristics of the LazyCollection

Returns:
a ResultsInfo object
Throws:
ObjectStoreException - if an error occurs in the underlying ObjectStore

setBatchSize

void setBatchSize(int size)
Sets the number of rows requested from the ObjectStore whenever an execute call is made

Parameters:
size - the number of rows