Package oracle.nosql.driver.ops
Class GetRequest
java.lang.Object
oracle.nosql.driver.ops.Request
oracle.nosql.driver.ops.ReadRequest
oracle.nosql.driver.ops.GetRequest
Represents the input to a 
NoSQLHandle.get(oracle.nosql.driver.ops.GetRequest) operation which returns a
 single row based on the specified key.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetKey()Returns the primary key used for the operation.Returns the type name of the request.setCompartment(String compartment) Cloud service only.setConsistency(Consistency consistency) Sets theConsistencyto use for the operation.Sets the primary key used for the get operation.setKeyFromJson(String jsonValue, JsonOptions options) Sets the key to use for the get operation based on a JSON string.setNamespace(String namespace) Sets the optional namespace.setTableName(String tableName) Sets the table name to use for the operation.setTimeout(int timeoutMs) Sets the request timeout value, in milliseconds.Methods inherited from class oracle.nosql.driver.ops.RequestgetCompartment, getNamespace, getRateLimitDelayedMs, getReadRateLimiter, getRetryStats, getTableName, getWriteRateLimiter, setReadRateLimiter, setWriteRateLimiter
- 
Constructor Details- 
GetRequestpublic GetRequest()
 
- 
- 
Method Details- 
getKeyReturns the primary key used for the operation. This is a required parameter.- Returns:
- the key
 
- 
setKeySets the primary key used for the get operation. This is a required parameter.- Parameters:
- key- the primary key
- Returns:
- this
 
- 
setKeyFromJsonSets the key to use for the get operation based on a JSON string. This is a convenience method equivalent to:setKey(FieldValue.createFromJson(jsonValue, null)); - Parameters:
- jsonValue- the row value as a JSON string
- options- optional configuration to specify how to map JSON data, may be null
- Returns:
- this
 
- 
setTableNameSets the table name to use for the operation. This is a required parameter.- Parameters:
- tableName- the table name
- Returns:
- this
 
- 
setCompartmentCloud service only.Sets the name or id of a compartment to be used for this operation. The compartment may be specified as either a name (or path for nested compartments) or as an id (OCID). A name (vs id) can only be used when authenticated using a specific user identity. It is not available if authenticated as an Instance Principal which can be done when calling the service from a compute instance in the Oracle Cloud Infrastructure. See SignatureProvider.createWithInstancePrincipal()- Parameters:
- compartment- the name or id. If using a nested compartment, specify the full compartment path- compartmentA.compartmentB, but exclude the name of the root compartment (tenant).
- Returns:
- this
 
- 
setConsistencySets theConsistencyto use for the operation. This parameter is optional and if not set the default consistency configured for theNoSQLHandleis used.- Parameters:
- consistency- the Consistency
- Returns:
- this
 
- 
setTimeoutSets the request timeout value, in milliseconds. This overrides any default value set withNoSQLHandleConfig.setRequestTimeout(int). The value must be positive.- Parameters:
- timeoutMs- the timeout value, in milliseconds
- Returns:
- this
- Throws:
- IllegalArgumentException- if the timeout value is less than or equal to 0
 
- 
setNamespaceSets the optional namespace. On-premises only. This overrides any default value set withNoSQLHandleConfig.setDefaultNamespace(java.lang.String). Note: if a namespace is specified in the table name for the request (using the namespace:tablename format), that value will override this setting.- Parameters:
- namespace- the namespace to use for the operation
- Returns:
- this
- Since:
- 5.4.10
 
- 
getTypeNameDescription copied from class:RequestReturns the type name of the request. This is used for stats.- Specified by:
- getTypeNamein class- Request
- Returns:
- the type name of the request
 
 
-