T
- data object class to be returned from the querypublic static class DXSearch.FindDataObjectsRequestBuilder<T extends DXDataObject> extends Object
findDataObjects
queries and executing them.
Obtain an instance of this class via DXSearch.findDataObjects()
.
Modifier and Type | Method and Description |
---|---|
DXSearch.FindDataObjectsRequestBuilder<T> |
createdAfter(Date createdAfter)
Only returns data objects that were created after the specified time.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
createdBefore(Date createdBefore)
Only returns data objects that were created before the specified time.
|
DXSearch.FindDataObjectsResult<T> |
execute()
Executes the query.
|
DXSearch.FindDataObjectsResult<T> |
execute(int pageSize)
Executes the query with the specified page size.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
includeDescribeOutput()
Requests the default describe data for each matching data object when the query is run.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
includeDescribeOutput(DXDataObject.DescribeOptions describeOptions)
Requests describe data (with the specified options) for each matching data object when
the query is run.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
inFolder(DXContainer project,
String folder)
Only returns objects in the specified folder of the specified project (not in
subfolders).
|
DXSearch.FindDataObjectsRequestBuilder<T> |
inFolderOrSubfolders(DXContainer project,
String folder)
Only returns objects in the specified folder of the specified project or in its
subfolders.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
inProject(DXContainer project)
Only returns objects in the specified project.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
modifiedAfter(Date modifiedAfter)
Only returns data objects that were last modified after the specified time.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
modifiedBefore(Date modifiedBefore)
Only returns data objects that were last modified before the specified time.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
nameMatchesExactly(String name)
Only returns objects whose names exactly equal the specified string.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
nameMatchesGlob(String glob)
Only returns objects whose name match the specified glob.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
nameMatchesRegexp(String regexp)
Only returns objects whose names match the specified regexp.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
nameMatchesRegexp(String regexp,
boolean caseInsensitive)
Only returns objects whose names match the specified regexp (optionally allowing the
match to be case insensitive).
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withArchivalState(ArchivalState archivalState)
Only returns files with the specified archival state.
|
DXSearch.FindDataObjectsRequestBuilder<DXApplet> |
withClassApplet()
Only returns applets (filters out data objects of all other classes).
|
DXSearch.FindDataObjectsRequestBuilder<DXFile> |
withClassFile()
Only returns files (filters out data objects of all other classes).
|
DXSearch.FindDataObjectsRequestBuilder<DXRecord> |
withClassRecord()
Only returns records (filters out data objects of all other classes).
|
DXSearch.FindDataObjectsRequestBuilder<DXWorkflow> |
withClassWorkflow()
Only returns workflows (filters out data objects of all other classes).
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withIdsIn(Collection<? extends DXDataObject> dataObjects)
Only returns data objects whose IDs match one of the specified data objects.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withLinkTo(DXDataObject dataObject)
Only returns data objects that link to the specified data object.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withMinimumAccessLevel(AccessLevel level)
Only returns data objects to which the requesting user has at least the specified level
of permission in some project.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withProperties(DXSearch.PropertiesQuery propertiesQuery)
Only returns data objects matching the specified properties query.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withProperty(String propertyKey)
Only returns data objects where the specified property is present.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withProperty(String propertyKey,
Boolean propertyExists)
Only returns data objects where the specified property either exists or not.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withProperty(String propertyKey,
Map<String,String> mapValue)
Only returns data objects where the property key is not equal to the given value
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withProperty(String propertyKey,
String propertyValue)
Only returns data objects where the specified property has the specified value.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withSortBy(String field,
DXSearch.Ordering ordering)
Requests that the returned data objects are sorted by the specified field.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withState(DataObjectState state)
Only returns data objects with the specified state.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withTag(String tag)
Only returns data objects with the specified tag.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withTags(DXSearch.TagsQuery tagsQuery)
Only returns data objects matching the specified tags query.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withType(String type)
Only returns data objects with the specified type.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withTypes(DXSearch.TypeQuery typeQuery)
Only returns data objects matching the specified types query.
|
DXSearch.FindDataObjectsRequestBuilder<T> |
withVisibility(DXSearch.VisibilityQuery visibilityQuery)
Only returns data objects with the specified visibility (visible or hidden).
|
public DXSearch.FindDataObjectsRequestBuilder<T> createdAfter(Date createdAfter)
createdAfter
- creation datepublic DXSearch.FindDataObjectsRequestBuilder<T> createdBefore(Date createdBefore)
createdBefore
- creation datepublic DXSearch.FindDataObjectsResult<T> execute()
public DXSearch.FindDataObjectsResult<T> execute(int pageSize)
pageSize
- number of results to obtain on each requestpublic DXSearch.FindDataObjectsRequestBuilder<T> includeDescribeOutput()
DXDataObject.getCachedDescribe()
method can be used if, and only if, this
method is called at query time.public DXSearch.FindDataObjectsRequestBuilder<T> includeDescribeOutput(DXDataObject.DescribeOptions describeOptions)
DXDataObject.getCachedDescribe()
method can be used if, and
only if, this method is called at query time.describeOptions
- options specifying which fields to be returned or a project hintpublic DXSearch.FindDataObjectsRequestBuilder<T> inFolder(DXContainer project, String folder)
This method may only be called once during the construction of a query, and is mutually
exclusive with inFolderOrSubfolders(DXContainer, String)
and
inProject(DXContainer)
.
project
- project or container to search infolder
- full path to folder to search in (a String starting with "/"
)public DXSearch.FindDataObjectsRequestBuilder<T> inFolderOrSubfolders(DXContainer project, String folder)
This method may only be called once during the construction of a query, and is mutually
exclusive with inFolder(DXContainer, String)
and inProject(DXContainer)
.
project
- project or container to search infolder
- full path to folder to search in (a String starting with "/"
)public DXSearch.FindDataObjectsRequestBuilder<T> inProject(DXContainer project)
This method may only be called once during the construction of a query, and is mutually
exclusive with inFolder(DXContainer, String)
and
inFolderOrSubfolders(DXContainer, String)
.
project
- project or container to search inpublic DXSearch.FindDataObjectsRequestBuilder<T> withSortBy(String field, DXSearch.Ordering ordering)
field
- field name by which the data objects should be orderedordering
- value specifying in what order the data objects should be sortedpublic DXSearch.FindDataObjectsRequestBuilder<T> modifiedAfter(Date modifiedAfter)
modifiedAfter
- last modified datepublic DXSearch.FindDataObjectsRequestBuilder<T> modifiedBefore(Date modifiedBefore)
modifiedBefore
- last modified datepublic DXSearch.FindDataObjectsRequestBuilder<T> nameMatchesExactly(String name)
This method may only be called once during the construction of a query, and is mutually
exclusive with nameMatchesGlob(String)
, nameMatchesRegexp(String)
, and
nameMatchesRegexp(String, boolean)
.
name
- basename of data objectpublic DXSearch.FindDataObjectsRequestBuilder<T> nameMatchesGlob(String glob)
This method may only be called once during the construction of a query, and is mutually
exclusive with nameMatchesExactly(String)
, nameMatchesRegexp(String)
,
and nameMatchesRegexp(String, boolean)
.
glob
- shell-like pattern to be matched against data object basenamepublic DXSearch.FindDataObjectsRequestBuilder<T> nameMatchesRegexp(String regexp)
This method may only be called once during the construction of a query, and is mutually
exclusive with nameMatchesExactly(String)
, nameMatchesGlob(String)
, and
nameMatchesRegexp(String, boolean)
.
regexp
- regexp to be matched against data object basenamepublic DXSearch.FindDataObjectsRequestBuilder<T> nameMatchesRegexp(String regexp, boolean caseInsensitive)
This method may only be called once during the construction of a query, and is mutually
exclusive with nameMatchesExactly(String)
, nameMatchesGlob(String)
, and
nameMatchesRegexp(String)
.
regexp
- regexp to be matched against data object basenamecaseInsensitive
- if true, the regexp is matched case-insensitivelypublic DXSearch.FindDataObjectsRequestBuilder<T> withArchivalState(ArchivalState archivalState)
Please note archival states are supported only for "file" class (use withClassFile()
). This filter
requires project and folder (can be root "/") to be specified (use either inFolder(DXContainer, String)
or
inFolderOrSubfolders(DXContainer, String)
).
archivalState
- enum value specifying what files archival states can be returnedpublic DXSearch.FindDataObjectsRequestBuilder<DXApplet> withClassApplet()
This method may only be called once during the construction of a query, and is mutually
exclusive with withClassFile()
,
withClassRecord()
, and withClassWorkflow()
.
public DXSearch.FindDataObjectsRequestBuilder<DXFile> withClassFile()
This method may only be called once during the construction of a query, and is mutually
exclusive with withClassApplet()
,
withClassRecord()
, and withClassWorkflow()
.
public DXSearch.FindDataObjectsRequestBuilder<DXRecord> withClassRecord()
This method may only be called once during the construction of a query, and is mutually
exclusive with withClassApplet()
, withClassFile()
,
and withClassWorkflow()
.
public DXSearch.FindDataObjectsRequestBuilder<DXWorkflow> withClassWorkflow()
This method may only be called once during the construction of a query, and is mutually
exclusive with withClassApplet()
, withClassFile()
,
and withClassRecord()
.
public DXSearch.FindDataObjectsRequestBuilder<T> withIdsIn(Collection<? extends DXDataObject> dataObjects)
When used in combination with includeDescribeOutput()
or
includeDescribeOutput(com.dnanexus.DXDataObject.DescribeOptions)
you can use
this to "bulk describe" a large number of objects. Note that hidden objects among the
requested list will not be returned unless you use
withVisibility(DXSearch.VisibilityQuery)
to request all objects.
The number of results may exceed the number of unique data objects supplied because each
result appears once for each accessible project it can be found in (you can call
inProject(DXContainer)
to avoid this multiplicity).
dataObjects
- collection of data objectspublic DXSearch.FindDataObjectsRequestBuilder<T> withLinkTo(DXDataObject dataObject)
dataObject
- data object that must be the target of a DNAnexus link on matching data
objectspublic DXSearch.FindDataObjectsRequestBuilder<T> withMinimumAccessLevel(AccessLevel level)
level
- project access level (must be greater than NONE)public DXSearch.FindDataObjectsRequestBuilder<T> withProperties(DXSearch.PropertiesQuery propertiesQuery)
propertiesQuery
- properties querypublic DXSearch.FindDataObjectsRequestBuilder<T> withProperty(String propertyKey)
To specify a complex query on the properties, use
withProperties(DXSearch.PropertiesQuery)
.
propertyKey
- property key that must be presentpublic DXSearch.FindDataObjectsRequestBuilder<T> withProperty(String propertyKey, String propertyValue)
To specify a complex query on the properties, use
withProperties(DXSearch.PropertiesQuery)
.
propertyKey
- property keypropertyValue
- property valuepublic DXSearch.FindDataObjectsRequestBuilder<T> withProperty(String propertyKey, Boolean propertyExists)
To specify a complex query on the properties, use
withProperties(DXSearch.PropertiesQuery)
.
propertyKey
- property keypropertyExists
- boolean indicating whether the property is set on the data object (true) or not (false)public DXSearch.FindDataObjectsRequestBuilder<T> withProperty(String propertyKey, Map<String,String> mapValue)
To specify a complex query on the properties, use
withProperties(DXSearch.PropertiesQuery)
.
propertyKey
- property keymapValue
- hash map property value; the accepted key is "$ne"; it indicates the key
specified in propertyKey must not equal the string value in mapValuepublic DXSearch.FindDataObjectsRequestBuilder<T> withState(DataObjectState state)
state
- data object statepublic DXSearch.FindDataObjectsRequestBuilder<T> withTag(String tag)
To specify a complex query on the tags, use withTags(DXSearch.TagsQuery)
.
tag
- String containing a tagpublic DXSearch.FindDataObjectsRequestBuilder<T> withTags(DXSearch.TagsQuery tagsQuery)
tagsQuery
- tags querypublic DXSearch.FindDataObjectsRequestBuilder<T> withType(String type)
type
- String containing a typepublic DXSearch.FindDataObjectsRequestBuilder<T> withTypes(DXSearch.TypeQuery typeQuery)
typeQuery
- types querypublic DXSearch.FindDataObjectsRequestBuilder<T> withVisibility(DXSearch.VisibilityQuery visibilityQuery)
visibilityQuery
- enum value specifying what visibility/ies can be returned.Copyright © 2023. All Rights Reserved.