|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.objectstore.ObjectStorePassthruImpl
org.intermine.objectstore.fastcollections.ObjectStoreFastCollectionsForTranslatorImpl
public class ObjectStoreFastCollectionsForTranslatorImpl
Provides an implementation of an objectstore that explicitly materialises all the collections in the results set it provides, written for the translating objectstore. Note that this ObjectStore BREAKS the ObjectStore interface, because it returns collections that are not only solid (HashSet / ArrayList) implementations, but also contain ProxyReferences in place of objects that it thinks the DataLoader will not need.
| Field Summary |
|---|
| Fields inherited from class org.intermine.objectstore.ObjectStorePassthruImpl |
|---|
os |
| Fields inherited from interface org.intermine.objectstore.ObjectStore |
|---|
SEQUENCE_IGNORE |
| Constructor Summary | |
|---|---|
ObjectStoreFastCollectionsForTranslatorImpl(ObjectStore os)
Creates an instance, from another ObjectStore instance. |
|
| Method Summary | |
|---|---|
Results |
execute(Query q)
Execute a Query on this ObjectStore |
Results |
execute(Query q,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
Execute a Query on this ObjectStore |
java.util.List<ResultsRow<java.lang.Object>> |
execute(Query q,
int start,
int limit,
boolean optimise,
boolean explain,
java.util.Map<java.lang.Object,java.lang.Integer> sequence)
Execute a Query on this ObjectStore, asking for a certain range of rows to be returned. |
SingletonResults |
executeSingleton(Query q)
Execute a Query on this ObjectStore, returning a SingletonResults |
SingletonResults |
executeSingleton(Query q,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
Execute a Query on this ObjectStore, returning a SingletonResults |
IntPresentSet |
getDoneAlready()
Returns the doneAlready Set, for logging purposes |
static ObjectStoreFastCollectionsForTranslatorImpl |
getInstance(java.lang.String osAlias,
java.util.Properties props)
Gets an ObjectStoreFastCollectionsForTranslatorImpl instance for the given properties |
Translator |
getTranslator()
Returns the Translator associated with the underlying ObjectStoreTranslatingImpl. |
void |
setSource(Source source)
Sets the source of the data, so we know what the primary keys are, and can fetch that extra data. |
| Methods inherited from class org.intermine.objectstore.ObjectStorePassthruImpl |
|---|
cacheObjectById, count, createClob, createObjectStoreBag, estimate, flushObjectById, getComponentsForQuery, getMaxLimit, getMaxOffset, getMaxTime, getModel, getNewWriter, getObjectByExample, getObjectById, getObjectById, getObjectsByIds, getSequence, getSerial, invalidateObjectById, isMultiConnection, pilferObjectById, prefetchObjectById |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectStoreFastCollectionsForTranslatorImpl(ObjectStore os)
os - an ObjectStore object to use| Method Detail |
|---|
public static ObjectStoreFastCollectionsForTranslatorImpl getInstance(java.lang.String osAlias,
java.util.Properties props)
throws ObjectStoreException
osAlias - the alias of this objectstoreprops - the properties
java.lang.IllegalArgumentException - if props are invalid
ObjectStoreException - if there is a problem with the instancepublic void setSource(Source source)
source - a Source objectpublic IntPresentSet getDoneAlready()
public Results execute(Query q)
execute in interface ObjectStoreexecute in class ObjectStorePassthruImplq - the Query to execute
public Results execute(Query q,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
execute in interface ObjectStoreexecute in class ObjectStorePassthruImplq - the Query to executebatchSize - the batch size to initialise the Results object withoptimise - whether to optimise queriesexplain - whether to explain queriesprefetch - whether to use the PrefetchManager
public SingletonResults executeSingleton(Query q)
executeSingleton in interface ObjectStoreexecuteSingleton in class ObjectStorePassthruImplq - the Query to execute
public SingletonResults executeSingleton(Query q,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
executeSingleton in interface ObjectStoreexecuteSingleton in class ObjectStorePassthruImplq - the Query to executebatchSize - the batch size to initialise the Results object withoptimise - whether to optimise queriesexplain - whether to explain queriesprefetch - whether to use the PrefetchManager
public java.util.List<ResultsRow<java.lang.Object>> execute(Query q,
int start,
int limit,
boolean optimise,
boolean explain,
java.util.Map<java.lang.Object,java.lang.Integer> sequence)
throws ObjectStoreException
execute(Query q).
execute in interface ObjectStoreexecute in class ObjectStorePassthruImplq - the Query to executestart - the start rowlimit - the maximum number of rows to returnoptimise - true if it is expected that optimising the query will improve performanceexplain - true if the ObjectStore should enforce maximum query running time constraintssequence - an object representing the state of the database corresponding to when the
action that resulted in this execute was started. This number must match the ObjectStore's
internal sequence number or a DataChangedException is thrown. The sequence number is
incremented each time the data in the objectstore is changed
ObjectStoreException - if an error occurs during the running of the Querypublic Translator getTranslator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||