public abstract class DXObject extends Object
Two DXObjects are considered to be equal if they have the same
DNAnexus object ID. The environment is not considered when testing for
equality.
| Modifier and Type | Field and Description |
|---|---|
protected String |
dxId
The ID of this object (this is the base for URLs used in API calls,
/object-id/verb). |
protected DXEnvironment |
env
Environment object to use for API calls.
|
protected static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
| Modifier | Constructor and Description |
|---|---|
protected |
DXObject(String dxId,
String className,
DXEnvironment env)
Creates a new object with the specified ID and environment.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.fasterxml.jackson.databind.JsonNode |
apiCallOnObject(String method,
DXHTTPRequest.RetryStrategy retryStrategy)
Calls the specified API method on this object (with an empty input hash) and returns its
result.
|
protected com.fasterxml.jackson.databind.JsonNode |
apiCallOnObject(String method,
com.fasterxml.jackson.databind.JsonNode input,
DXHTTPRequest.RetryStrategy retryStrategy)
Calls the specified API method on this object (with the specified input hash) and returns its
result.
|
boolean |
equals(Object obj) |
String |
getId()
Returns the ID of the object.
|
int |
hashCode() |
String |
toString() |
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
protected final String dxId
/object-id/verb).protected final DXEnvironment env
protected DXObject(String dxId, String className, DXEnvironment env)
dxId - DNAnexus object ID, e.g. "file-xxxx"className - desired class name that should be a prefix of the object ID, or null to
perform no prefix checkenv - Environment to use for API queries, or null to use the default environment.public String getId()
protected com.fasterxml.jackson.databind.JsonNode apiCallOnObject(String method, com.fasterxml.jackson.databind.JsonNode input, DXHTTPRequest.RetryStrategy retryStrategy)
method - Name of method, e.g. "describe"input - Request payload (to be converted to JSON)retryStrategy - Indicates whether the request is idempotent and can be retriedprotected com.fasterxml.jackson.databind.JsonNode apiCallOnObject(String method, DXHTTPRequest.RetryStrategy retryStrategy)
method - Name of method, e.g. "describe"retryStrategy - Indicates whether the request is idempotent and can be retriedCopyright © 2023. All Rights Reserved.