public class SQLQueryV8 extends DefaultQuery
| Modifier and Type | Field and Description |
|---|---|
protected DatabaseType |
_dbType
The connection to the database.
|
protected static java.sql.Timestamp |
_maxEndTime
The most futuristic Timestamp possible!
|
protected static java.sql.Timestamp |
_minStartTime
The earliest Timestamp possible.
|
protected java.sql.PreparedStatement |
_psActorExecutionTimes |
protected java.sql.PreparedStatement |
_psActorFireId |
protected java.sql.PreparedStatement |
_psActorFiringForTokenWrite |
protected java.sql.PreparedStatement |
_psActorFirings |
protected java.sql.PreparedStatement |
_psActorFiringsForExecution |
protected java.sql.PreparedStatement |
_psActorFiringsForTokenRead |
protected java.sql.PreparedStatement |
_psActorNameForFiring |
protected java.sql.PreparedStatement |
_psActorTypeForFiring |
protected java.sql.PreparedStatement |
_psAssociatedKeysValuesForExecution |
protected java.sql.PreparedStatement |
_psChangesForTimespan |
protected java.sql.PreparedStatement |
_psChangesForTimespanOnHost |
protected java.sql.PreparedStatement |
_psChannelForTokenRead |
protected java.sql.PreparedStatement |
_psChannelForTokenWrite |
protected java.sql.PreparedStatement |
_psDataContents |
protected java.sql.PreparedStatement |
_psDataMD5s |
protected java.sql.PreparedStatement |
_psDoesExecutionHaveError |
protected java.sql.PreparedStatement |
_psEntitiesForChange |
protected java.sql.PreparedStatement |
_psEntityId |
protected java.sql.PreparedStatement |
_psEntityIdLSID |
protected java.sql.PreparedStatement |
_psEntityTokensForExecution |
protected java.sql.PreparedStatement |
_psEntityType |
protected java.sql.PreparedStatement |
_psEntityWorkflowId |
protected java.sql.PreparedStatement |
_psErrorForExecution |
protected java.sql.PreparedStatement |
_psExecutionForExecutionLSID |
protected java.sql.PreparedStatement |
_psExecutionForExecutionLSIDWithoutRevision |
protected java.sql.PreparedStatement |
_psExecutionForOldestReferralExecutionLSIDWithoutRevision |
protected java.sql.PreparedStatement |
_psExecutionIdsForTags |
protected java.sql.PreparedStatement |
_psExecutionLSIDForExecution |
protected java.sql.PreparedStatement |
_psExecutionLSIDs |
protected java.sql.PreparedStatement |
_psExecutionLSIDsForWorkflowRuns |
protected java.sql.PreparedStatement |
_psExecutions |
protected java.sql.PreparedStatement |
_psExecutionsForAnnotation |
protected java.sql.PreparedStatement |
_psExecutionsForTimespan |
protected java.sql.PreparedStatement |
_psExecutionsForTimespanOnHost |
protected java.sql.PreparedStatement |
_psExecutionsForType |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflow |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflowNameContains |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflowRuns |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflowRuns2 |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflowRunsAfter |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflowRunsAt |
protected java.sql.PreparedStatement |
_psExecutionsForWorkflowRunsBefore |
protected java.sql.PreparedStatement |
_psHostIdForExecution |
protected java.sql.PreparedStatement |
_psInputRoleToken |
protected java.sql.PreparedStatement |
_psIsExecutionImported |
protected java.sql.PreparedStatement |
_psLastChangeTime |
protected java.sql.PreparedStatement |
_psLastChangeTimeForWorkflowId |
protected java.sql.PreparedStatement |
_psLastExecutionForWorkflow |
protected java.sql.PreparedStatement |
_psLastExecutionForWorkflowLSID |
protected java.sql.PreparedStatement |
_psLastExecutionLSIDForWorkflowLSID |
protected java.sql.PreparedStatement |
_psLastExecutionLSIDForWorkflowName |
protected java.sql.PreparedStatement |
_psLastExecutionStartTime |
protected java.sql.PreparedStatement |
_psLastExecutionStartTimeForWorkflowId |
protected java.sql.PreparedStatement |
_psMomlForExecutionId |
protected java.sql.PreparedStatement |
_psMomlForExecutionLSID |
protected java.sql.Statement |
_psMoMLMD5sForExecutions |
protected java.sql.PreparedStatement |
_psOutputRoleToken |
protected java.sql.PreparedStatement |
_psParamAndPortParamNameValuesForFiring |
protected java.sql.PreparedStatement |
_psParamNameValuesForExecution |
protected java.sql.PreparedStatement |
_psParamNameValuesForFiring |
protected java.sql.PreparedStatement |
_psParamNameValuesOfSpecificTypeForExecution |
protected java.sql.PreparedStatement |
_psParamValueAtTimeForWorkflowLSID |
protected java.sql.PreparedStatement |
_psPortEventData |
protected java.sql.PreparedStatement |
_psPortIOBytesRead |
protected java.sql.PreparedStatement |
_psPortIOBytesWrite |
protected java.sql.PreparedStatement |
_psPortsForActor |
protected java.sql.PreparedStatement |
_psTagsForExecutionId |
protected java.sql.PreparedStatement |
_psTagURNsForExecutionId |
protected java.sql.PreparedStatement |
_psTimestampForTokenWrite |
protected java.sql.PreparedStatement |
_psTimestampsForActorFiring |
protected java.sql.PreparedStatement |
_psTimestampsForExecution |
protected java.sql.PreparedStatement |
_psTimestampsForTokenRead |
protected java.sql.PreparedStatement |
_psTokensForExecution |
protected java.sql.PreparedStatement |
_psTokensForFiring |
protected java.sql.PreparedStatement |
_psTokensReadForFiring |
protected java.sql.PreparedStatement |
_psTokensWrittenForFiring |
protected java.sql.PreparedStatement |
_psTokenType |
protected java.sql.PreparedStatement |
_psTypeForTag |
protected java.sql.PreparedStatement |
_psUserForExecution |
protected java.sql.PreparedStatement |
_psUserForExecutionLSID |
protected java.sql.PreparedStatement |
_psWorkflowNameForExecutionLSID |
protected java.sql.PreparedStatement |
_psWorkflowNameForLSID |
protected java.sql.PreparedStatement |
_psWorkflowRunsForExecutionLSIDs |
protected java.sql.PreparedStatement |
_psWorkflowRunsForExecutions |
protected java.sql.PreparedStatement |
_psWorkflows |
| Modifier | Constructor and Description |
|---|---|
protected |
SQLQueryV8(DatabaseType dbType)
Construct a new SQLQueryV8 from a connected DatabaseType.
|
|
SQLQueryV8(java.util.Map<java.lang.String,java.lang.String> parameters)
Construct a new SQLQueryV8 and connect to a database.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_createPreparedStatements()
Initialize the prepared statements.
|
protected void |
_debug(java.lang.String str) |
protected java.util.List<java.lang.Integer> |
_getChangesForTimespan(java.util.Date start,
java.util.Date end,
java.lang.String workflow,
java.lang.String host)
Get changes performed on a host within a timespan.
|
protected java.util.List<java.lang.Integer> |
_getChangesSince(java.util.Date timeStamp,
java.lang.String workflowName,
java.lang.String hostName)
Get changes performed since a specific time.
|
protected java.util.List<java.lang.String> |
_getDataMD5s()
Get all the data MD5 checksums.
|
protected java.util.List<java.lang.Integer> |
_getEntitiesForChange(int changeId)
Get the entities for a workflow change.
|
protected java.lang.String |
_getEntityName(java.lang.String name)
Given a fully-qualified entity name, return the name as it would
appear in the entity table.
|
protected java.util.List<java.lang.Integer> |
_getExecutionsForTimespan(java.util.Date start,
java.util.Date end,
java.lang.String workflow,
java.lang.String host)
Get executions for a worfkflow run on a host within a timespan.
|
protected java.util.List<java.lang.Integer> |
_getExecutionsStartedSince(java.util.Date timeStamp,
boolean including,
java.lang.String workflowName,
java.lang.String hostName)
Get executions started since a specific time.
|
protected java.lang.String |
_getFullNameFromEntityName(java.lang.String entity,
java.lang.String full)
Given a name from the entity table, return the fully-qualified name.
|
protected java.util.List<java.lang.Integer> |
_getIntResults(java.sql.PreparedStatement query,
int index)
Convenience routine to get a list of integer SQL results.
|
protected java.util.Date |
_getLastChangeTime(int workflowId,
java.lang.String hostName)
Get the last change time for a workflow.
|
protected java.util.Date |
_getLastChangeTime(java.lang.String workflowName,
java.lang.String hostName)
Get the last change time for a workflow.
|
protected java.util.Date |
_getLastExecutionStartTime(int workflowId,
java.lang.String hostName)
Get the last execution start time.
|
protected java.util.Date |
_getLastExecutionStartTime(java.lang.String workflowName,
java.lang.String hostName)
Get the last execution start time.
|
protected static java.util.Map<java.lang.String,java.lang.String> |
_getParameterNameValues(java.sql.PreparedStatement statement)
A convenience method that executes a query returning parameter name
value pairs.
|
protected java.util.List<java.lang.String> |
_getStringResults(java.sql.PreparedStatement query,
int index)
Convenience routine to get a list of string SQL results.
|
protected java.util.List<java.lang.String> |
_getStringResults(java.sql.Statement statement,
java.lang.String queryStr,
int index)
Convenience routine to get a list of string SQL results.
|
protected int |
_getWorkflow(java.lang.String workflow)
Get the id for a workflow.
|
protected void |
_init()
Check the schema version and initialize the prepared statements.
|
protected void |
_nullPreparedStatements()
Set our prepared statements to null.
|
protected boolean |
_stringTokenValuesHaveSurroundingQuotes()
Returns true since SQLRecordingV8 saves StringToken values
using StringToken.toString(), which adds surrounding
double-quotes.
|
void |
disconnect()
Disconnect from provenance store.
|
java.util.List<java.lang.Integer> |
getActorFiringForToken(int tokenId,
boolean read)
Get the firing id(s) of the actor(s) that read or wrote a token.
|
java.util.List<java.lang.Integer> |
getActorFiringIds(java.lang.String actorName,
java.lang.Integer wfExecId)
Get actor fire ids based on its full name and workflow exec ID.
|
java.util.List<java.lang.Integer> |
getActorFirings(int wfExecId)
Get all actor fire ids for a workflow exec ID.
|
java.lang.String |
getActorName(int fireId)
Get an actor's name for a firing id.
|
java.lang.String |
getActorType(int fireId)
Get an actor's type for a firing id.
|
java.util.List<byte[]> |
getAssociatedDataForExecution(int execId,
java.util.Map<java.lang.String,java.lang.String> metadataMap,
boolean matchAny)
Get a file associated with an execution.
|
java.util.Map<java.lang.String,java.lang.String> |
getAssociatedKeysValuesForExecution(int execId)
Get any associated keys-values for an execution.
|
java.util.List<java.lang.Integer> |
getChangesForTimespan(java.util.Date start,
java.util.Date end)
Get changes within a timespan.
|
java.lang.Integer |
getChannelForToken(int tokenId,
boolean read,
java.lang.Integer fireId)
Get the channel that a token was read or written on.
|
java.lang.Integer |
getEntityId(java.lang.String entityName,
KeplerLSID lsid)
Get the id of entity.
|
java.lang.Integer |
getEntityId(java.lang.String entityName,
java.lang.String workflowName)
Get the id of entity.
|
java.lang.String |
getEntityType(java.lang.Integer entityId)
Get the type of entity.
|
java.lang.Integer |
getEntityWorkflowId(java.lang.Integer entityId)
Get the workflow id of entity.
|
java.lang.String |
getErrorForExecution(KeplerLSID lsid)
Get the error for an execution.
|
java.lang.Integer |
getExecutionForExecutionLSID(KeplerLSID execLSID)
Get the execution ids for a specific exec LSID.
|
java.lang.Integer |
getExecutionForExecutionLSIDWithoutRevision(java.lang.String execLSIDWithoutRevision)
Get execution id for an execution LSID without revision.
|
java.lang.Integer |
getExecutionForOldestReferralExecutionLSIDWithoutRevision(java.lang.String execLSIDWithoutRevision)
Get execution id for execution that has the given LSID as its
oldest referral.
|
java.util.List<java.lang.Integer> |
getExecutionIdsForTags(java.lang.String tagsSearchString)
Get a list of executions for workflow(s) with tags that contain tagsSearchString
(case insensitive)
|
KeplerLSID |
getExecutionLSIDForExecution(java.lang.Integer execId)
Get the execution LSID for a specific execution id.
|
java.util.List<KeplerLSID> |
getExecutionLSIDs()
Get a list of all execution LSIDs.
|
java.util.List<KeplerLSID> |
getExecutionLSIDsForWorkflowRuns(java.lang.String workflowName,
java.lang.String userName,
java.util.Date after,
java.util.Date before,
int execIdAfter,
int execIdBefore)
Get a list of executions for workflow(s) that match Workflow Run Manager (WRM) search criteria.
|
java.util.List<java.lang.Integer> |
getExecutions()
Get a list of all executions.
|
java.util.List<java.lang.Integer> |
getExecutionsForAnnotation(java.lang.String annotation)
Get a list of executions for a specific execution annotation.
|
java.util.List<java.lang.Integer> |
getExecutionsForTimespan(java.util.Date start,
java.util.Date end)
Get executions within a timespan.
|
java.util.List<KeplerLSID> |
getExecutionsForType(WorkflowRun.type type)
Get a list of executions corresponding to a specific type.
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflow(java.lang.String workflow)
Get a list of executions for a specific workflow.
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflowNameContains(java.lang.String text)
Get a list of executions for workflow(s) with names that contain text (case insensitive).
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflowRuns(java.lang.String workflowName,
java.lang.String userName)
Get a list of executions for workflow(s) that match Workflow Run Manager (WRM) search criteria.
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflowRuns(java.lang.String workflowName,
java.lang.String userName,
java.util.Date after,
java.util.Date before,
int execIdAfter,
int execIdBefore)
Get a list of executions for workflow(s) that match Workflow Run Manager (WRM) search criteria.
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflowRunsAfter(java.lang.String workflowName,
java.lang.String userName,
java.util.Date after)
Get a list of executions for workflow(s) that match Workflow Run Manager (WRM) search criteria
after a date.
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflowRunsAt(java.lang.String workflowName,
java.lang.String userName,
java.lang.String date)
Get a list of executions for workflow(s) that match Workflow Run Manager (WRM) search criteria
"at" a date.
|
java.util.List<java.lang.Integer> |
getExecutionsForWorkflowRunsBefore(java.lang.String workflowName,
java.lang.String userName,
java.util.Date before)
Get a list of executions for workflow(s) that match Workflow Run Manager (WRM) search criteria
before a date.
|
java.util.Map<java.lang.String,java.lang.Long> |
getExecutionTimesForActor(KeplerLSID workflow,
KeplerLSID execLSID,
java.lang.String actor)
Get the execution times for an actor.
|
java.lang.String |
getHostIdForExecution(java.lang.Integer execId)
Get the host id for a specific execution id.
|
java.util.List<java.lang.Integer> |
getImmediateDependencies(int tokenId)
Get the immediate tokens that generated a token.
|
java.lang.String |
getInputRoleForTokenAndFireId(int tokenId,
int fireId)
Get the input role (port name) of a token.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getIOBytesForPort(KeplerLSID workflow,
java.lang.Integer execId,
java.lang.String port,
boolean read)
Get the number of bytes read or written by a port.
|
java.lang.Integer |
getLastExecutionForWorkflow(KeplerLSID lsid)
Get the last execution for a workflow.
|
java.lang.Integer |
getLastExecutionForWorkflow(java.lang.String workflow)
Get the last execution for a workflow.
|
KeplerLSID |
getLastExecutionLSIDForWorkflow(KeplerLSID lsid)
Get the last execution LSID for a workflow.
|
KeplerLSID |
getLastExecutionLSIDForWorkflow(java.lang.String workflow)
Get the last execution LSID for a workflow.
|
java.lang.String |
getMoMLForExecution(int execId)
Get workflow MoML for an execution, using execution id
|
java.lang.String |
getMoMLForExecution(KeplerLSID lsid)
Get workflow MoML for an execution, using execution lsid.
|
java.util.ArrayList<java.lang.String> |
getMoMLForExecutionLSIDs(java.util.List<KeplerLSID> lsids)
Get workflow MoMLs for a list of execution lsids.
|
java.lang.String |
getOutputRoleToken(int tokenId)
Get the output role (port name) of a token.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameterAndPortParameterNameValuesForFiring(int fireId)
Get an actor's parameter and port parameter name value pairs for a firing id.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameterNameValuesForExecution(int execId)
Get the parameter name value pairs for an execution.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameterNameValuesForFiring(int fireId)
Get an actor's parameter name value pairs for a firing id.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameterNameValuesOfSpecificTypeForExecution(int execId)
Get the parameter name value pairs for an execution, whose parameter type is
either '.Parameter' or '.StringParameter'
|
java.lang.String |
getParameterValueAtTime(java.util.Date timestamp,
java.lang.String parameter,
KeplerLSID lsid)
Get the value of a parameter at a specific time.
|
java.lang.String |
getParameterValueLatest(java.lang.String parameter,
KeplerLSID lsid)
Get the latest value of a parameter.
|
java.util.List<java.lang.String> |
getPortsForActor(KeplerLSID workflow,
java.lang.String actor)
Get the ports for an actor.
|
java.util.List<java.lang.String> |
getSavedFilenames()
Get a list of files saved in the database.
|
java.util.Map<NamedOntClass,java.lang.String> |
getTagClassesForExecutionId(int execId)
Get a map of tags and their types (context, or tagee, currently "run"
or "workflow") for an executionLSID
|
java.util.List<java.lang.String> |
getTagsForExecutionId(int execId)
Get tags for an execution LSID
|
java.util.List<java.lang.String> |
getTagURNsForExecutionLSID(KeplerLSID execLSID) |
java.util.Date |
getTimestampForTokenWrite(java.lang.Integer tokenId)
Get the timestamp when a token was written.
|
java.util.Date[] |
getTimestampsForActorFiring(int fireId)
Get the start and end timestamps of an actor firing.
|
java.util.Date[] |
getTimestampsForExecution(int execId)
Get the start and end timestamps of an execution.
|
java.util.Date[] |
getTimestampsForTokenRead(java.lang.Integer tokenId)
Get the timestamp(s) when a token was read.
|
java.util.List<java.lang.Integer> |
getTokensForExecution(int execId,
java.lang.Integer portId,
boolean last)
Get an sequence of tokens for an execution.
|
java.util.List<java.lang.Integer> |
getTokensForFiring(int fireId,
boolean read)
Get tokens for a firing.
|
java.lang.String |
getTokenType(int tokenId)
Get the type of a token.
|
java.lang.String |
getTokenValue(int tokenId)
Get the value of a token.
|
java.lang.String |
getTypeForTag(java.lang.String conceptId)
Get the type of a tag, null if none
|
java.lang.String |
getUserForExecution(java.lang.Integer execId)
Get the user for a specific execution id.
|
java.lang.String |
getUserForExecution(KeplerLSID execLSID)
Get the user for a specific execution LSID.
|
java.lang.String |
getWorkflowName(KeplerLSID lsid)
Get a workflow name.
|
java.lang.String |
getWorkflowNameForExecution(KeplerLSID lsid)
Get a workflow name for an execution LSID.
|
java.util.Map<KeplerLSID,WorkflowRun> |
getWorkflowRunsForExecutionLSIDs(java.util.List<KeplerLSID> executionLSIDs)
Get WorkflowRuns for a list of execution LSIDs
|
java.util.List<WorkflowRun> |
getWorkflowRunsForUser(java.lang.String user)
Get workflow runs for a user.
|
java.util.List<java.lang.String> |
getWorkflows()
Get a list of workflow names.
|
boolean |
isErrorForExecution(KeplerLSID executionLSID)
Returns true if the execution had an error.
|
boolean |
isImportedExecution(KeplerLSID executionLSID)
See if an execution appears to be imported.
|
_getLastExecutionId, close, getToken, getTokensForExecution, getTotalExecutionTimeForActor, getTotalIOBytesForActor, getWorkflowForExecutionprotected DatabaseType _dbType
protected java.sql.PreparedStatement _psActorFiringForTokenWrite
protected java.sql.PreparedStatement _psActorFiringsForExecution
protected java.sql.PreparedStatement _psActorFiringsForTokenRead
protected java.sql.PreparedStatement _psActorFireId
protected java.sql.PreparedStatement _psActorFirings
protected java.sql.PreparedStatement _psActorNameForFiring
protected java.sql.PreparedStatement _psActorTypeForFiring
protected java.sql.PreparedStatement _psChannelForTokenRead
protected java.sql.PreparedStatement _psChannelForTokenWrite
protected java.sql.PreparedStatement _psChangesForTimespan
protected java.sql.PreparedStatement _psChangesForTimespanOnHost
protected java.sql.PreparedStatement _psDataMD5s
protected java.sql.PreparedStatement _psDoesExecutionHaveError
protected java.sql.PreparedStatement _psEntitiesForChange
protected java.sql.PreparedStatement _psEntityId
protected java.sql.PreparedStatement _psEntityWorkflowId
protected java.sql.PreparedStatement _psEntityIdLSID
protected java.sql.PreparedStatement _psEntityTokensForExecution
protected java.sql.PreparedStatement _psEntityType
protected java.sql.PreparedStatement _psErrorForExecution
protected java.sql.PreparedStatement _psExecutions
protected java.sql.PreparedStatement _psExecutionsForAnnotation
protected java.sql.PreparedStatement _psExecutionsForTimespan
protected java.sql.PreparedStatement _psExecutionsForTimespanOnHost
protected java.sql.PreparedStatement _psExecutionsForType
protected java.sql.PreparedStatement _psExecutionsForWorkflow
protected java.sql.PreparedStatement _psExecutionForExecutionLSID
protected java.sql.PreparedStatement _psExecutionForExecutionLSIDWithoutRevision
protected java.sql.PreparedStatement _psExecutionForOldestReferralExecutionLSIDWithoutRevision
protected java.sql.PreparedStatement _psExecutionLSIDForExecution
protected java.sql.PreparedStatement _psExecutionsForWorkflowNameContains
protected java.sql.PreparedStatement _psExecutionsForWorkflowRuns
protected java.sql.PreparedStatement _psExecutionsForWorkflowRunsAfter
protected java.sql.PreparedStatement _psExecutionsForWorkflowRunsAt
protected java.sql.PreparedStatement _psExecutionsForWorkflowRunsBefore
protected java.sql.PreparedStatement _psExecutionsForWorkflowRuns2
protected java.sql.PreparedStatement _psExecutionLSIDsForWorkflowRuns
protected java.sql.PreparedStatement _psExecutionIdsForTags
protected java.sql.PreparedStatement _psExecutionLSIDs
protected java.sql.PreparedStatement _psIsExecutionImported
protected java.sql.PreparedStatement _psTagsForExecutionId
protected java.sql.PreparedStatement _psTagURNsForExecutionId
protected java.sql.PreparedStatement _psTypeForTag
protected java.sql.PreparedStatement _psLastChangeTime
protected java.sql.PreparedStatement _psLastChangeTimeForWorkflowId
protected java.sql.PreparedStatement _psLastExecutionForWorkflow
protected java.sql.PreparedStatement _psLastExecutionForWorkflowLSID
protected java.sql.PreparedStatement _psLastExecutionLSIDForWorkflowName
protected java.sql.PreparedStatement _psLastExecutionLSIDForWorkflowLSID
protected java.sql.PreparedStatement _psLastExecutionStartTime
protected java.sql.PreparedStatement _psLastExecutionStartTimeForWorkflowId
protected java.sql.PreparedStatement _psMomlForExecutionId
protected java.sql.PreparedStatement _psMomlForExecutionLSID
protected java.sql.PreparedStatement _psParamNameValuesForExecution
protected java.sql.PreparedStatement _psParamNameValuesForFiring
protected java.sql.PreparedStatement _psParamValueAtTimeForWorkflowLSID
protected java.sql.PreparedStatement _psTimestampsForExecution
protected java.sql.PreparedStatement _psTimestampForTokenWrite
protected java.sql.PreparedStatement _psTimestampsForTokenRead
protected java.sql.PreparedStatement _psTokenType
protected java.sql.PreparedStatement _psPortEventData
protected java.sql.PreparedStatement _psDataContents
protected java.sql.PreparedStatement _psTokensForExecution
protected java.sql.PreparedStatement _psTokensForFiring
protected java.sql.PreparedStatement _psTokensReadForFiring
protected java.sql.PreparedStatement _psTokensWrittenForFiring
protected java.sql.PreparedStatement _psWorkflowRunsForExecutions
protected java.sql.PreparedStatement _psWorkflowRunsForExecutionLSIDs
protected java.sql.PreparedStatement _psWorkflows
protected java.sql.PreparedStatement _psWorkflowNameForLSID
protected java.sql.PreparedStatement _psWorkflowNameForExecutionLSID
protected java.sql.Statement _psMoMLMD5sForExecutions
protected java.sql.PreparedStatement _psPortsForActor
protected java.sql.PreparedStatement _psHostIdForExecution
protected java.sql.PreparedStatement _psUserForExecution
protected java.sql.PreparedStatement _psUserForExecutionLSID
protected java.sql.PreparedStatement _psOutputRoleToken
protected java.sql.PreparedStatement _psInputRoleToken
protected java.sql.PreparedStatement _psParamNameValuesOfSpecificTypeForExecution
protected java.sql.PreparedStatement _psTimestampsForActorFiring
protected java.sql.PreparedStatement _psParamAndPortParamNameValuesForFiring
protected java.sql.PreparedStatement _psActorExecutionTimes
protected java.sql.PreparedStatement _psPortIOBytesRead
protected java.sql.PreparedStatement _psPortIOBytesWrite
protected java.sql.PreparedStatement _psAssociatedKeysValuesForExecution
protected static final java.sql.Timestamp _maxEndTime
protected static final java.sql.Timestamp _minStartTime
public SQLQueryV8(java.util.Map<java.lang.String,java.lang.String> parameters) throws QueryException
QueryExceptionprotected SQLQueryV8(DatabaseType dbType) throws QueryException
QueryExceptionpublic void disconnect() throws QueryException
disconnect in interface Queryabledisconnect in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.String> getWorkflows() throws QueryException
getWorkflows in interface QueryablegetWorkflows in class DefaultQueryQueryExceptionpublic java.lang.String getWorkflowName(KeplerLSID lsid) throws QueryException
getWorkflowName in interface QueryablegetWorkflowName in class DefaultQuerylsid - the workflow's LSID.QueryExceptionpublic java.lang.String getWorkflowNameForExecution(KeplerLSID lsid) throws QueryException
getWorkflowNameForExecution in interface QueryablegetWorkflowNameForExecution in class DefaultQuerylsid - the execution LSID.QueryExceptionpublic java.util.List<java.lang.Integer> getChangesForTimespan(java.util.Date start, java.util.Date end) throws QueryException
QueryExceptionpublic java.util.List<java.lang.Integer> getExecutions() throws QueryException
getExecutions in interface QueryablegetExecutions in class DefaultQueryQueryExceptionpublic java.util.List<KeplerLSID> getExecutionLSIDs() throws QueryException
getExecutionLSIDs in interface QueryablegetExecutionLSIDs in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionIdsForTags(java.lang.String tagsSearchString) throws QueryException
getExecutionIdsForTags in interface QueryablegetExecutionIdsForTags in class DefaultQueryQueryExceptionpublic java.util.Map<NamedOntClass,java.lang.String> getTagClassesForExecutionId(int execId) throws QueryException
QueryablegetTagClassesForExecutionId in interface QueryablegetTagClassesForExecutionId in class DefaultQueryQueryExceptionpublic java.lang.String getTypeForTag(java.lang.String conceptId)
getTypeForTag in interface QueryablegetTypeForTag in class DefaultQuerypublic java.util.List<java.lang.String> getTagsForExecutionId(int execId) throws QueryException
QueryablegetTagsForExecutionId in interface QueryablegetTagsForExecutionId in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.String> getTagURNsForExecutionLSID(KeplerLSID execLSID) throws QueryException
QueryExceptionpublic java.lang.String getMoMLForExecution(int execId) throws QueryException
getMoMLForExecution in interface QueryablegetMoMLForExecution in class DefaultQueryQueryExceptionpublic java.lang.String getMoMLForExecution(KeplerLSID lsid) throws QueryException
getMoMLForExecution in interface QueryablegetMoMLForExecution in class DefaultQueryQueryExceptionpublic java.util.ArrayList<java.lang.String> getMoMLForExecutionLSIDs(java.util.List<KeplerLSID> lsids)
getMoMLForExecutionLSIDs in interface QueryablegetMoMLForExecutionLSIDs in class DefaultQuerypublic java.util.List<java.lang.Integer> getExecutionsForTimespan(java.util.Date start, java.util.Date end) throws QueryException
getExecutionsForTimespan in interface QueryablegetExecutionsForTimespan in class DefaultQueryQueryExceptionpublic java.util.Map<KeplerLSID,WorkflowRun> getWorkflowRunsForExecutionLSIDs(java.util.List<KeplerLSID> executionLSIDs) throws QueryException
getWorkflowRunsForExecutionLSIDs in interface QueryablegetWorkflowRunsForExecutionLSIDs in class DefaultQueryQueryExceptionpublic java.util.List<WorkflowRun> getWorkflowRunsForUser(java.lang.String user) throws QueryException
DefaultQuerygetWorkflowRunsForUser in interface QueryablegetWorkflowRunsForUser in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflow(java.lang.String workflow) throws QueryException
getExecutionsForWorkflow in interface QueryablegetExecutionsForWorkflow in class DefaultQueryQueryExceptionpublic java.lang.Integer getExecutionForExecutionLSID(KeplerLSID execLSID) throws QueryException
getExecutionForExecutionLSID in interface QueryablegetExecutionForExecutionLSID in class DefaultQueryQueryExceptionpublic java.lang.Integer getExecutionForExecutionLSIDWithoutRevision(java.lang.String execLSIDWithoutRevision) throws QueryException
getExecutionForExecutionLSIDWithoutRevision in interface QueryablegetExecutionForExecutionLSIDWithoutRevision in class DefaultQueryQueryExceptionpublic java.lang.Integer getExecutionForOldestReferralExecutionLSIDWithoutRevision(java.lang.String execLSIDWithoutRevision) throws QueryException
getExecutionForOldestReferralExecutionLSIDWithoutRevision in interface QueryablegetExecutionForOldestReferralExecutionLSIDWithoutRevision in class DefaultQueryQueryExceptionpublic KeplerLSID getExecutionLSIDForExecution(java.lang.Integer execId) throws QueryException
getExecutionLSIDForExecution in interface QueryablegetExecutionLSIDForExecution in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflowNameContains(java.lang.String text) throws QueryException
QueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflowRuns(java.lang.String workflowName, java.lang.String userName) throws QueryException
getExecutionsForWorkflowRuns in interface QueryablegetExecutionsForWorkflowRuns in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflowRuns(java.lang.String workflowName, java.lang.String userName, java.util.Date after, java.util.Date before, int execIdAfter, int execIdBefore) throws QueryException
getExecutionsForWorkflowRuns in interface QueryablegetExecutionsForWorkflowRuns in class DefaultQueryQueryExceptionpublic java.util.List<KeplerLSID> getExecutionLSIDsForWorkflowRuns(java.lang.String workflowName, java.lang.String userName, java.util.Date after, java.util.Date before, int execIdAfter, int execIdBefore) throws QueryException
getExecutionLSIDsForWorkflowRuns in interface QueryablegetExecutionLSIDsForWorkflowRuns in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflowRunsBefore(java.lang.String workflowName, java.lang.String userName, java.util.Date before) throws QueryException
getExecutionsForWorkflowRunsBefore in interface QueryablegetExecutionsForWorkflowRunsBefore in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflowRunsAfter(java.lang.String workflowName, java.lang.String userName, java.util.Date after) throws QueryException
getExecutionsForWorkflowRunsAfter in interface QueryablegetExecutionsForWorkflowRunsAfter in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForWorkflowRunsAt(java.lang.String workflowName, java.lang.String userName, java.lang.String date) throws QueryException
QueryExceptionpublic java.util.List<java.lang.Integer> getExecutionsForAnnotation(java.lang.String annotation) throws QueryException
getExecutionsForAnnotation in interface QueryablegetExecutionsForAnnotation in class DefaultQueryQueryExceptionpublic java.util.Date[] getTimestampsForExecution(int execId) throws QueryException
getTimestampsForExecution in interface QueryablegetTimestampsForExecution in class DefaultQueryexecId - the execution idQueryExceptionpublic java.lang.Integer getLastExecutionForWorkflow(KeplerLSID lsid) throws QueryException
getLastExecutionForWorkflow in interface QueryablegetLastExecutionForWorkflow in class DefaultQuerylsid - the workflow lsid.QueryExceptionpublic java.lang.Integer getLastExecutionForWorkflow(java.lang.String workflow) throws QueryException
getLastExecutionForWorkflow in interface QueryablegetLastExecutionForWorkflow in class DefaultQueryworkflow - the workflow nameQueryExceptionpublic KeplerLSID getLastExecutionLSIDForWorkflow(java.lang.String workflow) throws QueryException
getLastExecutionLSIDForWorkflow in interface QueryablegetLastExecutionLSIDForWorkflow in class DefaultQueryworkflow - the workflow name.QueryExceptionpublic KeplerLSID getLastExecutionLSIDForWorkflow(KeplerLSID lsid) throws QueryException
getLastExecutionLSIDForWorkflow in interface QueryablegetLastExecutionLSIDForWorkflow in class DefaultQuerylsid - the workflow lsid.QueryExceptionpublic java.lang.String getErrorForExecution(KeplerLSID lsid) throws QueryException
getErrorForExecution in interface QueryablegetErrorForExecution in class DefaultQuerylsid - the workflow execution lsid.QueryExceptionisErrorForExecutionpublic boolean isErrorForExecution(KeplerLSID executionLSID) throws QueryException
isErrorForExecution in interface QueryableisErrorForExecution in class DefaultQueryQueryExceptionpublic boolean isImportedExecution(KeplerLSID executionLSID) throws QueryException
isImportedExecution in interface QueryableisImportedExecution in class DefaultQueryQueryExceptionpublic java.util.List<KeplerLSID> getExecutionsForType(WorkflowRun.type type) throws QueryException
getExecutionsForType in interface QueryablegetExecutionsForType in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getTokensForExecution(int execId, java.lang.Integer portId, boolean last) throws QueryException
getTokensForExecution in interface QueryablegetTokensForExecution in class DefaultQueryexecId - the execution idportId - the port id. If null, returns the ids of
tokens read in entire execution.last - if true, the sequence starts at the last token created
and goes backwards to the first; otherwise the sequence starts at
the first.QueryExceptionpublic java.util.List<java.lang.Integer> getActorFiringForToken(int tokenId, boolean read) throws QueryException
getActorFiringForToken in interface QueryablegetActorFiringForToken in class DefaultQuerytokenId - the token idread - If true, return the actor(s) firing id(s) that read
the token. Otherwise, return the actor firing that wrote the token.QueryExceptionpublic java.util.List<java.lang.Integer> getTokensForFiring(int fireId, boolean read) throws QueryException
getTokensForFiring in interface QueryablegetTokensForFiring in class DefaultQueryfireId - the firing idread - if true, get the tokens read; otherwise get the tokens
written.QueryExceptionpublic java.lang.String getTokenValue(int tokenId) throws QueryException
getTokenValue in interface QueryablegetTokenValue in class DefaultQueryQueryExceptionpublic java.lang.String getTokenType(int tokenId) throws QueryException
getTokenType in interface QueryablegetTokenType in class DefaultQueryQueryExceptionpublic java.lang.Integer getChannelForToken(int tokenId, boolean read, java.lang.Integer fireId) throws QueryException
getChannelForToken in interface QueryablegetChannelForToken in class DefaultQuerytokenId - the token idread - if true, return the channel the token was read on.
otherwise, return the channel the token was written on.fireId - the actor firing id. can be null for writes, but
must be specified for reads.QueryExceptionpublic java.lang.Integer getEntityId(java.lang.String entityName, KeplerLSID lsid) throws QueryException
getEntityId in interface QueryablegetEntityId in class DefaultQueryentityName - name of entity.lsid - the workflow LSID. NOTE: the revision is ignored.QueryExceptionpublic java.lang.Integer getEntityId(java.lang.String entityName, java.lang.String workflowName) throws QueryException
getEntityId in interface QueryablegetEntityId in class DefaultQueryentityName - the name of the entity.workflowName - the name of the workflow.QueryExceptionpublic java.lang.String getEntityType(java.lang.Integer entityId) throws QueryException
QueryablegetEntityType in interface QueryablegetEntityType in class DefaultQueryQueryExceptionpublic java.lang.Integer getEntityWorkflowId(java.lang.Integer entityId) throws QueryException
QueryablegetEntityWorkflowId in interface QueryablegetEntityWorkflowId in class DefaultQueryQueryExceptionpublic java.lang.String getActorName(int fireId) throws QueryException
getActorName in interface QueryablegetActorName in class DefaultQueryQueryExceptionpublic java.lang.String getActorType(int fireId) throws QueryException
getActorType in interface QueryablegetActorType in class DefaultQueryQueryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getParameterNameValuesForFiring(int fireId) throws QueryException
getParameterNameValuesForFiring in interface QueryablegetParameterNameValuesForFiring in class DefaultQueryQueryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getParameterNameValuesForExecution(int execId) throws QueryException
getParameterNameValuesForExecution in interface QueryablegetParameterNameValuesForExecution in class DefaultQueryQueryExceptionpublic java.lang.String getParameterValueLatest(java.lang.String parameter, KeplerLSID lsid) throws QueryException
getParameterValueLatest in interface QueryablegetParameterValueLatest in class DefaultQueryparameter - the parameter name.lsid - the workflow lsidQueryExceptionpublic java.lang.String getParameterValueAtTime(java.util.Date timestamp, java.lang.String parameter, KeplerLSID lsid) throws QueryException
getParameterValueAtTime in interface QueryablegetParameterValueAtTime in class DefaultQuerytimestamp - the timeparameter - the parameter namelsid - the workflow lsidQueryExceptionprotected java.lang.String _getEntityName(java.lang.String name)
protected java.lang.String _getFullNameFromEntityName(java.lang.String entity, java.lang.String full)
public java.util.List<java.lang.Integer> getImmediateDependencies(int tokenId) throws QueryException
getImmediateDependencies in interface QueryablegetImmediateDependencies in class DefaultQueryQueryExceptionpublic java.util.List<byte[]> getAssociatedDataForExecution(int execId, java.util.Map<java.lang.String,java.lang.String> metadataMap, boolean matchAny) throws QueryException
getAssociatedDataForExecution in interface QueryablegetAssociatedDataForExecution in class DefaultQueryQueryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getAssociatedKeysValuesForExecution(int execId) throws QueryException
getAssociatedKeysValuesForExecution in interface QueryablegetAssociatedKeysValuesForExecution in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.String> getSavedFilenames() throws QueryException
QueryExceptionpublic java.util.List<java.lang.String> getPortsForActor(KeplerLSID workflow, java.lang.String actor) throws QueryException
getPortsForActor in interface QueryablegetPortsForActor in class DefaultQueryworkflow - the LSID of the workflowactor - the fully-qualified name of the actorQueryExceptionpublic java.lang.String getHostIdForExecution(java.lang.Integer execId) throws QueryException
getHostIdForExecution in interface QueryablegetHostIdForExecution in class DefaultQueryQueryExceptionpublic java.lang.String getUserForExecution(KeplerLSID execLSID) throws QueryException
getUserForExecution in interface QueryablegetUserForExecution in class DefaultQueryQueryExceptionpublic java.lang.String getUserForExecution(java.lang.Integer execId) throws QueryException
getUserForExecution in interface QueryablegetUserForExecution in class DefaultQueryQueryExceptionpublic java.lang.String getOutputRoleToken(int tokenId) throws QueryException
getOutputRoleToken in interface QueryablegetOutputRoleToken in class DefaultQueryQueryExceptionpublic java.lang.String getInputRoleForTokenAndFireId(int tokenId, int fireId) throws QueryException
getInputRoleForTokenAndFireId in interface QueryablegetInputRoleForTokenAndFireId in class DefaultQueryQueryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getParameterNameValuesOfSpecificTypeForExecution(int execId) throws QueryException
getParameterNameValuesOfSpecificTypeForExecution in interface QueryablegetParameterNameValuesOfSpecificTypeForExecution in class DefaultQueryQueryExceptionpublic java.util.Date[] getTimestampsForActorFiring(int fireId) throws QueryException
getTimestampsForActorFiring in interface QueryablegetTimestampsForActorFiring in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getActorFiringIds(java.lang.String actorName, java.lang.Integer wfExecId) throws QueryException
getActorFiringIds in interface QueryablegetActorFiringIds in class DefaultQueryQueryExceptionpublic java.util.Map<java.lang.String,java.lang.String> getParameterAndPortParameterNameValuesForFiring(int fireId) throws QueryException
getParameterAndPortParameterNameValuesForFiring in interface QueryablegetParameterAndPortParameterNameValuesForFiring in class DefaultQueryQueryExceptionpublic java.util.List<java.lang.Integer> getActorFirings(int wfExecId) throws QueryException
getActorFirings in interface QueryablegetActorFirings in class DefaultQueryQueryExceptionpublic java.util.Map<java.lang.String,java.lang.Long> getExecutionTimesForActor(KeplerLSID workflow, KeplerLSID execLSID, java.lang.String actor) throws QueryException
getExecutionTimesForActor in interface QueryablegetExecutionTimesForActor in class DefaultQueryworkflow - the workflow LSID. If null, must specify execution id.execLSID - the execution LSID. If null, the last execution of the workflow
is used.actor - the full actor name.QueryExceptionpublic java.util.Map<java.lang.Integer,java.lang.Integer> getIOBytesForPort(KeplerLSID workflow, java.lang.Integer execId, java.lang.String port, boolean read) throws QueryException
getIOBytesForPort in interface QueryablegetIOBytesForPort in class DefaultQueryworkflow - the workflow LSID. If null, must specify execution id.execId - the execution id. If null, the last execution of the workflow
is used.port - the full port name.read - If true, get the bytes read. Otherwise, get the bytes written.QueryExceptionpublic java.util.Date[] getTimestampsForTokenRead(java.lang.Integer tokenId) throws QueryException
getTimestampsForTokenRead in interface QueryablegetTimestampsForTokenRead in class DefaultQueryQueryExceptionpublic java.util.Date getTimestampForTokenWrite(java.lang.Integer tokenId) throws QueryException
getTimestampForTokenWrite in interface QueryablegetTimestampForTokenWrite in class DefaultQueryQueryExceptionprotected void _init() throws QueryException
QueryExceptionprotected void _createPreparedStatements() throws java.sql.SQLException
java.sql.SQLExceptionprotected java.util.List<java.lang.Integer> _getEntitiesForChange(int changeId) throws QueryException
QueryExceptionprotected java.util.Date _getLastChangeTime(java.lang.String workflowName, java.lang.String hostName) throws QueryException
QueryExceptionprotected java.util.Date _getLastChangeTime(int workflowId, java.lang.String hostName) throws QueryException
QueryExceptionprotected java.util.List<java.lang.Integer> _getChangesSince(java.util.Date timeStamp, java.lang.String workflowName, java.lang.String hostName) throws QueryException
QueryExceptionprotected java.util.List<java.lang.Integer> _getChangesForTimespan(java.util.Date start, java.util.Date end, java.lang.String workflow, java.lang.String host) throws QueryException
QueryExceptionprotected java.util.Date _getLastExecutionStartTime(java.lang.String workflowName, java.lang.String hostName) throws QueryException
QueryExceptionprotected java.util.Date _getLastExecutionStartTime(int workflowId, java.lang.String hostName) throws QueryException
QueryExceptionprotected java.util.List<java.lang.Integer> _getExecutionsStartedSince(java.util.Date timeStamp, boolean including, java.lang.String workflowName, java.lang.String hostName) throws QueryException
timeStamp - get executions started after this time.including - if true, include executions starting at timeStamp.
if false, do not include executions starting at timeStamp.workflowName - get executions for a specific workflow.hostName - get executions for a specific host.QueryExceptionprotected java.util.List<java.lang.Integer> _getExecutionsForTimespan(java.util.Date start, java.util.Date end, java.lang.String workflow, java.lang.String host) throws QueryException
QueryExceptionprotected int _getWorkflow(java.lang.String workflow) throws QueryException
QueryExceptionprotected java.util.List<java.lang.String> _getDataMD5s() throws QueryException
QueryExceptionprotected java.util.List<java.lang.Integer> _getIntResults(java.sql.PreparedStatement query, int index) throws java.sql.SQLException
query - the query to executeindex - column number of resultjava.sql.SQLExceptionprotected static java.util.Map<java.lang.String,java.lang.String> _getParameterNameValues(java.sql.PreparedStatement statement) throws QueryException, java.sql.SQLException
QueryExceptionjava.sql.SQLExceptionprotected java.util.List<java.lang.String> _getStringResults(java.sql.PreparedStatement query, int index) throws java.sql.SQLException
query - the query to executeindex - column number of resultjava.sql.SQLExceptionprotected java.util.List<java.lang.String> _getStringResults(java.sql.Statement statement, java.lang.String queryStr, int index) throws java.sql.SQLException
statement - statement to executequeryStr - the query string to executeindex - column number of resultjava.sql.SQLExceptionprotected void _nullPreparedStatements()
protected void _debug(java.lang.String str)
protected boolean _stringTokenValuesHaveSurroundingQuotes()
_stringTokenValuesHaveSurroundingQuotes in class DefaultQuery