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, getWorkflowForExecution
protected 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
QueryException
protected SQLQueryV8(DatabaseType dbType) throws QueryException
QueryException
public void disconnect() throws QueryException
disconnect
in interface Queryable
disconnect
in class DefaultQuery
QueryException
public java.util.List<java.lang.String> getWorkflows() throws QueryException
getWorkflows
in interface Queryable
getWorkflows
in class DefaultQuery
QueryException
public java.lang.String getWorkflowName(KeplerLSID lsid) throws QueryException
getWorkflowName
in interface Queryable
getWorkflowName
in class DefaultQuery
lsid
- the workflow's LSID.QueryException
public java.lang.String getWorkflowNameForExecution(KeplerLSID lsid) throws QueryException
getWorkflowNameForExecution
in interface Queryable
getWorkflowNameForExecution
in class DefaultQuery
lsid
- the execution LSID.QueryException
public java.util.List<java.lang.Integer> getChangesForTimespan(java.util.Date start, java.util.Date end) throws QueryException
QueryException
public java.util.List<java.lang.Integer> getExecutions() throws QueryException
getExecutions
in interface Queryable
getExecutions
in class DefaultQuery
QueryException
public java.util.List<KeplerLSID> getExecutionLSIDs() throws QueryException
getExecutionLSIDs
in interface Queryable
getExecutionLSIDs
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutionIdsForTags(java.lang.String tagsSearchString) throws QueryException
getExecutionIdsForTags
in interface Queryable
getExecutionIdsForTags
in class DefaultQuery
QueryException
public java.util.Map<NamedOntClass,java.lang.String> getTagClassesForExecutionId(int execId) throws QueryException
Queryable
getTagClassesForExecutionId
in interface Queryable
getTagClassesForExecutionId
in class DefaultQuery
QueryException
public java.lang.String getTypeForTag(java.lang.String conceptId)
getTypeForTag
in interface Queryable
getTypeForTag
in class DefaultQuery
public java.util.List<java.lang.String> getTagsForExecutionId(int execId) throws QueryException
Queryable
getTagsForExecutionId
in interface Queryable
getTagsForExecutionId
in class DefaultQuery
QueryException
public java.util.List<java.lang.String> getTagURNsForExecutionLSID(KeplerLSID execLSID) throws QueryException
QueryException
public java.lang.String getMoMLForExecution(int execId) throws QueryException
getMoMLForExecution
in interface Queryable
getMoMLForExecution
in class DefaultQuery
QueryException
public java.lang.String getMoMLForExecution(KeplerLSID lsid) throws QueryException
getMoMLForExecution
in interface Queryable
getMoMLForExecution
in class DefaultQuery
QueryException
public java.util.ArrayList<java.lang.String> getMoMLForExecutionLSIDs(java.util.List<KeplerLSID> lsids)
getMoMLForExecutionLSIDs
in interface Queryable
getMoMLForExecutionLSIDs
in class DefaultQuery
public java.util.List<java.lang.Integer> getExecutionsForTimespan(java.util.Date start, java.util.Date end) throws QueryException
getExecutionsForTimespan
in interface Queryable
getExecutionsForTimespan
in class DefaultQuery
QueryException
public java.util.Map<KeplerLSID,WorkflowRun> getWorkflowRunsForExecutionLSIDs(java.util.List<KeplerLSID> executionLSIDs) throws QueryException
getWorkflowRunsForExecutionLSIDs
in interface Queryable
getWorkflowRunsForExecutionLSIDs
in class DefaultQuery
QueryException
public java.util.List<WorkflowRun> getWorkflowRunsForUser(java.lang.String user) throws QueryException
DefaultQuery
getWorkflowRunsForUser
in interface Queryable
getWorkflowRunsForUser
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutionsForWorkflow(java.lang.String workflow) throws QueryException
getExecutionsForWorkflow
in interface Queryable
getExecutionsForWorkflow
in class DefaultQuery
QueryException
public java.lang.Integer getExecutionForExecutionLSID(KeplerLSID execLSID) throws QueryException
getExecutionForExecutionLSID
in interface Queryable
getExecutionForExecutionLSID
in class DefaultQuery
QueryException
public java.lang.Integer getExecutionForExecutionLSIDWithoutRevision(java.lang.String execLSIDWithoutRevision) throws QueryException
getExecutionForExecutionLSIDWithoutRevision
in interface Queryable
getExecutionForExecutionLSIDWithoutRevision
in class DefaultQuery
QueryException
public java.lang.Integer getExecutionForOldestReferralExecutionLSIDWithoutRevision(java.lang.String execLSIDWithoutRevision) throws QueryException
getExecutionForOldestReferralExecutionLSIDWithoutRevision
in interface Queryable
getExecutionForOldestReferralExecutionLSIDWithoutRevision
in class DefaultQuery
QueryException
public KeplerLSID getExecutionLSIDForExecution(java.lang.Integer execId) throws QueryException
getExecutionLSIDForExecution
in interface Queryable
getExecutionLSIDForExecution
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutionsForWorkflowNameContains(java.lang.String text) throws QueryException
QueryException
public java.util.List<java.lang.Integer> getExecutionsForWorkflowRuns(java.lang.String workflowName, java.lang.String userName) throws QueryException
getExecutionsForWorkflowRuns
in interface Queryable
getExecutionsForWorkflowRuns
in class DefaultQuery
QueryException
public 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 Queryable
getExecutionsForWorkflowRuns
in class DefaultQuery
QueryException
public 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 Queryable
getExecutionLSIDsForWorkflowRuns
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutionsForWorkflowRunsBefore(java.lang.String workflowName, java.lang.String userName, java.util.Date before) throws QueryException
getExecutionsForWorkflowRunsBefore
in interface Queryable
getExecutionsForWorkflowRunsBefore
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutionsForWorkflowRunsAfter(java.lang.String workflowName, java.lang.String userName, java.util.Date after) throws QueryException
getExecutionsForWorkflowRunsAfter
in interface Queryable
getExecutionsForWorkflowRunsAfter
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getExecutionsForWorkflowRunsAt(java.lang.String workflowName, java.lang.String userName, java.lang.String date) throws QueryException
QueryException
public java.util.List<java.lang.Integer> getExecutionsForAnnotation(java.lang.String annotation) throws QueryException
getExecutionsForAnnotation
in interface Queryable
getExecutionsForAnnotation
in class DefaultQuery
QueryException
public java.util.Date[] getTimestampsForExecution(int execId) throws QueryException
getTimestampsForExecution
in interface Queryable
getTimestampsForExecution
in class DefaultQuery
execId
- the execution idQueryException
public java.lang.Integer getLastExecutionForWorkflow(KeplerLSID lsid) throws QueryException
getLastExecutionForWorkflow
in interface Queryable
getLastExecutionForWorkflow
in class DefaultQuery
lsid
- the workflow lsid.QueryException
public java.lang.Integer getLastExecutionForWorkflow(java.lang.String workflow) throws QueryException
getLastExecutionForWorkflow
in interface Queryable
getLastExecutionForWorkflow
in class DefaultQuery
workflow
- the workflow nameQueryException
public KeplerLSID getLastExecutionLSIDForWorkflow(java.lang.String workflow) throws QueryException
getLastExecutionLSIDForWorkflow
in interface Queryable
getLastExecutionLSIDForWorkflow
in class DefaultQuery
workflow
- the workflow name.QueryException
public KeplerLSID getLastExecutionLSIDForWorkflow(KeplerLSID lsid) throws QueryException
getLastExecutionLSIDForWorkflow
in interface Queryable
getLastExecutionLSIDForWorkflow
in class DefaultQuery
lsid
- the workflow lsid.QueryException
public java.lang.String getErrorForExecution(KeplerLSID lsid) throws QueryException
getErrorForExecution
in interface Queryable
getErrorForExecution
in class DefaultQuery
lsid
- the workflow execution lsid.QueryException
isErrorForExecution
public boolean isErrorForExecution(KeplerLSID executionLSID) throws QueryException
isErrorForExecution
in interface Queryable
isErrorForExecution
in class DefaultQuery
QueryException
public boolean isImportedExecution(KeplerLSID executionLSID) throws QueryException
isImportedExecution
in interface Queryable
isImportedExecution
in class DefaultQuery
QueryException
public java.util.List<KeplerLSID> getExecutionsForType(WorkflowRun.type type) throws QueryException
getExecutionsForType
in interface Queryable
getExecutionsForType
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getTokensForExecution(int execId, java.lang.Integer portId, boolean last) throws QueryException
getTokensForExecution
in interface Queryable
getTokensForExecution
in class DefaultQuery
execId
- 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.QueryException
public java.util.List<java.lang.Integer> getActorFiringForToken(int tokenId, boolean read) throws QueryException
getActorFiringForToken
in interface Queryable
getActorFiringForToken
in class DefaultQuery
tokenId
- 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.QueryException
public java.util.List<java.lang.Integer> getTokensForFiring(int fireId, boolean read) throws QueryException
getTokensForFiring
in interface Queryable
getTokensForFiring
in class DefaultQuery
fireId
- the firing idread
- if true, get the tokens read; otherwise get the tokens
written.QueryException
public java.lang.String getTokenValue(int tokenId) throws QueryException
getTokenValue
in interface Queryable
getTokenValue
in class DefaultQuery
QueryException
public java.lang.String getTokenType(int tokenId) throws QueryException
getTokenType
in interface Queryable
getTokenType
in class DefaultQuery
QueryException
public java.lang.Integer getChannelForToken(int tokenId, boolean read, java.lang.Integer fireId) throws QueryException
getChannelForToken
in interface Queryable
getChannelForToken
in class DefaultQuery
tokenId
- 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.QueryException
public java.lang.Integer getEntityId(java.lang.String entityName, KeplerLSID lsid) throws QueryException
getEntityId
in interface Queryable
getEntityId
in class DefaultQuery
entityName
- name of entity.lsid
- the workflow LSID. NOTE: the revision is ignored.QueryException
public java.lang.Integer getEntityId(java.lang.String entityName, java.lang.String workflowName) throws QueryException
getEntityId
in interface Queryable
getEntityId
in class DefaultQuery
entityName
- the name of the entity.workflowName
- the name of the workflow.QueryException
public java.lang.String getEntityType(java.lang.Integer entityId) throws QueryException
Queryable
getEntityType
in interface Queryable
getEntityType
in class DefaultQuery
QueryException
public java.lang.Integer getEntityWorkflowId(java.lang.Integer entityId) throws QueryException
Queryable
getEntityWorkflowId
in interface Queryable
getEntityWorkflowId
in class DefaultQuery
QueryException
public java.lang.String getActorName(int fireId) throws QueryException
getActorName
in interface Queryable
getActorName
in class DefaultQuery
QueryException
public java.lang.String getActorType(int fireId) throws QueryException
getActorType
in interface Queryable
getActorType
in class DefaultQuery
QueryException
public java.util.Map<java.lang.String,java.lang.String> getParameterNameValuesForFiring(int fireId) throws QueryException
getParameterNameValuesForFiring
in interface Queryable
getParameterNameValuesForFiring
in class DefaultQuery
QueryException
public java.util.Map<java.lang.String,java.lang.String> getParameterNameValuesForExecution(int execId) throws QueryException
getParameterNameValuesForExecution
in interface Queryable
getParameterNameValuesForExecution
in class DefaultQuery
QueryException
public java.lang.String getParameterValueLatest(java.lang.String parameter, KeplerLSID lsid) throws QueryException
getParameterValueLatest
in interface Queryable
getParameterValueLatest
in class DefaultQuery
parameter
- the parameter name.lsid
- the workflow lsidQueryException
public java.lang.String getParameterValueAtTime(java.util.Date timestamp, java.lang.String parameter, KeplerLSID lsid) throws QueryException
getParameterValueAtTime
in interface Queryable
getParameterValueAtTime
in class DefaultQuery
timestamp
- the timeparameter
- the parameter namelsid
- the workflow lsidQueryException
protected 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 Queryable
getImmediateDependencies
in class DefaultQuery
QueryException
public java.util.List<byte[]> getAssociatedDataForExecution(int execId, java.util.Map<java.lang.String,java.lang.String> metadataMap, boolean matchAny) throws QueryException
getAssociatedDataForExecution
in interface Queryable
getAssociatedDataForExecution
in class DefaultQuery
QueryException
public java.util.Map<java.lang.String,java.lang.String> getAssociatedKeysValuesForExecution(int execId) throws QueryException
getAssociatedKeysValuesForExecution
in interface Queryable
getAssociatedKeysValuesForExecution
in class DefaultQuery
QueryException
public java.util.List<java.lang.String> getSavedFilenames() throws QueryException
QueryException
public java.util.List<java.lang.String> getPortsForActor(KeplerLSID workflow, java.lang.String actor) throws QueryException
getPortsForActor
in interface Queryable
getPortsForActor
in class DefaultQuery
workflow
- the LSID of the workflowactor
- the fully-qualified name of the actorQueryException
public java.lang.String getHostIdForExecution(java.lang.Integer execId) throws QueryException
getHostIdForExecution
in interface Queryable
getHostIdForExecution
in class DefaultQuery
QueryException
public java.lang.String getUserForExecution(KeplerLSID execLSID) throws QueryException
getUserForExecution
in interface Queryable
getUserForExecution
in class DefaultQuery
QueryException
public java.lang.String getUserForExecution(java.lang.Integer execId) throws QueryException
getUserForExecution
in interface Queryable
getUserForExecution
in class DefaultQuery
QueryException
public java.lang.String getOutputRoleToken(int tokenId) throws QueryException
getOutputRoleToken
in interface Queryable
getOutputRoleToken
in class DefaultQuery
QueryException
public java.lang.String getInputRoleForTokenAndFireId(int tokenId, int fireId) throws QueryException
getInputRoleForTokenAndFireId
in interface Queryable
getInputRoleForTokenAndFireId
in class DefaultQuery
QueryException
public java.util.Map<java.lang.String,java.lang.String> getParameterNameValuesOfSpecificTypeForExecution(int execId) throws QueryException
getParameterNameValuesOfSpecificTypeForExecution
in interface Queryable
getParameterNameValuesOfSpecificTypeForExecution
in class DefaultQuery
QueryException
public java.util.Date[] getTimestampsForActorFiring(int fireId) throws QueryException
getTimestampsForActorFiring
in interface Queryable
getTimestampsForActorFiring
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getActorFiringIds(java.lang.String actorName, java.lang.Integer wfExecId) throws QueryException
getActorFiringIds
in interface Queryable
getActorFiringIds
in class DefaultQuery
QueryException
public java.util.Map<java.lang.String,java.lang.String> getParameterAndPortParameterNameValuesForFiring(int fireId) throws QueryException
getParameterAndPortParameterNameValuesForFiring
in interface Queryable
getParameterAndPortParameterNameValuesForFiring
in class DefaultQuery
QueryException
public java.util.List<java.lang.Integer> getActorFirings(int wfExecId) throws QueryException
getActorFirings
in interface Queryable
getActorFirings
in class DefaultQuery
QueryException
public java.util.Map<java.lang.String,java.lang.Long> getExecutionTimesForActor(KeplerLSID workflow, KeplerLSID execLSID, java.lang.String actor) throws QueryException
getExecutionTimesForActor
in interface Queryable
getExecutionTimesForActor
in class DefaultQuery
workflow
- 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.QueryException
public 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 Queryable
getIOBytesForPort
in class DefaultQuery
workflow
- 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.QueryException
public java.util.Date[] getTimestampsForTokenRead(java.lang.Integer tokenId) throws QueryException
getTimestampsForTokenRead
in interface Queryable
getTimestampsForTokenRead
in class DefaultQuery
QueryException
public java.util.Date getTimestampForTokenWrite(java.lang.Integer tokenId) throws QueryException
getTimestampForTokenWrite
in interface Queryable
getTimestampForTokenWrite
in class DefaultQuery
QueryException
protected void _init() throws QueryException
QueryException
protected void _createPreparedStatements() throws java.sql.SQLException
java.sql.SQLException
protected java.util.List<java.lang.Integer> _getEntitiesForChange(int changeId) throws QueryException
QueryException
protected java.util.Date _getLastChangeTime(java.lang.String workflowName, java.lang.String hostName) throws QueryException
QueryException
protected java.util.Date _getLastChangeTime(int workflowId, java.lang.String hostName) throws QueryException
QueryException
protected java.util.List<java.lang.Integer> _getChangesSince(java.util.Date timeStamp, java.lang.String workflowName, java.lang.String hostName) throws QueryException
QueryException
protected 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
QueryException
protected java.util.Date _getLastExecutionStartTime(java.lang.String workflowName, java.lang.String hostName) throws QueryException
QueryException
protected java.util.Date _getLastExecutionStartTime(int workflowId, java.lang.String hostName) throws QueryException
QueryException
protected 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.QueryException
protected 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
QueryException
protected int _getWorkflow(java.lang.String workflow) throws QueryException
QueryException
protected java.util.List<java.lang.String> _getDataMD5s() throws QueryException
QueryException
protected 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.SQLException
protected static java.util.Map<java.lang.String,java.lang.String> _getParameterNameValues(java.sql.PreparedStatement statement) throws QueryException, java.sql.SQLException
QueryException
java.sql.SQLException
protected 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.SQLException
protected 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.SQLException
protected void _nullPreparedStatements()
protected void _debug(java.lang.String str)
protected boolean _stringTokenValuesHaveSurroundingQuotes()
_stringTokenValuesHaveSurroundingQuotes
in class DefaultQuery