Class DXRecord
- java.lang.Object
-
- com.dnanexus.DXObject
-
- com.dnanexus.DXDataObject
-
- com.dnanexus.DXRecord
-
public class DXRecord extends DXDataObject
A record (the minimal data object class).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDXRecord.BuilderBuilder class for creating a newDXRecordobject.static classDXRecord.DescribeContains metadata for a record.-
Nested classes/interfaces inherited from class com.dnanexus.DXDataObject
DXDataObject.DescribeOptions
-
-
Field Summary
-
Fields inherited from class com.dnanexus.DXDataObject
cachedDescribe
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DXRecordclose()Closes the data object.DXRecordcloseAndWait()Closes the data object and waits until the close operation is complete.DXRecord.Describedescribe()Returns metadata about the data object.DXRecord.Describedescribe(DXDataObject.DescribeOptions options)Returns metadata about the data object, specifying which optional fields are to be returned and what project to obtain project-specific metadata from.DXRecord.DescribegetCachedDescribe()Returns metadata about the data object, likeDXDataObject.describe(), but without making an API call.static DXRecordgetInstance(String recordId)Returns aDXRecordassociated with an existing record.static DXRecordgetInstance(String recordId, DXContainer project)Returns aDXRecordassociated with an existing record in a particular project or container.static DXRecordgetInstanceWithEnvironment(String recordId, DXContainer project, DXEnvironment env)Returns aDXRecordassociated with an existing record in a particular project using the specified environment.static DXRecordgetInstanceWithEnvironment(String recordId, DXEnvironment env)Returns aDXRecordassociated with an existing record using the specified environment.static DXRecord.BuildernewRecord()Returns a Builder object for creating a newDXRecord.static DXRecord.BuildernewRecordWithEnvironment(DXEnvironment env)Returns a Builder object for creating a newDXRecordusing the specified environment.-
Methods inherited from class com.dnanexus.DXDataObject
addTags, addTypes, checkCachedDescribeAvailable, checkDXLinkFormat, equals, getLinkAsJson, getProject, hashCode, listProjects, putAllProperties, putAllProperties, putProperty, removeProperty, removeTags, removeTypes, rename, setDetails, setVisibility
-
Methods inherited from class com.dnanexus.DXObject
apiCallOnObject, apiCallOnObject, getId, toString
-
-
-
-
Method Detail
-
getInstance
public static DXRecord getInstance(String recordId)
Returns aDXRecordassociated with an existing record.- Throws:
NullPointerException- IfrecordIdis null
-
getInstance
public static DXRecord getInstance(String recordId, DXContainer project)
Returns aDXRecordassociated with an existing record in a particular project or container.- Throws:
NullPointerException- IfrecordIdorcontaineris null
-
getInstanceWithEnvironment
public static DXRecord getInstanceWithEnvironment(String recordId, DXContainer project, DXEnvironment env)
Returns aDXRecordassociated with an existing record in a particular project using the specified environment.
-
getInstanceWithEnvironment
public static DXRecord getInstanceWithEnvironment(String recordId, DXEnvironment env)
Returns aDXRecordassociated with an existing record using the specified environment.- Throws:
NullPointerException- IfrecordIdis null
-
newRecord
public static DXRecord.Builder newRecord()
Returns a Builder object for creating a newDXRecord.Example use:
DXRecord r = DXRecord.newRecord().inProject("proj-0000").setName("foo").build();- Returns:
- a newly initialized builder object
-
newRecordWithEnvironment
public static DXRecord.Builder newRecordWithEnvironment(DXEnvironment env)
Returns a Builder object for creating a newDXRecordusing the specified environment.Example use:
DXRecord r = DXRecord.newRecordWithEnvironment(DXEnvironment.create()).inProject("proj-0000").setName("foo").build();- Parameters:
env- environment to use to make API calls- Returns:
- a newly initialized builder object
-
close
public DXRecord close()
Description copied from class:DXDataObjectCloses the data object.Returns the same object so you can chain calls.
- Overrides:
closein classDXDataObject- Returns:
- the same
DXDataObject
-
closeAndWait
public DXRecord closeAndWait()
Description copied from class:DXDataObjectCloses the data object and waits until the close operation is complete.Returns the same object so you can chain calls.
- Overrides:
closeAndWaitin classDXDataObject- Returns:
- the same
DXDataObject
-
describe
public DXRecord.Describe describe()
Description copied from class:DXDataObjectReturns metadata about the data object.The properties and details fields will not be returned, and any project-specific metadata fields will be selected from an arbitrary project in which the requesting user has access to this object. To change either of these aspects of this behavior, use
DXDataObject.describe(DescribeOptions)instead.- Overrides:
describein classDXDataObject- Returns:
- a
Describecontaining the data object's metadata.
-
describe
public DXRecord.Describe describe(DXDataObject.DescribeOptions options)
Description copied from class:DXDataObjectReturns metadata about the data object, specifying which optional fields are to be returned and what project to obtain project-specific metadata from.- Overrides:
describein classDXDataObject- Parameters:
options-DescribeOptionsobject specifying how thedescriberequest is to be made.- Returns:
- a
Describecontaining the data object's metadata.
-
getCachedDescribe
public DXRecord.Describe getCachedDescribe()
Description copied from class:DXDataObjectReturns metadata about the data object, likeDXDataObject.describe(), but without making an API call.This cached describe info is only available if this object appears in the result of a
DXSearch.findDataObjects()call that specifiedDXSearch.FindDataObjectsRequestBuilder.includeDescribeOutput(), and the describe info that is returned reflects the state of the object at the time that the search was performed.- Overrides:
getCachedDescribein classDXDataObject- Returns:
- a
Describecontaining the data object's metadata
-
-