共用方式為


CloudTable Class

  • java.lang.Object
    • com.microsoft.azure.storage.table.CloudTable

public class CloudTable

Represents a table in the Microsoft Azure Table service.

Constructor Summary

Constructor Description
CloudTable(final StorageUri uri)

Creates an instance of the class using the specified table URI. The table URI must include a SAS token.

CloudTable(final StorageUri uri, final StorageCredentials credentials)

Creates an instance of the class using the specified table StorageUri and credentials.

CloudTable(final String tableName, final CloudTableClient client)

Creates an instance of the class using the specified name and client.

CloudTable(final URI uri)

Creates an instance of the class using the specified table URI. The table URI must include a SAS token.

CloudTable(final URI uri, final StorageCredentials credentials)

Creates an instance of the class using the specified table URI and credentials.

Method Summary

Modifier and Type Method and Description
void create()

Creates the table in the storage service with default request options.

This method invokes the Create Table REST API to create the specified table, using the Table service endpoint and storage account credentials of this instance.

void create(TableRequestOptions options, OperationContext opContext)

Creates the table in the storage service, using the specified TableRequestOptions and OperationContext.

This method invokes the Create Table REST API to create the specified table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

boolean createIfNotExists()

Creates the table in the storage service using default request options if it does not already exist.

boolean createIfNotExists(TableRequestOptions options, OperationContext opContext)

Creates the table in the storage service with the specified request options and operation context, if it does not already exist.

void delete()

Deletes the table from the storage service.

void delete(TableRequestOptions options, OperationContext opContext)

Deletes the table from the storage service, using the specified request options and operation context.

boolean deleteIfExists()

Deletes the table from the storage service, if it exists.

boolean deleteIfExists(TableRequestOptions options, OperationContext opContext)

Deletes the table from the storage service using the specified request options and operation context, if it exists.

TablePermissions downloadPermissions()

Downloads the permission settings for the table.

TablePermissions downloadPermissions(TableRequestOptions options, OperationContext opContext)

Downloads the permissions settings for the table using the specified request options and operation context.

ArrayList<TableResult> execute(final TableBatchOperation batch)

Executes the specified batch operation on a table as an atomic operation. A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. Only one retrieve operation is allowed per batch. Note that the total payload of a batch operation is limited to 4MB.

This method invokes an Entity Group Transaction on the REST API to execute the specified batch operation on the table as an atomic unit, using the Table service endpoint and storage account credentials of this instance.

ArrayList<TableResult> execute(final TableBatchOperation batch, TableRequestOptions options, OperationContext opContext)

Executes the specified batch operation on a table as an atomic operation, using the specified TableRequestOptions and OperationContext. A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. Only one retrieve operation is allowed per batch. Note that the total payload of a batch operation is limited to 4MB.

This method invokes an Entity Group Transaction on the REST API to execute the specified batch operation on the table as an atomic unit, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

TableResult execute(final TableOperation operation)

Executes the operation on a table.

This method will invoke the Table Service REST API to execute the specified operation on the table, using the Table service endpoint and storage account credentials of this instance.

TableResult execute(final TableOperation operation, final TableRequestOptions options, final OperationContext opContext)

Executes the operation on a table, using the specified TableRequestOptions and OperationContext.

This method will invoke the Table Service REST API to execute the specified operation on the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

<R> Iterable<R> execute(final TableQuery<?> query, final EntityResolver<R> resolver)

Executes a query, applying the specified EntityResolver<T> to the result.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

<R> Iterable<R> execute(final TableQuery<?> query, final EntityResolver<R> resolver, final TableRequestOptions options, final OperationContext opContext)

Executes a query, applying the specified EntityResolver<T> to the result, using the specified TableRequestOptions and OperationContext.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

<T extends TableEntity> Iterable<T> execute(final TableQuery<T> query)

Executes a query.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

<T extends TableEntity> Iterable<T> execute(final TableQuery<T> query, final TableRequestOptions options, final OperationContext opContext)

Executes a query, using the specified TableRequestOptions and OperationContext.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

<R> ResultSegment<R> executeSegmented(final TableQuery<?> query, final EntityResolver<R> resolver, final ResultContinuation continuationToken)

Executes a query in segmented mode with the specified ResultContinuation continuation token, applying the EntityResolver<T> to the result. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

<R> ResultSegment<R> executeSegmented(final TableQuery<?> query, final EntityResolver<R> resolver, final ResultContinuation continuationToken, final TableRequestOptions options, final OperationContext opContext)

Executes a query in segmented mode with the specified ResultContinuation continuation token, using the specified TableRequestOptions and OperationContext, applying the EntityResolver<T> to the result. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

<T extends TableEntity> ResultSegment<T> executeSegmented(final TableQuery<T> query, final ResultContinuation continuationToken)

Executes a query in segmented mode with a ResultContinuation continuation token. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

<T extends TableEntity> ResultSegment<T> executeSegmented(final TableQuery<T> query, final ResultContinuation continuationToken, final TableRequestOptions options, final OperationContext opContext)

Executes a query in segmented mode with a ResultContinuation continuation token, using the specified TableRequestOptions and OperationContext. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

boolean exists()

Returns a value that indicates whether the table exists in the storage service.

boolean exists(TableRequestOptions options, OperationContext opContext)

Returns a value that indicates whether the table exists in the storage service, using the specified request options and operation context.

String generateSharedAccessSignature(final SharedAccessTablePolicy policy, final String accessPolicyIdentifier, final String startPartitionKey, final String startRowKey, final String endPartitionKey, final String endRowKey)

Creates a shared access signature for the table.

String generateSharedAccessSignature(final SharedAccessTablePolicy policy, final String accessPolicyIdentifier, final String startPartitionKey, final String startRowKey, final String endPartitionKey, final String endRowKey, final IPRange ipRange, final SharedAccessProtocols protocols)

Creates a shared access signature for the table.

String getName()

Gets the name of the table.

CloudTableClient getServiceClient()

Gets the table service client associated with this queue.

final StorageUri getStorageUri()

Returns the list of URIs for all locations.

URI getUri()

Gets the absolute URI for this table.

void uploadPermissions(final TablePermissions permissions)

Uploads the table's permissions.

void uploadPermissions(final TablePermissions permissions, TableRequestOptions options, OperationContext opContext)

Uploads the table's permissions using the specified request options and operation context.

Constructor Details

CloudTable

public CloudTable(final StorageUri uri)

Creates an instance of the class using the specified table URI. The table URI must include a SAS token.

Parameters:

uri - A StorageUri object that represents the absolute URI of the table.

Throws:

StorageException - If a storage service error occurred.

CloudTable

public CloudTable(final StorageUri uri, final StorageCredentials credentials)

Creates an instance of the class using the specified table StorageUri and credentials.

Parameters:

uri - A StorageUri object that represents the absolute StorageUri of the table.
credentials - A StorageCredentials object used to authenticate access.

Throws:

StorageException - If a storage service error occurred.

CloudTable

protected CloudTable(final String tableName, final CloudTableClient client)

Creates an instance of the class using the specified name and client.

Parameters:

tableName - A String which represents the name of the table, which must adhere to table naming rules. The table name should not include any path separator characters (/). Table names are case insensitive, must be unique within an account and must be between 3-63 characters long. Table names must start with an cannot begin with a numeric character and may only contain alphanumeric characters. Some table names are reserved, including "table".
client - A CloudTableClient object that represents the associated service client, and that specifies the endpoint for the Table service.

Throws:

URISyntaxException - If the resource URI constructed based on the tableName is invalid.
StorageException - If a storage service error occurred.

CloudTable

public CloudTable(final URI uri)

Creates an instance of the class using the specified table URI. The table URI must include a SAS token.

Parameters:

uri - A java.net.URI object that represents the absolute URI of the table.

Throws:

StorageException - If a storage service error occurred.

CloudTable

public CloudTable(final URI uri, final StorageCredentials credentials)

Creates an instance of the class using the specified table URI and credentials.

Parameters:

uri - A java.net.URI object that represents the absolute URI of the table.
credentials - A StorageCredentials object used to authenticate access.

Throws:

StorageException - If a storage service error occurred.

Method Details

create

public void create()

Creates the table in the storage service with default request options.

This method invokes the Create Table REST API to create the specified table, using the Table service endpoint and storage account credentials of this instance.

Throws:

StorageException - If a storage service error occurred during the operation.

create

public void create(TableRequestOptions options, OperationContext opContext)

Creates the table in the storage service, using the specified TableRequestOptions and OperationContext.

This method invokes the Create Table REST API to create the specified table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Throws:

StorageException - If an error occurs accessing the storage service, or because the table cannot be created, or already exists.

createIfNotExists

public boolean createIfNotExists()

Creates the table in the storage service using default request options if it does not already exist.

Returns:

true if the table is created in the storage service; otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

createIfNotExists

public boolean createIfNotExists(TableRequestOptions options, OperationContext opContext)

Creates the table in the storage service with the specified request options and operation context, if it does not already exist.

Parameters:

options - A TableRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudTableClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

true if the table did not already exist and was created; otherwise false .

Throws:

StorageException - If a storage service error occurred during the operation.

delete

public void delete()

Deletes the table from the storage service.

Throws:

StorageException - If a storage service error occurred during the operation.

delete

public void delete(TableRequestOptions options, OperationContext opContext)

Deletes the table from the storage service, using the specified request options and operation context.

Parameters:

options - A TableRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudTableClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

deleteIfExists

public boolean deleteIfExists()

Deletes the table from the storage service, if it exists.

Returns:

true if the table existed in the storage service and has been deleted; otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

deleteIfExists

public boolean deleteIfExists(TableRequestOptions options, OperationContext opContext)

Deletes the table from the storage service using the specified request options and operation context, if it exists.

Parameters:

options - A TableRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudTableClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

A value of true if the table existed in the storage service and has been deleted, otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

downloadPermissions

public TablePermissions downloadPermissions()

Downloads the permission settings for the table.

Returns:

A TablePermissions object that represents the container's permissions.

Throws:

StorageException - If a storage service error occurred.

downloadPermissions

public TablePermissions downloadPermissions(TableRequestOptions options, OperationContext opContext)

Downloads the permissions settings for the table using the specified request options and operation context.

Parameters:

options - A TableRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudTableClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

A TablePermissions object that represents the table's permissions.

Throws:

StorageException - If a storage service error occurred.

execute

public ArrayList execute(final TableBatchOperation batch)

Executes the specified batch operation on a table as an atomic operation. A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. Only one retrieve operation is allowed per batch. Note that the total payload of a batch operation is limited to 4MB.

This method invokes an Entity Group Transaction on the REST API to execute the specified batch operation on the table as an atomic unit, using the Table service endpoint and storage account credentials of this instance.

Parameters:

batch - The TableBatchOperation object representing the operations to execute on the table.

Returns:

A java.util.ArrayList of TableResult that contains the results, in order, of each TableOperation in the TableBatchOperation on the named table.

Throws:

StorageException - if an error occurs accessing the storage service, or the operation fails.

execute

public ArrayList execute(final TableBatchOperation batch, TableRequestOptions options, OperationContext opContext)

Executes the specified batch operation on a table as an atomic operation, using the specified TableRequestOptions and OperationContext. A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. Only one retrieve operation is allowed per batch. Note that the total payload of a batch operation is limited to 4MB.

This method invokes an Entity Group Transaction on the REST API to execute the specified batch operation on the table as an atomic unit, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

batch - The TableBatchOperation object representing the operations to execute on the table.
options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Returns:

A java.util.ArrayList of TableResult that contains the results, in order, of each TableOperation in the TableBatchOperation on the named table.

Throws:

StorageException - if an error occurs accessing the storage service, or the operation fails.

execute

public TableResult execute(final TableOperation operation)

Executes the operation on a table.

This method will invoke the Table Service REST API to execute the specified operation on the table, using the Table service endpoint and storage account credentials of this instance.

Parameters:

operation - The TableOperation object representing the operation to execute on the table.

Returns:

A TableResult containing the result of executing the TableOperation on the table.

Throws:

StorageException - if an error occurs accessing the storage service, or the operation fails.

execute

public TableResult execute(final TableOperation operation, final TableRequestOptions options, final OperationContext opContext)

Executes the operation on a table, using the specified TableRequestOptions and OperationContext.

This method will invoke the Table Service REST API to execute the specified operation on the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

operation - The TableOperation object representing the operation to execute on the table.
options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Returns:

A TableResult containing the result of executing the TableOperation on the table.

Throws:

StorageException - if an error occurs accessing the storage service, or the operation fails.

execute

public Iterable execute(final TableQuery query, final EntityResolver resolver)

Executes a query, applying the specified EntityResolver<T> to the result.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use.
resolver - An EntityResolver<T> instance which creates a projection of the table query result entities into the specified type R.

Returns:

A collection implementing the Iterable interface containing the projection into type R of the results of executing the query.

execute

public Iterable execute(final TableQuery query, final EntityResolver resolver, final TableRequestOptions options, final OperationContext opContext)

Executes a query, applying the specified EntityResolver<T> to the result, using the specified TableRequestOptions and OperationContext.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use.
resolver - An EntityResolver<T> instance which creates a projection of the table query result entities into the specified type R.
options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Returns:

A collection implementing the Iterable interface containing the projection into type R of the results of executing the query.

execute

public Iterable execute(final TableQuery query)

Executes a query.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use, specialized for a type T implementing TableEntity.

Returns:

A collection implementing the Iterable interface specialized for type T of the results of executing the query.

execute

public Iterable execute(final TableQuery query, final TableRequestOptions options, final OperationContext opContext)

Executes a query, using the specified TableRequestOptions and OperationContext.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use, specialized for a type T implementing TableEntity.
options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Returns:

A collection implementing the Iterable interface specialized for type T of the results of executing the query.

executeSegmented

public ResultSegment executeSegmented(final TableQuery query, final EntityResolver resolver, final ResultContinuation continuationToken)

Executes a query in segmented mode with the specified ResultContinuation continuation token, applying the EntityResolver<T> to the result. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use.
resolver - An EntityResolver<T> instance which creates a projection of the table query result entities into the specified type R.
continuationToken - A ResultContinuation object representing a continuation token from the server when the operation returns a partial result. Specify null on the initial call. Call the getContinuationToken() method on the result to obtain the ResultContinuation object to use in the next call to resume the query.

Returns:

A ResultSegment<T> containing the projection into type R of the results of executing the query.

Throws:

StorageException - if a storage service error occurred during the operation.

executeSegmented

public ResultSegment executeSegmented(final TableQuery query, final EntityResolver resolver, final ResultContinuation continuationToken, final TableRequestOptions options, final OperationContext opContext)

Executes a query in segmented mode with the specified ResultContinuation continuation token, using the specified TableRequestOptions and OperationContext, applying the EntityResolver<T> to the result. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use.
resolver - An EntityResolver<T> instance which creates a projection of the table query result entities into the specified type R.
continuationToken - A ResultContinuation object representing a continuation token from the server when the operation returns a partial result. Specify null on the initial call. Call the getContinuationToken() method on the result to obtain the ResultContinuation object to use in the next call to resume the query.
options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Returns:

A ResultSegment<T> containing the projection into type R of the results of executing the query.

Throws:

StorageException - if a storage service error occurred during the operation.

executeSegmented

public ResultSegment executeSegmented(final TableQuery query, final ResultContinuation continuationToken)

Executes a query in segmented mode with a ResultContinuation continuation token. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use, specialized for a type T implementing TableEntity.
continuationToken - A ResultContinuation object representing a continuation token from the server when the operation returns a partial result. Specify null on the initial call. Call the getContinuationToken() method on the result to obtain the ResultContinuation object to use in the next call to resume the query.

Returns:

A ResultSegment<T> specialized for type T of the results of executing the query.

Throws:

StorageException - if a storage service error occurred during the operation.

executeSegmented

public ResultSegment executeSegmented(final TableQuery query, final ResultContinuation continuationToken, final TableRequestOptions options, final OperationContext opContext)

Executes a query in segmented mode with a ResultContinuation continuation token, using the specified TableRequestOptions and OperationContext. Executing a query with allows the query to be resumed after returning partial results, using information returned by the server in the ResultSegment<T> object.

This method will invoke a Query Entities operation on the Table Service REST API to query the table, using the Table service endpoint and storage account credentials of this instance.

Use the TableRequestOptions to override execution options such as the timeout or retry policy for the operation.

Parameters:

query - A TableQuery<T> instance specifying the table to query and the query parameters to use, specialized for a type T implementing TableEntity.
continuationToken - A ResultContinuation object representing a continuation token from the server when the operation returns a partial result. Specify null on the initial call. Call the getContinuationToken() method on the result to obtain the ResultContinuation object to use in the next call to resume the query.
options - A TableRequestOptions object that specifies execution options such as retry policy and timeout settings for the operation. Specify null to use the request options specified on the CloudTableClient.
opContext - An OperationContext object for tracking the current operation. Specify null to safely ignore operation context.

Returns:

A ResultSegment<T> specialized for type T of the results of executing the query.

Throws:

StorageException - if a storage service error occurred during the operation.

exists

public boolean exists()

Returns a value that indicates whether the table exists in the storage service.

Returns:

true if the table exists in the storage service; otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

exists

public boolean exists(TableRequestOptions options, OperationContext opContext)

Returns a value that indicates whether the table exists in the storage service, using the specified request options and operation context.

Parameters:

options - A TableRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudTableClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

true if the table exists in the storage service, otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

generateSharedAccessSignature

public String generateSharedAccessSignature(final SharedAccessTablePolicy policy, final String accessPolicyIdentifier, final String startPartitionKey, final String startRowKey, final String endPartitionKey, final String endRowKey)

Creates a shared access signature for the table.

Parameters:

policy - A SharedAccessTablePolicy object which represents the access policy for the shared access signature.
accessPolicyIdentifier - A String which represents a table-level access policy.
startPartitionKey - A String which represents the starting partition key.
startRowKey - A String which represents the starting row key.
endPartitionKey - A String which represents the ending partition key.
endRowKey - A String which represents the ending end key.

Returns:

A String containing the shared access signature for the table.

Throws:

InvalidKeyException - If an invalid key was passed.
StorageException - If a storage service error occurred.
IllegalArgumentException - If an unexpected value is passed.

generateSharedAccessSignature

public String generateSharedAccessSignature(final SharedAccessTablePolicy policy, final String accessPolicyIdentifier, final String startPartitionKey, final String startRowKey, final String endPartitionKey, final String endRowKey, final IPRange ipRange, final SharedAccessProtocols protocols)

Creates a shared access signature for the table.

Parameters:

policy - A SharedAccessTablePolicy object which represents the access policy for the shared access signature.
accessPolicyIdentifier - A String which represents a table-level access policy.
startPartitionKey - A String which represents the starting partition key.
startRowKey - A String which represents the starting row key.
endPartitionKey - A String which represents the ending partition key.
endRowKey - A String which represents the ending end key.
ipRange - A IPRange object containing the range of allowed IP addresses.
protocols - A SharedAccessProtocols representing the allowed Internet protocols.

Returns:

A String containing the shared access signature for the table.

Throws:

InvalidKeyException - If an invalid key was passed.
StorageException - If a storage service error occurred.
IllegalArgumentException - If an unexpected value is passed.

getName

public String getName()

Gets the name of the table.

Returns:

A String object that represents the name of the table.

getServiceClient

public CloudTableClient getServiceClient()

Gets the table service client associated with this queue.

Returns:

A CloudTableClient object that represents the service client associated with this table.

getStorageUri

public final StorageUri getStorageUri()

Returns the list of URIs for all locations.

Returns:

A StorageUri that represents the list of URIs for all locations..

getUri

public URI getUri()

Gets the absolute URI for this table.

Returns:

A java.net.URI object that represents the URI for this table.

uploadPermissions

public void uploadPermissions(final TablePermissions permissions)

Uploads the table's permissions.

Parameters:

permissions - A TablePermissions object that represents the permissions to upload.

Throws:

StorageException - If a storage service error occurred.

uploadPermissions

public void uploadPermissions(final TablePermissions permissions, TableRequestOptions options, OperationContext opContext)

Uploads the table's permissions using the specified request options and operation context.

Parameters:

permissions - A TablePermissions object that represents the permissions to upload.
options - A TableRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudTableClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred.

Applies to