Package oracle.nosql.driver.ops

# Class GetTableRequest

java.lang.Object
oracle.nosql.driver.ops.Request
oracle.nosql.driver.ops.GetTableRequest

public class GetTableRequest extends Request
Represents the argument of a `NoSQLHandle.getTable(oracle.nosql.driver.ops.GetTableRequest)` operation which returns static information associated with a table, as returned in `TableResult`. This information only changes in response to a change in table schema or a change in provisioned throughput or capacity for the table.

See Also:
  - `NoSQLHandle.getTable(oracle.nosql.driver.ops.GetTableRequest)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GetTableRequest()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getOperationId()`
  Returns the operation id to use for the request, null if not set.
  `String`
  `getTypeName()`
  Returns the type name of the request.
  `GetTableRequest`
  `setCompartment(String compartment)`
  Cloud service only.
  `GetTableRequest`
  `setNamespace(String namespace)`
  Sets the optional namespace.
  `GetTableRequest`
  `setOperationId(String operationId)`
  Sets the operation id to use for the request.
  `GetTableRequest`
  `setTableName(String tableName)`
  Sets the table name to use for the request
  `GetTableRequest`
  `setTimeout(int timeoutMs)`
  Sets the request timeout value, in milliseconds.

  ### Methods inherited from class oracle.nosql.driver.ops.Request

  `getCompartment, getNamespace, getRateLimitDelayedMs, getReadRateLimiter, getRetryStats, getTableName, getWriteRateLimiter, setReadRateLimiter, setWriteRateLimiter`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GetTableRequest

    public GetTableRequest()

- ## Method Details

  - ### setTableName

    public GetTableRequest setTableName(String tableName)
    Sets the table name to use for the request
    Parameters:
      `tableName` - the table name. This is a required parameter.
    Returns:
      this

  - ### setCompartment

    public GetTableRequest setCompartment(String compartment)
    Cloud 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

  - ### setOperationId

    public GetTableRequest setOperationId(String operationId)
    Sets the operation id to use for the request. The operation id can be obtained via `TableResult.getOperationId()`. This parameter is optional. If non-null, it represents an asynchronous table operation that may be in progress. It is used to examine the result of the operation and if the operation has failed an exception will be thrown in response to a `NoSQLHandle.getTable(oracle.nosql.driver.ops.GetTableRequest)` operation. If the operation is in progress or has completed successfully, the state of the table is returned.
    Parameters:
      `operationId` - the operationId. This is optional.
    Returns:
      this

  - ### getOperationId

    public String getOperationId()
    Returns the operation id to use for the request, null if not set.
    Returns:
      the operation id

  - ### setTimeout

    public GetTableRequest setTimeout(int timeoutMs)
    Sets the request timeout value, in milliseconds. This overrides any default value set with `NoSQLHandleConfig.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

  - ### setNamespace

    public GetTableRequest setNamespace(String namespace)
    Sets the optional namespace. On-premises only. This overrides any default value set with `NoSQLHandleConfig.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

  - ### getTypeName

    public String getTypeName()
    Description copied from class: `Request`
    Returns the type name of the request. This is used for stats.
    Specified by:
      `getTypeName` in class `Request`
    Returns:
      the type name of the request