public class DatabaseResultListener extends DatabaseUtils implements ResultListener
BOOL, BYTE, DATE, DOUBLE, EXP_INDEX_TABLE, EXP_RESULT_COL, EXP_RESULT_PREFIX, EXP_SETUP_COL, EXP_TYPE_COL, FLOAT, INTEGER, LONG, PROPERTY_FILE, SHORT, STRING, TEXT, TIME, TIMESTAMP
Constructor and Description |
---|
DatabaseResultListener()
Sets up the database drivers
|
Modifier and Type | Method and Description |
---|---|
void |
acceptResult(ResultProducer rp,
java.lang.Object[] key,
java.lang.Object[] result)
Submit the result to the appropriate table of the database
|
java.lang.String |
cacheKeyNameTipText()
Returns the tip text for this property
|
java.lang.String[] |
determineColumnConstraints(ResultProducer rp)
Determines if there are any constraints (imposed by the destination) on any
additional measures produced by resultProducers.
|
java.lang.String |
getCacheKeyName()
Get the value of CacheKeyName.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this result listener
|
boolean |
isResultRequired(ResultProducer rp,
java.lang.Object[] key)
Always says a result is required.
|
void |
postProcess(ResultProducer rp)
Perform any postprocessing.
|
void |
preProcess(ResultProducer rp)
Prepare for the results to be received.
|
void |
setCacheKeyName(java.lang.String newCacheKeyName)
Set the value of CacheKeyName.
|
arrayToString, attributeCaseFix, close, close, connectToDatabase, createExperimentIndex, createExperimentIndexEntry, createResultsTable, databaseURLTipText, debugTipText, disconnectFromDatabase, execute, experimentIndexExists, getDatabaseURL, getDebug, getKeywords, getKeywordsMaskChar, getPassword, getResultFromTable, getResultSet, getResultsTableName, getSupportedCursorScrollType, getUsername, initialize, initialize, isConnected, isCursorScrollable, isCursorScrollSensitive, isKeyword, maskKeyword, passwordTipText, processKeyString, putResultInTable, select, setDatabaseURL, setDebug, setKeywords, setKeywordsMaskChar, setPassword, setUsername, tableExists, translateDBColumnType, typeName, update, usernameTipText
public DatabaseResultListener() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic java.lang.String globalInfo()
public void preProcess(ResultProducer rp) throws java.lang.Exception
preProcess
in interface ResultListener
rp
- the ResultProducer that will generate the resultsjava.lang.Exception
- if an error occurs during preprocessing.public void postProcess(ResultProducer rp) throws java.lang.Exception
postProcess
in interface ResultListener
rp
- the ResultProducer that generated the resultsjava.lang.Exception
- if an error occurspublic java.lang.String[] determineColumnConstraints(ResultProducer rp) throws java.lang.Exception
determineColumnConstraints
in interface ResultListener
rp
- the ResultProducer to which the constraints will applyjava.lang.Exception
- if an error occurs.public void acceptResult(ResultProducer rp, java.lang.Object[] key, java.lang.Object[] result) throws java.lang.Exception
acceptResult
in interface ResultListener
rp
- the ResultProducer that generated the resultkey
- The key for the results.result
- The actual results.java.lang.Exception
- if the result couldn't be sent to the databasepublic boolean isResultRequired(ResultProducer rp, java.lang.Object[] key) throws java.lang.Exception
isResultRequired
in interface ResultListener
rp
- the ResultProducer wanting to generate the resultkey
- The key for which a result may be needed.java.lang.Exception
- if the database couldn't be queriedpublic java.lang.String cacheKeyNameTipText()
public java.lang.String getCacheKeyName()
public void setCacheKeyName(java.lang.String newCacheKeyName)
newCacheKeyName
- Value to assign to CacheKeyName.public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class DatabaseUtils