Class DXSearch.FindExecutionsRequestBuilder<T extends DXExecution>
- java.lang.Object
-
- com.dnanexus.DXSearch.FindExecutionsRequestBuilder<T>
-
- Type Parameters:
T- execution class that will be returned from the query
- Enclosing class:
- DXSearch
public static class DXSearch.FindExecutionsRequestBuilder<T extends DXExecution> extends Object
Builder class for formulatingfindExecutionsqueries and executing them.Obtain an instance of this class via
DXSearch.findExecutions().
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DXSearch.FindExecutionsRequestBuilder<T>createdAfter(Date date)Only return executions created after the specified date.DXSearch.FindExecutionsRequestBuilder<T>createdBefore(Date date)Only return executions created before the specified date.DXSearch.FindExecutionsResult<T>execute()Executes the query.DXSearch.FindExecutionsResult<T>execute(int pageSize)Executes the query with the specified page size.DXSearch.FindExecutionsRequestBuilder<T>includeDescribeOutput()Requests the default describe data for each matching execution when the query is run.DXSearch.FindExecutionsRequestBuilder<T>includeSubjobs(boolean includeSubjobs)Specifies whether subjobs should be included among the results (default is true).DXSearch.FindExecutionsRequestBuilder<T>inProject(DXContainer project)Only returns executions in the specified project.DXSearch.FindExecutionsRequestBuilder<T>launchedBy(String user)Only returns executions launched by the specified user.DXSearch.FindExecutionsRequestBuilder<T>nameMatchesExactly(String name)Only returns executions whose names exactly equal the specified string.DXSearch.FindExecutionsRequestBuilder<T>nameMatchesGlob(String glob)Only returns executions whose names match the specified glob.DXSearch.FindExecutionsRequestBuilder<T>nameMatchesRegexp(String regexp)Only returns executions whose names match the specified regexp.DXSearch.FindExecutionsRequestBuilder<T>nameMatchesRegexp(String regexp, boolean caseInsensitive)Only returns executions whose names match the specified regexp (optionally allowing the match to be case insensitive).DXSearch.FindExecutionsRequestBuilder<DXAnalysis>withClassAnalysis()Only returns analyses (filters out jobs).DXSearch.FindExecutionsRequestBuilder<DXJob>withClassJob()Only returns jobs (filters out analyses).DXSearch.FindExecutionsRequestBuilder<T>withExecutable(DXExecutable<?> executable)Only return executions with the specified executable.DXSearch.FindExecutionsRequestBuilder<T>withIdsIn(Collection<? extends DXExecution> executions)Only returns executions whose IDs match one of the specified executions.DXSearch.FindExecutionsRequestBuilder<T>withOriginJob(DXJob originJob)Only return executions with the specified origin job.DXSearch.FindExecutionsRequestBuilder<T>withParentAnalysis(DXAnalysis parentAnalysis)Only return executions with the specified parent analysis.DXSearch.FindExecutionsRequestBuilder<T>withParentJob(DXJob parentJob)Only return executions with the specified parent job.DXSearch.FindExecutionsRequestBuilder<T>withProperties(DXSearch.PropertiesQuery propertiesQuery)Only returns executions matching the specified properties query.DXSearch.FindExecutionsRequestBuilder<T>withProperty(String propertyKey)Only returns executions where the specified property is present.DXSearch.FindExecutionsRequestBuilder<T>withProperty(String propertyKey, String propertyValue)Only returns executions where the specified property has the specified value.DXSearch.FindExecutionsRequestBuilder<T>withRootExecution(DXExecution rootExecution)Only return executions with the specified root execution.DXSearch.FindExecutionsRequestBuilder<T>withState(AnalysisState... states)Only returns executions in one of the specified analysis states.DXSearch.FindExecutionsRequestBuilder<T>withState(JobState... states)Only returns executions in one of the specified job states.DXSearch.FindExecutionsRequestBuilder<T>withTag(String tag)Only returns executions with the specified tag.DXSearch.FindExecutionsRequestBuilder<T>withTags(DXSearch.TagsQuery tagsQuery)Only returns executions matching the specified tags query.
-
-
-
Method Detail
-
createdAfter
public DXSearch.FindExecutionsRequestBuilder<T> createdAfter(Date date)
Only return executions created after the specified date.- Parameters:
date- earliest creation date- Returns:
- the same builder object
-
createdBefore
public DXSearch.FindExecutionsRequestBuilder<T> createdBefore(Date date)
Only return executions created before the specified date.- Parameters:
date- latest creation date- Returns:
- the same builder object
-
execute
public DXSearch.FindExecutionsResult<T> execute()
Executes the query.- Returns:
- object encapsulating the result set
-
execute
public DXSearch.FindExecutionsResult<T> execute(int pageSize)
Executes the query with the specified page size.- Parameters:
pageSize- number of results to obtain on each request- Returns:
- object encapsulating the result set
-
includeDescribeOutput
public DXSearch.FindExecutionsRequestBuilder<T> includeDescribeOutput()
Requests the default describe data for each matching execution when the query is run. TheDXExecution.getCachedDescribe()method can be used if, and only if, this method is called at query time.- Returns:
- the same builder object
-
includeSubjobs
public DXSearch.FindExecutionsRequestBuilder<T> includeSubjobs(boolean includeSubjobs)
Specifies whether subjobs should be included among the results (default is true). If false, only non-subjob executions (i.e., master jobs, origin jobs, and analyses) will be returned.- Parameters:
includeSubjobs- whether to include subjobs in the results- Returns:
- the same builder object
-
inProject
public DXSearch.FindExecutionsRequestBuilder<T> inProject(DXContainer project)
Only returns executions in the specified project.- Parameters:
project- project or container to search in- Returns:
- the same builder object
-
launchedBy
public DXSearch.FindExecutionsRequestBuilder<T> launchedBy(String user)
Only returns executions launched by the specified user.- Parameters:
user- user ID, e.g."user-flast"- Returns:
- the same builder object
-
nameMatchesExactly
public DXSearch.FindExecutionsRequestBuilder<T> nameMatchesExactly(String name)
Only returns executions whose names exactly equal the specified string.This method may only be called once during the construction of a query, and is mutually exclusive with
nameMatchesGlob(String),nameMatchesRegexp(String), andnameMatchesRegexp(String, boolean).- Parameters:
name- name of execution- Returns:
- the same builder object
-
nameMatchesGlob
public DXSearch.FindExecutionsRequestBuilder<T> nameMatchesGlob(String glob)
Only returns executions whose names match the specified glob.This method may only be called once during the construction of a query, and is mutually exclusive with
nameMatchesExactly(String),nameMatchesRegexp(String), andnameMatchesRegexp(String, boolean).- Parameters:
glob- shell-like pattern to be matched against execution name- Returns:
- the same builder object
-
nameMatchesRegexp
public DXSearch.FindExecutionsRequestBuilder<T> nameMatchesRegexp(String regexp)
Only returns executions whose names match the specified regexp.This method may only be called once during the construction of a query, and is mutually exclusive with
nameMatchesExactly(String),nameMatchesGlob(String), andnameMatchesRegexp(String, boolean).- Parameters:
regexp- regexp to be matched against execution name- Returns:
- the same builder object
-
nameMatchesRegexp
public DXSearch.FindExecutionsRequestBuilder<T> nameMatchesRegexp(String regexp, boolean caseInsensitive)
Only returns executions whose names match the specified regexp (optionally allowing the match to be case insensitive).This method may only be called once during the construction of a query, and is mutually exclusive with
nameMatchesExactly(String),nameMatchesGlob(String), andnameMatchesRegexp(String).- Parameters:
regexp- regexp to be matched against execution namecaseInsensitive- if true, the regexp is matched case-insensitively- Returns:
- the same builder object
-
withClassAnalysis
public DXSearch.FindExecutionsRequestBuilder<DXAnalysis> withClassAnalysis()
Only returns analyses (filters out jobs).This method may only be called once during the construction of a query, and is mutually exclusive with
withClassJob().- Returns:
- the same builder object
-
withClassJob
public DXSearch.FindExecutionsRequestBuilder<DXJob> withClassJob()
Only returns jobs (filters out analyses).This method may only be called once during the construction of a query, and is mutually exclusive with
withClassAnalysis().- Returns:
- the same builder object
-
withExecutable
public DXSearch.FindExecutionsRequestBuilder<T> withExecutable(DXExecutable<?> executable)
Only return executions with the specified executable.- Parameters:
executable- executable- Returns:
- the same builder object
-
withIdsIn
public DXSearch.FindExecutionsRequestBuilder<T> withIdsIn(Collection<? extends DXExecution> executions)
Only returns executions whose IDs match one of the specified executions.When used in combination with
includeDescribeOutput()you can use this to "bulk describe" a large number of executions.- Parameters:
executions- collection of executions- Returns:
- the same builder object
-
withOriginJob
public DXSearch.FindExecutionsRequestBuilder<T> withOriginJob(DXJob originJob)
Only return executions with the specified origin job.- Parameters:
originJob- origin job- Returns:
- the same builder object
-
withParentAnalysis
public DXSearch.FindExecutionsRequestBuilder<T> withParentAnalysis(DXAnalysis parentAnalysis)
Only return executions with the specified parent analysis.- Parameters:
parentAnalysis- parent analysis- Returns:
- the same builder object
-
withParentJob
public DXSearch.FindExecutionsRequestBuilder<T> withParentJob(DXJob parentJob)
Only return executions with the specified parent job.- Parameters:
parentJob- parent job- Returns:
- the same builder object
-
withProperties
public DXSearch.FindExecutionsRequestBuilder<T> withProperties(DXSearch.PropertiesQuery propertiesQuery)
Only returns executions matching the specified properties query.- Parameters:
propertiesQuery- properties query- Returns:
- the same builder object
-
withProperty
public DXSearch.FindExecutionsRequestBuilder<T> withProperty(String propertyKey)
Only returns executions where the specified property is present.To specify a complex query on the properties, use
withProperties(DXSearch.PropertiesQuery).- Parameters:
propertyKey- property key that must be present- Returns:
- the same builder object
-
withProperty
public DXSearch.FindExecutionsRequestBuilder<T> withProperty(String propertyKey, String propertyValue)
Only returns executions where the specified property has the specified value.To specify a complex query on the properties, use
withProperties(DXSearch.PropertiesQuery).- Parameters:
propertyKey- property keypropertyValue- property value- Returns:
- the same builder object
-
withRootExecution
public DXSearch.FindExecutionsRequestBuilder<T> withRootExecution(DXExecution rootExecution)
Only return executions with the specified root execution.- Parameters:
rootExecution- root execution- Returns:
- the same builder object
-
withState
public DXSearch.FindExecutionsRequestBuilder<T> withState(AnalysisState... states)
Only returns executions in one of the specified analysis states. If used in combination withwithState(JobState...), the union of the selected job and analysis states is allowed.Note that it is possible for such a query to select jobs if the jobs are in a state that has the same name as an analysis state, e.g. DONE.
- Parameters:
states- analysis states- Returns:
- the same builder object
-
withState
public DXSearch.FindExecutionsRequestBuilder<T> withState(JobState... states)
Only returns executions in one of the specified job states. If used in combination withwithState(AnalysisState...), the union of the selected job and analysis states is allowed.Note that it is possible for such a query to select analyses if the analyses are in a state that has the same name as a job state, e.g. DONE.
- Parameters:
states- job states- Returns:
- the same builder object
-
withTag
public DXSearch.FindExecutionsRequestBuilder<T> withTag(String tag)
Only returns executions with the specified tag.To specify a complex query on the tags, use
withTags(DXSearch.TagsQuery).- Parameters:
tag- String containing a tag- Returns:
- the same builder object
-
withTags
public DXSearch.FindExecutionsRequestBuilder<T> withTags(DXSearch.TagsQuery tagsQuery)
Only returns executions matching the specified tags query.- Parameters:
tagsQuery- tags query- Returns:
- the same builder object
-
-