|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.objectstore.ObjectStoreAbstractImpl
org.intermine.objectstore.intermine.ObjectStoreInterMineImpl
org.intermine.objectstore.intermine.ObjectStoreWriterInterMineImpl
public class ObjectStoreWriterInterMineImpl
An SQL-backed implementation of the ObjectStoreWriter interface, backed by ObjectStoreInterMineImpl.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.intermine.objectstore.intermine.ObjectStoreInterMineImpl |
|---|
ObjectStoreInterMineImpl.BagTableToRemove |
| Field Summary | |
|---|---|
protected Batch |
batch
|
protected java.lang.String |
closeSituation
|
protected java.sql.Connection |
conn
|
protected java.lang.String |
connectionTakenBy
|
protected boolean |
connInUse
|
protected java.lang.String |
createSituation
|
protected ObjectStoreInterMineImpl |
os
|
protected java.util.Map<java.lang.Integer,java.lang.Boolean> |
recentSequences
|
protected java.util.Set<java.lang.Object> |
tablesAltered
|
protected java.util.Map<java.lang.String,java.util.Set<CollectionDescriptor>> |
tableToCollections
|
protected java.util.Map<java.lang.String,java.lang.String[]> |
tableToColNameArray
|
protected java.util.Map<java.lang.String,org.intermine.objectstore.intermine.ObjectStoreWriterInterMineImpl.TableInfo> |
tableToInfo
|
| Fields inherited from class org.intermine.objectstore.ObjectStoreAbstractImpl |
|---|
cache, getObjectHits, getObjectOps, getObjectPrefetches, maxLimit, maxOffset, maxTime, model, rand, sequenceKeys, sequenceNumber |
| Fields inherited from interface org.intermine.objectstore.ObjectStore |
|---|
SEQUENCE_IGNORE |
| Constructor Summary | |
|---|---|
ObjectStoreWriterInterMineImpl(ObjectStore os)
Constructor for this ObjectStoreWriter. |
|
| Method Summary | |
|---|---|
void |
abortTransaction()
Request that the ObjectStoreWriter aborts and closes the transaction |
void |
abortTransactionWithConnection(java.sql.Connection c)
Aborts a transaction. |
void |
addAllToBag(ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
Adds a collection of elements to an ObjectStoreBag. |
protected void |
addAllToBagWithConnection(java.sql.Connection c,
ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
Adds elements to the given bag. |
void |
addToBag(ObjectStoreBag osb,
java.lang.Integer element)
Adds an element to an ObjectStoreBag. |
void |
addToBagFromQuery(ObjectStoreBag osb,
Query query)
Adds elements to an ObjectStoreBag from the results of a Query. |
protected void |
addToBagFromQueryWithConnection(java.sql.Connection c,
ObjectStoreBag osb,
Query query)
Adds elements to a bag from the results of a query. |
void |
addToCollection(java.lang.Integer hasId,
java.lang.Class<?> clazz,
java.lang.String fieldName,
java.lang.Integer hadId)
Place an object in a many-to-many collection of another object. |
protected void |
addToCollectionWithConnection(java.sql.Connection c,
java.lang.Integer hasId,
java.lang.Class<?> clazz,
java.lang.String fieldName,
java.lang.Integer hadId)
Performs addToCollection with given connection |
void |
batchCommitTransaction()
Request that the ObjectStoreWriter commits and closes the transaction and then opens a new one, without guaranteeing that the operation is finished before this method returns. |
void |
batchCommitTransactionWithConnection(java.sql.Connection c)
Commits a transaction and opens a new one, without guaranteeing the operation is finished before this method returns. |
void |
beginTransaction()
Request that the ObjectStoreWriter begins a transaction |
protected void |
beginTransactionWithConnection(java.sql.Connection c)
Begins a transaction. |
void |
checkSequence(java.util.Map<java.lang.Object,java.lang.Integer> sequence,
Query q,
java.lang.String message)
Checks a number against the sequence number, and throws an exception if they do not match. |
void |
close()
Closes this ObjectStore's DB log connection. |
void |
commitTransaction()
Request that the ObjectStoreWriter commits and closes the transaction |
protected void |
commitTransactionWithConnection(java.sql.Connection c)
Commits a transaction. |
int |
count(Query q,
java.util.Map<java.lang.Object,java.lang.Integer> sequence)
Counts the number of rows the query will produce |
void |
databaseAltered(java.util.Set<java.lang.Object> tablesAltered)
Internal method called by the ObjectStoreWriter, to notify the ObjectStore that some of the data in the database has changed. |
protected void |
dbLog(long optimise,
long estimated,
long execute,
long permitted,
long convert,
Query q,
java.lang.String sql)
Produce an entry in the DB log. |
void |
delete(InterMineObject o)
Delete an object from this ObjectStore |
void |
delete(QueryClass qc,
Constraint c)
Deletes a set of objects from this ObjectStore. |
protected void |
deleteWithConnection(java.sql.Connection c,
InterMineObject o)
Performs a delete, with a connection. |
void |
deleteWithConnection(java.sql.Connection con,
QueryClass qc,
Constraint c)
Performs a delete, with a connection. |
protected void |
doFinalise()
Overrides Object.finalize - release the connection back to the objectstore. |
boolean |
everOptimise()
Returns whether optimisation should be permitted. |
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,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
Execute a Query on this ObjectStore, returning a SingletonResults |
protected java.lang.String |
generateSql(java.sql.Connection c,
Query q,
int start,
int limit)
Create temporary tables for the bag in the BagConstraints of the given Query, then call SqlGenerator.generate(). |
java.sql.Connection |
getConnection()
Returns a Connection. |
boolean |
getDisableResultsCache()
Gets the disableResultsCache configuration option. |
java.io.Writer |
getLog()
Returns the log used by this objctstore. |
boolean |
getLogBeforeExecute()
Gets the logBeforeExecute configuration option. |
boolean |
getLogEverything()
Gets the logEverything configuration option. |
boolean |
getLogExplains()
Gets the logExplains configuration option. |
int |
getMinBagTableSize()
Returns the cutoff value used to decide if a bag should be put in a table. |
ObjectStoreWriterInterMineImpl |
getNewWriter()
Create an ObjectStoreWriter that writes into this ObjectStore. |
ObjectStore |
getObjectStore()
Retrieve this Writer's ObjectStore. |
java.util.Map<java.lang.Object,java.lang.Integer> |
getSequence(java.util.Set<java.lang.Object> tables)
Returns an object representing the current state of the database, for fail-fast concurrency control. |
protected java.lang.Integer |
getSerialWithConnection(java.sql.Connection c)
Overrides, in order to store recentSequences. |
protected org.intermine.objectstore.intermine.ObjectStoreWriterInterMineImpl.TableInfo |
getTableInfo(ClassDescriptor tableMaster)
Produces metadata for a given table, caching it to save time. |
boolean |
getVerboseQueryLog()
Gets the verboseQueryLog configuration option. |
protected InterMineObject |
internalGetObjectById(java.lang.Integer id,
java.lang.Class<? extends InterMineObject> clazz)
Internal service method for getObjectById. |
boolean |
isInTransaction()
Check whether the ObjectStoreWriter is performing a transaction |
protected boolean |
isInTransactionWithConnection(java.sql.Connection c)
Finds if we are in a transaction. |
boolean |
isMultiConnection()
Return whether or not this ObjectStore gives a performance improvement when multiple simultaneous are made. |
protected boolean |
populateIds(java.sql.Connection c,
InterMineObject o)
Populates the object o with IDs. |
void |
releaseConnection(java.sql.Connection c)
Allows one to put a connection back. |
void |
removeAllFromBag(ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
Removes a collection of elements from an ObjectStoreBag. |
protected void |
removeAllFromBagWithConnection(java.sql.Connection c,
ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
Removes elements from the given bag. |
void |
removeFromBag(ObjectStoreBag osb,
java.lang.Integer element)
Removes an element from an ObjectStoreBag. |
void |
replaceClob(Clob clob,
java.lang.String text)
Replaces the contents of the given Clob with the given String. |
void |
replaceClobWithConnection(java.sql.Connection c,
Clob clob,
java.lang.String text)
Replaces the contents of the given Clob with the given String. |
void |
setBatchWriter(BatchWriter batchWriter)
Allows the changing of the BatchWriter that this ObjectStoreWriter uses. |
void |
setDisableResultsCache(boolean disableResultsCache)
Sets the disableResultsCache configuration option. |
void |
setLog(java.io.Writer log)
Not implemented. |
void |
setLogBeforeExecute(boolean logBeforeExecute)
Sets the logBeforeExecute configuration option. |
void |
setLogEverything(boolean logEverything)
Sets the logEverything configuration option. |
void |
setLogExplains(boolean logExplains)
Sets the logExplains configuration option. |
void |
setLogTableName(java.lang.String tableName)
Not implemented. |
void |
setMinBagTableSize(int minBagTableSize)
Set the cutoff value used to decide if a bag should be put in a table. |
void |
setVerboseQueryLog(boolean verboseQueryLog)
Sets the verboseQueryLog configuration option. |
void |
shutdown()
Called by the StatsShutdownHook on shutdown |
void |
store(java.lang.Object o)
Store an object in this ObjectStore. |
protected void |
storeWithConnection(java.sql.Connection c,
java.lang.Object o)
Performs store with a given Connection. |
java.lang.String |
toString()
|
protected void |
writePendingClobs(java.sql.Connection c,
java.lang.Object o)
Writes the contents of any pending Clobs to the database, and replaces them in the objects with a real ClobAccess object. |
| Methods inherited from class org.intermine.objectstore.ObjectStoreAbstractImpl |
|---|
cacheObjectById, changeSequence, checkStartLimit, createClob, createObjectStoreBag, getMaxLimit, getMaxOffset, getMaxTime, getModel, getModelFromClasspath, getObjectByExample, getObjectById, getObjectById, getObjectsByIds, invalidateObjectById, pilferObjectById, prefetchObjectById |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.intermine.objectstore.ObjectStore |
|---|
cacheObjectById, createClob, createObjectStoreBag, estimate, execute, executeSingleton, flushObjectById, getComponentsForQuery, getMaxLimit, getMaxOffset, getMaxTime, getModel, getObjectByExample, getObjectById, getObjectById, getObjectsByIds, getSerial, invalidateObjectById, pilferObjectById, prefetchObjectById |
| Field Detail |
|---|
protected java.sql.Connection conn
protected boolean connInUse
protected ObjectStoreInterMineImpl os
protected Batch batch
protected java.lang.String createSituation
protected java.lang.String closeSituation
protected java.util.Map<java.lang.Integer,java.lang.Boolean> recentSequences
protected java.util.Map<java.lang.String,org.intermine.objectstore.intermine.ObjectStoreWriterInterMineImpl.TableInfo> tableToInfo
protected java.util.Map<java.lang.String,java.lang.String[]> tableToColNameArray
protected java.util.Map<java.lang.String,java.util.Set<CollectionDescriptor>> tableToCollections
protected java.lang.String connectionTakenBy
protected java.util.Set<java.lang.Object> tablesAltered
| Constructor Detail |
|---|
public ObjectStoreWriterInterMineImpl(ObjectStore os)
throws ObjectStoreException
os - an ObjectStoreInterMineImpl
ObjectStoreException - if a problem occurs| Method Detail |
|---|
public ObjectStoreWriterInterMineImpl getNewWriter()
throws ObjectStoreException
getNewWriter in interface ObjectStoregetNewWriter in class ObjectStoreInterMineImplObjectStoreException - if an error occurs
public Results execute(Query q,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
execute in interface ObjectStoreexecute in class ObjectStoreInterMineImplq - 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,
int batchSize,
boolean optimise,
boolean explain,
boolean prefetch)
executeSingleton in interface ObjectStoreexecuteSingleton in class ObjectStoreInterMineImplq - 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 boolean everOptimise()
everOptimise in class ObjectStoreInterMineImplpublic java.io.Writer getLog()
getLog in class ObjectStoreInterMineImplpublic void setLog(java.io.Writer log)
setLog in class ObjectStoreInterMineImpllog - ignoredpublic void setLogTableName(java.lang.String tableName)
setLogTableName in class ObjectStoreInterMineImpltableName - ignored
protected void dbLog(long optimise,
long estimated,
long execute,
long permitted,
long convert,
Query q,
java.lang.String sql)
dbLog in class ObjectStoreInterMineImploptimise - the number of milliseconds used to optimise the queryestimated - the estimated number of milliseconds required to run the queryexecute - the number of milliseconds spent executing the querypermitted - an acceptable number of milliseconds for the query to takeconvert - the number of milliseconds spent converting the resultsq - the Query runsql - the SQL string executedpublic void setLogEverything(boolean logEverything)
setLogEverything in class ObjectStoreInterMineImpllogEverything - a booleanpublic boolean getLogEverything()
getLogEverything in class ObjectStoreInterMineImplpublic void setVerboseQueryLog(boolean verboseQueryLog)
setVerboseQueryLog in class ObjectStoreInterMineImplverboseQueryLog - a booleanpublic boolean getVerboseQueryLog()
getVerboseQueryLog in class ObjectStoreInterMineImplpublic void setLogExplains(boolean logExplains)
setLogExplains in class ObjectStoreInterMineImpllogExplains - a booleanpublic boolean getLogExplains()
getLogExplains in class ObjectStoreInterMineImplpublic void setLogBeforeExecute(boolean logBeforeExecute)
setLogBeforeExecute in class ObjectStoreInterMineImpllogBeforeExecute - a booleanpublic boolean getLogBeforeExecute()
getLogBeforeExecute in class ObjectStoreInterMineImplpublic void setDisableResultsCache(boolean disableResultsCache)
setDisableResultsCache in class ObjectStoreInterMineImpldisableResultsCache - a booleanpublic boolean getDisableResultsCache()
getDisableResultsCache in class ObjectStoreInterMineImpl
public void setBatchWriter(BatchWriter batchWriter)
throws ObjectStoreException
batchWriter - the new BatchWriter - use BatchWriterSimpleImpl for writers likely to see
small batches, and optimised (eg BatchWriterPostgresCopyImpl) implementations for bulk-write
writers.
ObjectStoreException - if something goes wrongpublic void setMinBagTableSize(int minBagTableSize)
setMinBagTableSize in class ObjectStoreInterMineImplminBagTableSize - don't use a table to represent bags if the bag is smaller than this
valuepublic int getMinBagTableSize()
getMinBagTableSize in class ObjectStoreInterMineImpl
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in class ObjectStoreInterMineImpljava.sql.SQLException - if there is a problem with thatpublic void releaseConnection(java.sql.Connection c)
releaseConnection in class ObjectStoreInterMineImplc - a Connectionprotected void doFinalise()
doFinalise in class ObjectStoreInterMineImpl
public void close()
throws ObjectStoreException
close in interface ObjectStoreWriterclose in class ObjectStoreInterMineImplObjectStoreException - in subclassespublic ObjectStore getObjectStore()
getObjectStore in interface ObjectStoreWriter
public void store(java.lang.Object o)
throws ObjectStoreException
store in interface ObjectStoreWritero - the object to store
ObjectStoreException - if an error occurs during storage of the object
protected void storeWithConnection(java.sql.Connection c,
java.lang.Object o)
throws ObjectStoreException
c - the Connectiono - the object to store
ObjectStoreException - sometimes
public void addToCollection(java.lang.Integer hasId,
java.lang.Class<?> clazz,
java.lang.String fieldName,
java.lang.Integer hadId)
throws ObjectStoreException
addToCollection in interface ObjectStoreWriterhasId - the ID of the object that has the collectionclazz - the class of the object that has the collectionfieldName - the name of the collectionhadId - the ID of the object to place in the collection
ObjectStoreException - if a problem occurs
protected void addToCollectionWithConnection(java.sql.Connection c,
java.lang.Integer hasId,
java.lang.Class<?> clazz,
java.lang.String fieldName,
java.lang.Integer hadId)
throws ObjectStoreException
c - the ConnectionhasId - the ID of the object that has the collectionclazz - the class of the object that has the collectionfieldName - the name of the collectionhadId - the ID of the object to place in the collection
ObjectStoreException - if an error occurs
protected org.intermine.objectstore.intermine.ObjectStoreWriterInterMineImpl.TableInfo getTableInfo(ClassDescriptor tableMaster)
throws ObjectStoreException
tableMaster - the ClassDescriptor describing the table
ObjectStoreException - if something goes wrong
protected boolean populateIds(java.sql.Connection c,
InterMineObject o)
throws java.sql.SQLException,
java.lang.IllegalAccessException
c - a Connection with which to fetch more IDso - the InterMineObject
java.sql.SQLException - if the database cannot produce a new ID
java.lang.IllegalAccessException - if the ID field cannot be set
protected void writePendingClobs(java.sql.Connection c,
java.lang.Object o)
throws ObjectStoreException,
java.sql.SQLException,
java.lang.IllegalAccessException
c - a connectiono - the object to transform
ObjectStoreException - if something goes wrong
java.sql.SQLException - if something goes wrong
java.lang.IllegalAccessException - if something goes wrong
public void addToBag(ObjectStoreBag osb,
java.lang.Integer element)
throws ObjectStoreException
addToBag in interface ObjectStoreWriterosb - an ObjectStoreBagelement - an Integer to add to the bag
ObjectStoreException - if an error occurs
public void addAllToBag(ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
throws ObjectStoreException
addAllToBag in interface ObjectStoreWriterosb - an ObjectStoreBagcoll - a Collection of Integers
ObjectStoreException - if an error occurs
protected void addAllToBagWithConnection(java.sql.Connection c,
ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
throws ObjectStoreException
c - a Connectionosb - an ObjectStoreBagcoll - a Collection of Integers
ObjectStoreException - if there is an error in the underlying database
public void removeFromBag(ObjectStoreBag osb,
java.lang.Integer element)
throws ObjectStoreException
removeFromBag in interface ObjectStoreWriterosb - an ObjectStoreBagelement - an Integer to add to the bag
ObjectStoreException - if an error occurs
public void removeAllFromBag(ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
throws ObjectStoreException
removeAllFromBag in interface ObjectStoreWriterosb - an ObjectStoreBagcoll - a Collection of Integers
ObjectStoreException - if an error occurs
protected void removeAllFromBagWithConnection(java.sql.Connection c,
ObjectStoreBag osb,
java.util.Collection<java.lang.Integer> coll)
throws ObjectStoreException
c - a Connectionosb - an ObjectStoreBagcoll - a Collection of Integers
ObjectStoreException - if there is an error in the underlying database
public void addToBagFromQuery(ObjectStoreBag osb,
Query query)
throws ObjectStoreException
addToBagFromQuery in interface ObjectStoreWriterosb - an ObjectStoreBagquery - an objectstore Query, which contains only one result column, which is a suitable
type for insertion into the given bag
ObjectStoreException - if something goes wrong
protected void addToBagFromQueryWithConnection(java.sql.Connection c,
ObjectStoreBag osb,
Query query)
throws ObjectStoreException
c - a Connectionosb - an ObjectStoreBagquery - a Query with only one column
ObjectStoreException - if there is an error in the underlying database
public void replaceClob(Clob clob,
java.lang.String text)
throws ObjectStoreException
replaceClob in interface ObjectStoreWriterclob - the Clob to write totext - the text to write to the Clob
ObjectStoreException - if something goes wrong
public void replaceClobWithConnection(java.sql.Connection c,
Clob clob,
java.lang.String text)
throws ObjectStoreException
c - a Connectionclob - the Clob to write totext - the text to write to the Clob
ObjectStoreException - if something goes wrong
public void delete(InterMineObject o)
throws ObjectStoreException
delete in interface ObjectStoreWritero - the object to delete
ObjectStoreException - if an error occurs during deletion of the object
protected void deleteWithConnection(java.sql.Connection c,
InterMineObject o)
throws ObjectStoreException
c - the Connectiono - the object to delete
ObjectStoreException - sometimes
public void delete(QueryClass qc,
Constraint c)
throws ObjectStoreException
delete in interface ObjectStoreWriterqc - a QueryClass for the class of objects to deletec - a Constraint based on the QueryClass to filter the objects to delete, or null to
delete all objects
ObjectStoreException - if an error occurs while deleting the objects
public void deleteWithConnection(java.sql.Connection con,
QueryClass qc,
Constraint c)
throws ObjectStoreException
con - the Connectionqc - the QueryClass in which to delete - note that this must currently be a Simple
Object classc - the Constraint to limit the deletes, or null to delete everything
ObjectStoreException - if something goes wrong
public boolean isInTransaction()
throws ObjectStoreException
isInTransaction in interface ObjectStoreWriterObjectStoreException - if an error occurs
protected boolean isInTransactionWithConnection(java.sql.Connection c)
throws ObjectStoreException
c - the Connection
ObjectStoreException - sometimes
public void beginTransaction()
throws ObjectStoreException
beginTransaction in interface ObjectStoreWriterObjectStoreException - if a transaction is in progress, or is aborted
protected void beginTransactionWithConnection(java.sql.Connection c)
throws ObjectStoreException
c - the Connection
ObjectStoreException - if we are already in a transaction
public void commitTransaction()
throws ObjectStoreException
commitTransaction in interface ObjectStoreWriterObjectStoreException - if a transaction is not in progress, or is aborted
protected void commitTransactionWithConnection(java.sql.Connection c)
throws ObjectStoreException
c - the Connection
ObjectStoreException - if we are not in a transaction
public void abortTransaction()
throws ObjectStoreException
abortTransaction in interface ObjectStoreWriterObjectStoreException - if a transaction is not in progress
public void abortTransactionWithConnection(java.sql.Connection c)
throws ObjectStoreException
c - the Connection
ObjectStoreException - if we are not in a transaction
public void batchCommitTransaction()
throws ObjectStoreException
batchCommitTransaction in interface ObjectStoreWriterObjectStoreException - if an error occurs
public void batchCommitTransactionWithConnection(java.sql.Connection c)
throws ObjectStoreException
c - the Connection
ObjectStoreException - if an error occurspublic void databaseAltered(java.util.Set<java.lang.Object> tablesAltered)
databaseAltered in class ObjectStoreInterMineImpltablesAltered - a Set of table names that may have been alteredpublic java.util.Map<java.lang.Object,java.lang.Integer> getSequence(java.util.Set<java.lang.Object> tables)
getSequence in interface ObjectStoregetSequence in class ObjectStoreAbstractImpltables - a Set of objects representing independent components of the database
public void checkSequence(java.util.Map<java.lang.Object,java.lang.Integer> sequence,
Query q,
java.lang.String message)
throws DataChangedException
checkSequence in class ObjectStoreAbstractImplsequence - a Map representing a database stateq - the Query that is to be runmessage - some description of the operation that is about to happen
DataChangedException - if the sequence numbers do not match
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).
This method is overridden in order to flush batches properly before the read.
execute in interface ObjectStoreexecute in class ObjectStoreInterMineImplq - 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 Query
protected java.lang.String generateSql(java.sql.Connection c,
Query q,
int start,
int limit)
throws ObjectStoreException
generateSql in class ObjectStoreInterMineImplc - a Connection to useq - the Querystart - the start row number (inclusive, from zero)limit - maximum number of rows to return
ObjectStoreException - if an error occurs
public int count(Query q,
java.util.Map<java.lang.Object,java.lang.Integer> sequence)
throws ObjectStoreException
count in interface ObjectStorecount in class ObjectStoreInterMineImplq - InterMine Query on which to count rowssequence - 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 counting the query
protected InterMineObject internalGetObjectById(java.lang.Integer id,
java.lang.Class<? extends InterMineObject> clazz)
throws ObjectStoreException
internalGetObjectById in class ObjectStoreInterMineImplid - the ID of the object to getclazz - a class of the object
ObjectStoreException - if an error occurs during the running of the Querypublic void shutdown()
shutdown in interface Shutdownableshutdown in class ObjectStoreInterMineImplpublic boolean isMultiConnection()
isMultiConnection in interface ObjectStoreisMultiConnection in class ObjectStoreInterMineImpl
protected java.lang.Integer getSerialWithConnection(java.sql.Connection c)
throws java.sql.SQLException
getSerialWithConnection in class ObjectStoreInterMineImplc - the Connection
java.sql.SQLException - if an error occurspublic java.lang.String toString()
toString in class ObjectStoreInterMineImpl
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||