464 строки
97 KiB
YAML
464 строки
97 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.data.tables.TableClient"
|
|
fullName: "com.azure.data.tables.TableClient"
|
|
name: "TableClient"
|
|
nameWithType: "TableClient"
|
|
summary: "Provides a synchronous service client for accessing a table in the Azure Tables service."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public final class **TableClient**"
|
|
methods:
|
|
- uid: "com.azure.data.tables.TableClient.createEntity(com.azure.data.tables.models.TableEntity)"
|
|
fullName: "com.azure.data.tables.TableClient.createEntity(TableEntity entity)"
|
|
name: "createEntity(TableEntity entity)"
|
|
nameWithType: "TableClient.createEntity(TableEntity entity)"
|
|
summary: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to insert."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public void createEntity(TableEntity entity)"
|
|
desc: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table.\n\n**Code Samples**\n\nInserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table. Prints out the details of the created <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity tableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.createEntity(tableEntity);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was created.\", \"partitionKey\", \"rowKey\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.createEntityWithResponse(com.azure.data.tables.models.TableEntity,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.createEntityWithResponse(TableEntity entity, Duration timeout, Context context)"
|
|
name: "createEntityWithResponse(TableEntity entity, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.createEntityWithResponse(TableEntity entity, Duration timeout, Context context)"
|
|
summary: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to insert."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> createEntityWithResponse(TableEntity entity, Duration timeout, Context context)"
|
|
desc: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table.\n\n**Code Samples**\n\nInserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> and the created <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity myTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n Response<Void> response = tableClient.createEntityWithResponse(myTableEntity, Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. Table entity with partition key '%s' and row key\"\n + \" '%s' was created.\", response.getStatusCode(), \"partitionKey\", \"rowKey\");\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.data.tables.TableClient.createTable()"
|
|
fullName: "com.azure.data.tables.TableClient.createTable()"
|
|
name: "createTable()"
|
|
nameWithType: "TableClient.createTable()"
|
|
summary: "Creates the table within the Tables service."
|
|
syntax: "public TableItem createTable()"
|
|
desc: "Creates the table within the Tables service.\n\n**Code Samples**\n\nCreates a table. Prints out the details of the created table.\n\n```java\nTableItem tableItem = tableClient.createTable();\n\n System.out.printf(\"Table with name '%s' was created.\", tableItem.getName());\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.data.tables.models.TableItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableItem\"></xref> that represents the table."
|
|
type: "<xref href=\"com.azure.data.tables.models.TableItem?alt=com.azure.data.tables.models.TableItem&text=TableItem\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.data.tables.TableClient.createTableWithResponse(java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.createTableWithResponse(Duration timeout, Context context)"
|
|
name: "createTableWithResponse(Duration timeout, Context context)"
|
|
nameWithType: "TableClient.createTableWithResponse(Duration timeout, Context context)"
|
|
summary: "Creates the table within the Tables service."
|
|
parameters:
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<TableItem> createTableWithResponse(Duration timeout, Context context)"
|
|
desc: "Creates the table within the Tables service.\n\n**Code Samples**\n\nCreates a table. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> and the created table.\n\n```java\nResponse<TableItem> response = tableClient.createTableWithResponse(Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. Table with name '%s' was created.\",\n response.getStatusCode(), response.getValue().getName());\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> containing a <xref uid=\"com.azure.data.tables.models.TableItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableItem\"></xref> that represents the table."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.data.tables.models.TableItem?alt=com.azure.data.tables.models.TableItem&text=TableItem\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.data.tables.TableClient.deleteEntity(com.azure.data.tables.models.TableEntity)"
|
|
fullName: "com.azure.data.tables.TableClient.deleteEntity(TableEntity entity)"
|
|
name: "deleteEntity(TableEntity entity)"
|
|
nameWithType: "TableClient.deleteEntity(TableEntity entity)"
|
|
summary: "Deletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to delete."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public void deleteEntity(TableEntity entity)"
|
|
desc: "Deletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table.\n\n**Code Samples**\n\nDeletes a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table. Prints out the details of the deleted <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity myTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.deleteEntity(myTableEntity);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was created.\", \"partitionKey\", \"rowKey\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.deleteEntity(java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.data.tables.TableClient.deleteEntity(String partitionKey, String rowKey)"
|
|
name: "deleteEntity(String partitionKey, String rowKey)"
|
|
nameWithType: "TableClient.deleteEntity(String partitionKey, String rowKey)"
|
|
summary: "Deletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table."
|
|
parameters:
|
|
- description: "The partition key of the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "partitionKey"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The row key of the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "rowKey"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public void deleteEntity(String partitionKey, String rowKey)"
|
|
desc: "Deletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table.\n\n**Code Samples**\n\nDeletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table. Prints out the entity's `partitionKey` and `rowKey`.\n\n```java\ntableClient.deleteEntity(\"partitionKey\", \"rowKey\");\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was deleted.\", \"partitionKey\", \"rowKey\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.deleteEntityWithResponse(com.azure.data.tables.models.TableEntity,boolean,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.deleteEntityWithResponse(TableEntity entity, boolean ifUnchanged, Duration timeout, Context context)"
|
|
name: "deleteEntityWithResponse(TableEntity entity, boolean ifUnchanged, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.deleteEntityWithResponse(TableEntity entity, boolean ifUnchanged, Duration timeout, Context context)"
|
|
summary: "Deletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table."
|
|
parameters:
|
|
- description: "The table <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to delete."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "When true, the ETag of the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> must match the ETag of the\n <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> in the Table service. If the values do not match, the update will not occur and an\n exception will be thrown."
|
|
name: "ifUnchanged"
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> deleteEntityWithResponse(TableEntity entity, boolean ifUnchanged, Duration timeout, Context context)"
|
|
desc: "Deletes an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table.\n\n**Code Samples**\n\nDeletes a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> and the deleted <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity someTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n Response<Void> response = tableClient.deleteEntityWithResponse(someTableEntity, true, Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. Table entity with partition key '%s' and row key\"\n + \" '%s' was deleted.\", response.getStatusCode(), \"partitionKey\", \"rowKey\");\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.data.tables.TableClient.deleteTable()"
|
|
fullName: "com.azure.data.tables.TableClient.deleteTable()"
|
|
name: "deleteTable()"
|
|
nameWithType: "TableClient.deleteTable()"
|
|
summary: "Deletes the table within the Tables service."
|
|
syntax: "public void deleteTable()"
|
|
desc: "Deletes the table within the Tables service.\n\n**Code Samples**\n\nDeletes a table.\n\n```java\ntableClient.deleteTable();\n\n System.out.print(\"Table was deleted.\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.deleteTableWithResponse(java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.deleteTableWithResponse(Duration timeout, Context context)"
|
|
name: "deleteTableWithResponse(Duration timeout, Context context)"
|
|
nameWithType: "TableClient.deleteTableWithResponse(Duration timeout, Context context)"
|
|
summary: "Deletes the table within the Tables service."
|
|
parameters:
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> deleteTableWithResponse(Duration timeout, Context context)"
|
|
desc: "Deletes the table within the Tables service.\n\n**Code Samples**\n\nDeletes a table. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>.\n\n```java\nResponse<Void> response = tableClient.deleteTableWithResponse(Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Table was deleted successfully with status code: %d.\", response.getStatusCode());\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.data.tables.TableClient.generateSas(com.azure.data.tables.sas.TableSasSignatureValues)"
|
|
fullName: "com.azure.data.tables.TableClient.generateSas(TableSasSignatureValues tableSasSignatureValues)"
|
|
name: "generateSas(TableSasSignatureValues tableSasSignatureValues)"
|
|
nameWithType: "TableClient.generateSas(TableSasSignatureValues tableSasSignatureValues)"
|
|
summary: "Generates a service SAS for the table using the specified <xref uid=\"com.azure.data.tables.sas.TableSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableSasSignatureValues\"></xref>."
|
|
parameters:
|
|
- description: "<xref uid=\"com.azure.data.tables.sas.TableSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableSasSignatureValues\"></xref>."
|
|
name: "tableSasSignatureValues"
|
|
type: "<xref href=\"com.azure.data.tables.sas.TableSasSignatureValues?alt=com.azure.data.tables.sas.TableSasSignatureValues&text=TableSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public String generateSas(TableSasSignatureValues tableSasSignatureValues)"
|
|
desc: "Generates a service SAS for the table using the specified <xref uid=\"com.azure.data.tables.sas.TableSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableSasSignatureValues\"></xref>.\n\n**Note:** The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AzureNamedKeyCredential\"></xref>.\n\nSee <xref uid=\"com.azure.data.tables.sas.TableSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableSasSignatureValues\"></xref> for more information on how to construct a service SAS."
|
|
returns:
|
|
description: "A <code>String</code> representing the SAS query parameters."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.data.tables.TableClient.getAccessPolicies()"
|
|
fullName: "com.azure.data.tables.TableClient.getAccessPolicies()"
|
|
name: "getAccessPolicies()"
|
|
nameWithType: "TableClient.getAccessPolicies()"
|
|
summary: "Retrieves details about any stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> specified on the table that may be used with Shared Access Signatures."
|
|
syntax: "public TableAccessPolicies getAccessPolicies()"
|
|
desc: "Retrieves details about any stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> specified on the table that may be used with Shared Access Signatures.\n\nThis operation is only supported on Azure Storage endpoints.\n\n**Code Samples**\n\nGets a table's <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref>. Prints out the details of the retrieved <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref>.\n\n```java\nTableAccessPolicies accessPolicies = tableClient.getAccessPolicies();\n\n accessPolicies.getIdentifiers().forEach(signedIdentifier ->\n System.out.printf(\"Retrieved table access policy with id '%s'.\", signedIdentifier.getId()));\n```"
|
|
returns:
|
|
description: "The table's <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref>."
|
|
type: "<xref href=\"com.azure.data.tables.models.TableAccessPolicies?alt=com.azure.data.tables.models.TableAccessPolicies&text=TableAccessPolicies\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.data.tables.TableClient.getAccessPoliciesWithResponse(java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.getAccessPoliciesWithResponse(Duration timeout, Context context)"
|
|
name: "getAccessPoliciesWithResponse(Duration timeout, Context context)"
|
|
nameWithType: "TableClient.getAccessPoliciesWithResponse(Duration timeout, Context context)"
|
|
summary: "Retrieves details about any stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> specified on the table that may be used with Shared Access Signatures."
|
|
parameters:
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<TableAccessPolicies> getAccessPoliciesWithResponse(Duration timeout, Context context)"
|
|
desc: "Retrieves details about any stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> specified on the table that may be used with Shared Access Signatures.\n\nThis operation is only supported on Azure Storage endpoints.\n\n**Code Samples**\n\nGets a table's <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref>. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> and the retrieved <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref>.\n\n```java\nList<String> propertiesToSelect = new ArrayList<>();\n propertiesToSelect.add(\"name\");\n propertiesToSelect.add(\"lastname\");\n propertiesToSelect.add(\"age\");\n\n Response<TableAccessPolicies> response = tableClient.getAccessPoliciesWithResponse(Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. Retrieved table access policies with the following\"\n + \" IDs:\", response.getStatusCode());\n\n response.getValue().getIdentifiers().forEach(signedIdentifier ->\n System.out.printf(\"%n%s\", signedIdentifier.getId()));\n```"
|
|
returns:
|
|
description: "An <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> containing the table's <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.data.tables.models.TableAccessPolicies?alt=com.azure.data.tables.models.TableAccessPolicies&text=TableAccessPolicies\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.data.tables.TableClient.getAccountName()"
|
|
fullName: "com.azure.data.tables.TableClient.getAccountName()"
|
|
name: "getAccountName()"
|
|
nameWithType: "TableClient.getAccountName()"
|
|
summary: "Gets the name of the account containing the table."
|
|
syntax: "public String getAccountName()"
|
|
desc: "Gets the name of the account containing the table."
|
|
returns:
|
|
description: "The name of the account containing the table."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.data.tables.TableClient.getEntity(java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.data.tables.TableClient.getEntity(String partitionKey, String rowKey)"
|
|
name: "getEntity(String partitionKey, String rowKey)"
|
|
nameWithType: "TableClient.getEntity(String partitionKey, String rowKey)"
|
|
summary: "Gets a single <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table."
|
|
parameters:
|
|
- description: "The partition key of the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "partitionKey"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The partition key of the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "rowKey"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public TableEntity getEntity(String partitionKey, String rowKey)"
|
|
desc: "Gets a single <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table.\n\n**Code Samples**\n\nGets an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table. Prints out the details of the retrieved <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity tableEntity = tableClient.getEntity(\"partitionKey\", \"rowKey\");\n\n System.out.printf(\"Retrieved entity with partition key '%s' and row key '%s'.\", tableEntity.getPartitionKey(),\n tableEntity.getRowKey());\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.data.tables.TableClient.getEntityWithResponse(java.lang.String,java.lang.String,java.util.List<java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.getEntityWithResponse(String partitionKey, String rowKey, List<String> select, Duration timeout, Context context)"
|
|
name: "getEntityWithResponse(String partitionKey, String rowKey, List<String> select, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.getEntityWithResponse(String partitionKey, String rowKey, List<String> select, Duration timeout, Context context)"
|
|
summary: "Gets a single <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table."
|
|
parameters:
|
|
- description: "The partition key of the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "partitionKey"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The partition key of the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "rowKey"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "A list of properties to select on the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
name: "select"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<TableEntity> getEntityWithResponse(String partitionKey, String rowKey, List<String> select, Duration timeout, Context context)"
|
|
desc: "Gets a single <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> from the table.\n\n**Code Samples**\n\nGets an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> retrieved <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nList<String> propertiesToSelect = new ArrayList<>();\n propertiesToSelect.add(\"name\");\n propertiesToSelect.add(\"lastname\");\n propertiesToSelect.add(\"age\");\n\n Response<TableEntity> response = tableClient.getEntityWithResponse(\"partitionKey\", \"rowKey\", propertiesToSelect,\n Duration.ofSeconds(5), new Context(\"key1\", \"value1\"));\n\n TableEntity myTableEntity = response.getValue();\n\n System.out.printf(\"Response successful with status code: %d. Retrieved entity with partition key '%s', row key\"\n + \" '%s' and properties:\", response.getStatusCode(), myTableEntity.getPartitionKey(),\n myTableEntity.getRowKey());\n\n myTableEntity.getProperties().forEach((key, value) ->\n System.out.printf(\"%nName: '%s'. Value: '%s'.\", key, value));\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> containing the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.data.tables.TableClient.getServiceVersion()"
|
|
fullName: "com.azure.data.tables.TableClient.getServiceVersion()"
|
|
name: "getServiceVersion()"
|
|
nameWithType: "TableClient.getServiceVersion()"
|
|
summary: "Gets the REST API version used by this client."
|
|
syntax: "public TableServiceVersion getServiceVersion()"
|
|
desc: "Gets the REST API version used by this client."
|
|
returns:
|
|
description: "The REST API version used by this client."
|
|
type: "<xref href=\"com.azure.data.tables.TableServiceVersion?alt=com.azure.data.tables.TableServiceVersion&text=TableServiceVersion\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.data.tables.TableClient.getTableEndpoint()"
|
|
fullName: "com.azure.data.tables.TableClient.getTableEndpoint()"
|
|
name: "getTableEndpoint()"
|
|
nameWithType: "TableClient.getTableEndpoint()"
|
|
summary: "Gets the endpoint for this table."
|
|
syntax: "public String getTableEndpoint()"
|
|
desc: "Gets the endpoint for this table."
|
|
returns:
|
|
description: "The endpoint for this table."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.data.tables.TableClient.getTableName()"
|
|
fullName: "com.azure.data.tables.TableClient.getTableName()"
|
|
name: "getTableName()"
|
|
nameWithType: "TableClient.getTableName()"
|
|
summary: "Gets the name of the table."
|
|
syntax: "public String getTableName()"
|
|
desc: "Gets the name of the table."
|
|
returns:
|
|
description: "The name of the table."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.data.tables.TableClient.listEntities()"
|
|
fullName: "com.azure.data.tables.TableClient.listEntities()"
|
|
name: "listEntities()"
|
|
nameWithType: "TableClient.listEntities()"
|
|
summary: "Lists all <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> within the table."
|
|
syntax: "public PagedIterable<TableEntity> listEntities()"
|
|
desc: "Lists all <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> within the table.\n\n**Code Samples**\n\nLists all <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> on the table. Prints out the details of the retrieved <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref>.\n\n```java\nPagedIterable<TableEntity> tableEntities = tableClient.listEntities();\n\n tableEntities.forEach(tableEntity ->\n System.out.printf(\"Retrieved entity with partition key '%s' and row key '%s'.%n\",\n tableEntity.getPartitionKey(), tableEntity.getRowKey()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> containing all <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> within the table."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.data.tables.TableClient.listEntities(com.azure.data.tables.models.ListEntitiesOptions,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.listEntities(ListEntitiesOptions options, Duration timeout, Context context)"
|
|
name: "listEntities(ListEntitiesOptions options, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.listEntities(ListEntitiesOptions options, Duration timeout, Context context)"
|
|
summary: "Lists <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> using the parameters in the provided options."
|
|
parameters:
|
|
- description: "The <code>filter</code>, <code>select</code>, and <code>top</code> OData query options to apply to this\n operation."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.data.tables.models.ListEntitiesOptions?alt=com.azure.data.tables.models.ListEntitiesOptions&text=ListEntitiesOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public PagedIterable<TableEntity> listEntities(ListEntitiesOptions options, Duration timeout, Context context)"
|
|
desc: "Lists <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> using the parameters in the provided options.\n\nIf the `filter` parameter in the options is set, only <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> matching the filter will be returned. If the `select` parameter is set, only the properties included in the select parameter will be returned for each <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>. If the `top` parameter is set, the maximum number of returned <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> per page will be limited to that value.\n\n**Code Samples**\n\nLists all <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> on the table. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> and all the retrieved <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref>.\n\n```java\nList<String> propertiesToSelect = new ArrayList<>();\n propertiesToSelect.add(\"name\");\n propertiesToSelect.add(\"lastname\");\n propertiesToSelect.add(\"age\");\n\n ListEntitiesOptions listEntitiesOptions = new ListEntitiesOptions()\n .setTop(15)\n .setFilter(\"PartitionKey eq 'MyPartitionKey' and RowKey eq 'MyRowKey'\")\n .setSelect(propertiesToSelect);\n\n PagedIterable<TableEntity> myTableEntities = tableClient.listEntities(listEntitiesOptions,\n Duration.ofSeconds(5), null);\n\n myTableEntities.forEach(tableEntity -> {\n System.out.printf(\"Retrieved entity with partition key '%s', row key '%s' and properties:%n\",\n tableEntity.getPartitionKey(), tableEntity.getRowKey());\n\n tableEntity.getProperties().forEach((key, value) ->\n System.out.printf(\"Name: '%s'. Value: '%s'.%n\", key, value));\n });\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> containing matching <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> within the table."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.data.tables.TableClient.setAccessPolicies(java.util.List<com.azure.data.tables.models.TableSignedIdentifier>)"
|
|
fullName: "com.azure.data.tables.TableClient.setAccessPolicies(List<TableSignedIdentifier> tableSignedIdentifiers)"
|
|
name: "setAccessPolicies(List<TableSignedIdentifier> tableSignedIdentifiers)"
|
|
nameWithType: "TableClient.setAccessPolicies(List<TableSignedIdentifier> tableSignedIdentifiers)"
|
|
summary: "Sets stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> for the table that may be used with Shared Access Signatures."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableSignedIdentifier\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> for the table."
|
|
name: "tableSignedIdentifiers"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.data.tables.models.TableSignedIdentifier?alt=com.azure.data.tables.models.TableSignedIdentifier&text=TableSignedIdentifier\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public void setAccessPolicies(List<TableSignedIdentifier> tableSignedIdentifiers)"
|
|
desc: "Sets stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> for the table that may be used with Shared Access Signatures.\n\nThis operation is only supported on Azure Storage endpoints.\n\n**Code Samples**\n\nSets stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> on a table.\n\n```java\nList<TableSignedIdentifier> signedIdentifiers = new ArrayList<>();\n\n signedIdentifiers.add(new TableSignedIdentifier(\"id1\")\n .setAccessPolicy(new TableAccessPolicy()\n .setStartsOn(OffsetDateTime.of(2021, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.of(2022, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))\n .setPermissions(\"r\")));\n signedIdentifiers.add(new TableSignedIdentifier(\"id2\")\n .setAccessPolicy(new TableAccessPolicy()\n .setStartsOn(OffsetDateTime.of(2021, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.of(2021, 1, 2, 0, 0, 0, 0, ZoneOffset.UTC))\n .setPermissions(\"raud\")));\n\n tableClient.setAccessPolicies(signedIdentifiers);\n\n System.out.print(\"Set table access policies.\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.setAccessPoliciesWithResponse(java.util.List<com.azure.data.tables.models.TableSignedIdentifier>,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.setAccessPoliciesWithResponse(List<TableSignedIdentifier> tableSignedIdentifiers, Duration timeout, Context context)"
|
|
name: "setAccessPoliciesWithResponse(List<TableSignedIdentifier> tableSignedIdentifiers, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.setAccessPoliciesWithResponse(List<TableSignedIdentifier> tableSignedIdentifiers, Duration timeout, Context context)"
|
|
summary: "Sets stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> for the table that may be used with Shared Access Signatures."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableSignedIdentifier\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> for the table."
|
|
name: "tableSignedIdentifiers"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.data.tables.models.TableSignedIdentifier?alt=com.azure.data.tables.models.TableSignedIdentifier&text=TableSignedIdentifier\" data-throw-if-not-resolved=\"False\" />>"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> setAccessPoliciesWithResponse(List<TableSignedIdentifier> tableSignedIdentifiers, Duration timeout, Context context)"
|
|
desc: "Sets stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> for the table that may be used with Shared Access Signatures.\n\nThis operation is only supported on Azure Storage endpoints.\n\n**Code Samples**\n\nSets stored <xref uid=\"com.azure.data.tables.models.TableAccessPolicies\" data-throw-if-not-resolved=\"false\" data-raw-source=\"access policies\"></xref> on a table. Prints out details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>.\n\n```java\nList<TableSignedIdentifier> mySignedIdentifiers = new ArrayList<>();\n\n mySignedIdentifiers.add(new TableSignedIdentifier(\"id1\")\n .setAccessPolicy(new TableAccessPolicy()\n .setStartsOn(OffsetDateTime.of(2021, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.of(2022, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))\n .setPermissions(\"r\")));\n mySignedIdentifiers.add(new TableSignedIdentifier(\"id2\")\n .setAccessPolicy(new TableAccessPolicy()\n .setStartsOn(OffsetDateTime.of(2021, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC))\n .setExpiresOn(OffsetDateTime.of(2021, 1, 2, 0, 0, 0, 0, ZoneOffset.UTC))\n .setPermissions(\"raud\")));\n\n Response<Void> response = tableClient.setAccessPoliciesWithResponse(mySignedIdentifiers, Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Set table access policies successfully with status code: %d.\", response.getStatusCode());\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.data.tables.TableClient.submitTransaction(java.util.List<com.azure.data.tables.models.TableTransactionAction>)"
|
|
fullName: "com.azure.data.tables.TableClient.submitTransaction(List<TableTransactionAction> transactionActions)"
|
|
name: "submitTransaction(List<TableTransactionAction> transactionActions)"
|
|
nameWithType: "TableClient.submitTransaction(List<TableTransactionAction> transactionActions)"
|
|
summary: "Executes all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> within the list inside a transaction."
|
|
parameters:
|
|
- description: "A <xref uid=\"java.util.List\" data-throw-if-not-resolved=\"false\" data-raw-source=\"List\"></xref> of <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> to perform on\n <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> in a table."
|
|
name: "transactionActions"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.data.tables.models.TableTransactionAction?alt=com.azure.data.tables.models.TableTransactionAction&text=TableTransactionAction\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public TableTransactionResult submitTransaction(List<TableTransactionAction> transactionActions)"
|
|
desc: "Executes all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> within the list inside a transaction. When the call completes, either all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> in the transaction will succeed, or if a failure occurs, all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> in the transaction will be rolled back. <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Actions\"></xref> are executed sequentially. Each <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref> must operate on a distinct row key. Attempting to pass multiple <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> that share the same row key will cause an error.\n\n**Code Samples**\n\nSubmits a transaction that contains multiple <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> to be applied to <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> on a table. Prints out details of each <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref>'s <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>.\n\n```java\nList<TableTransactionAction> transactionActions = new ArrayList<>();\n\n String partitionKey = \"markers\";\n String firstEntityRowKey = \"m001\";\n String secondEntityRowKey = \"m002\";\n\n TableEntity firstEntity = new TableEntity(partitionKey, firstEntityRowKey)\n .addProperty(\"Type\", \"Dry\")\n .addProperty(\"Color\", \"Red\");\n\n transactionActions.add(new TableTransactionAction(TableTransactionActionType.CREATE, firstEntity));\n\n System.out.printf(\"Added create action for entity with partition key '%s', and row key '%s'.%n\", partitionKey,\n firstEntityRowKey);\n\n TableEntity secondEntity = new TableEntity(partitionKey, secondEntityRowKey)\n .addProperty(\"Type\", \"Wet\")\n .addProperty(\"Color\", \"Blue\");\n\n transactionActions.add(new TableTransactionAction(TableTransactionActionType.CREATE, secondEntity));\n\n System.out.printf(\"Added create action for entity with partition key '%s', and row key '%s'.%n\", partitionKey,\n secondEntityRowKey);\n\n TableTransactionResult tableTransactionResult = tableClient.submitTransaction(transactionActions);\n\n System.out.print(\"Submitted transaction. The ordered response status codes for the actions are:\");\n\n tableTransactionResult.getTransactionActionResponses().forEach(tableTransactionActionResponse ->\n System.out.printf(\"%n%d\", tableTransactionActionResponse.getStatusCode()));\n```\n\nShows how to handle a transaction with a failing <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref> via the provided <xref uid=\"com.azure.data.tables.models.TableTransactionFailedException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"exception\"></xref>, which contains the index of the first failing action in the transaction.\n\n```java\ntableAsyncClient.submitTransaction(transactionActions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .doOnError(TableTransactionFailedException.class, e -> {\n // If the transaction fails, the resulting exception contains the index of the first action that failed.\n int failedActionIndex = e.getFailedTransactionActionIndex();\n // You can use this index to modify the offending action or remove it from the list of actions to send\n // in the transaction, for example.\n transactionActions.remove(failedActionIndex);\n // And then retry submitting the transaction.\n })\n .subscribe(tableTransactionResult -> {\n System.out.print(\"Submitted transaction. The ordered response status codes for the actions are:\");\n\n tableTransactionResult.getTransactionActionResponses().forEach(tableTransactionActionResponse ->\n System.out.printf(\"%n%d\", tableTransactionActionResponse.getStatusCode()));\n });\n```"
|
|
returns:
|
|
description: "A <xref uid=\"java.util.List\" data-throw-if-not-resolved=\"false\" data-raw-source=\"List\"></xref> of <xref uid=\"com.azure.data.tables.models.TableTransactionActionResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"sub-responses\"></xref> that correspond to each\n <xref uid=\"com.azure.data.tables.models.TableTransactionResult\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref> in the transaction."
|
|
type: "<xref href=\"com.azure.data.tables.models.TableTransactionResult?alt=com.azure.data.tables.models.TableTransactionResult&text=TableTransactionResult\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.data.tables.TableClient.submitTransactionWithResponse(java.util.List<com.azure.data.tables.models.TableTransactionAction>,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.submitTransactionWithResponse(List<TableTransactionAction> transactionActions, Duration timeout, Context context)"
|
|
name: "submitTransactionWithResponse(List<TableTransactionAction> transactionActions, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.submitTransactionWithResponse(List<TableTransactionAction> transactionActions, Duration timeout, Context context)"
|
|
summary: "Executes all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> within the list inside a transaction."
|
|
parameters:
|
|
- description: "A <xref uid=\"java.util.List\" data-throw-if-not-resolved=\"false\" data-raw-source=\"List\"></xref> of <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"transaction actions\"></xref> to perform on\n <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> in a table."
|
|
name: "transactionActions"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.data.tables.models.TableTransactionAction?alt=com.azure.data.tables.models.TableTransactionAction&text=TableTransactionAction\" data-throw-if-not-resolved=\"False\" />>"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<TableTransactionResult> submitTransactionWithResponse(List<TableTransactionAction> transactionActions, Duration timeout, Context context)"
|
|
desc: "Executes all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> within the list inside a transaction. When the call completes, either all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> in the transaction will succeed, or if a failure occurs, all <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> in the transaction will be rolled back. <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Actions\"></xref> are executed sequentially. Each <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref> must operate on a distinct row key. Attempting to pass multiple <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> that share the same row key will cause an error.\n\n**Code Samples**\n\nSubmits a transaction that contains multiple <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"actions\"></xref> to be applied to <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> on a table. Prints out details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> for the operation, as well as each <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref>'s corresponding <xref uid=\"Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP\n response\"></xref>.\n\n```java\nList<TableTransactionAction> myTransactionActions = new ArrayList<>();\n\n String myPartitionKey = \"markers\";\n String myFirstEntityRowKey = \"m001\";\n String mySecondEntityRowKey = \"m002\";\n\n TableEntity myFirstEntity = new TableEntity(myPartitionKey, myFirstEntityRowKey)\n .addProperty(\"Type\", \"Dry\")\n .addProperty(\"Color\", \"Red\");\n\n myTransactionActions.add(new TableTransactionAction(TableTransactionActionType.CREATE, myFirstEntity));\n\n System.out.printf(\"Added create action for entity with partition key '%s', and row key '%s'.%n\", myPartitionKey,\n myFirstEntityRowKey);\n\n TableEntity mySecondEntity = new TableEntity(myPartitionKey, mySecondEntityRowKey)\n .addProperty(\"Type\", \"Wet\")\n .addProperty(\"Color\", \"Blue\");\n\n myTransactionActions.add(new TableTransactionAction(TableTransactionActionType.CREATE, mySecondEntity));\n\n System.out.printf(\"Added create action for entity with partition key '%s', and row key '%s'.%n\", myPartitionKey,\n mySecondEntityRowKey);\n\n Response<TableTransactionResult> response = tableClient.submitTransactionWithResponse(myTransactionActions,\n Duration.ofSeconds(5), new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. The ordered response status codes of the submitted\"\n + \" actions are:\", response.getStatusCode());\n\n response.getValue().getTransactionActionResponses().forEach(tableTransactionActionResponse ->\n System.out.printf(\"%n%d\", tableTransactionActionResponse.getStatusCode()));\n```\n\nShows how to handle a transaction with a failing <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref> via the provided <xref uid=\"com.azure.data.tables.models.TableTransactionFailedException\" data-throw-if-not-resolved=\"false\" data-raw-source=\"exception\"></xref>, which contains the index of the first failing action in the transaction.\n\n```java\ntry {\n Response<TableTransactionResult> transactionResultResponse =\n tableClient.submitTransactionWithResponse(myTransactionActions, Duration.ofSeconds(5),\n new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. The ordered response status codes of the\"\n + \" submitted actions are:\", transactionResultResponse.getStatusCode());\n\n transactionResultResponse.getValue().getTransactionActionResponses()\n .forEach(tableTransactionActionResponse ->\n System.out.printf(\"%n%d\", tableTransactionActionResponse.getStatusCode()));\n } catch (TableTransactionFailedException e) {\n // If the transaction fails, the resulting exception contains the index of the first action that failed.\n int failedActionIndex = e.getFailedTransactionActionIndex();\n // You can use this index to modify the offending action or remove it from the list of actions to send in\n // the transaction, for example.\n myTransactionActions.remove(failedActionIndex);\n // And then retry submitting the transaction.\n }\n```"
|
|
returns:
|
|
description: "An <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> produced for the transaction itself. The response's value will contain\n a <xref uid=\"java.util.List\" data-throw-if-not-resolved=\"false\" data-raw-source=\"List\"></xref> of <xref uid=\"com.azure.data.tables.models.TableTransactionActionResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"sub-responses\"></xref> that correspond to each\n <xref uid=\"com.azure.data.tables.models.TableTransactionAction\" data-throw-if-not-resolved=\"false\" data-raw-source=\"action\"></xref> in the transaction."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.data.tables.models.TableTransactionResult?alt=com.azure.data.tables.models.TableTransactionResult&text=TableTransactionResult\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.data.tables.TableClient.updateEntity(com.azure.data.tables.models.TableEntity)"
|
|
fullName: "com.azure.data.tables.TableClient.updateEntity(TableEntity entity)"
|
|
name: "updateEntity(TableEntity entity)"
|
|
nameWithType: "TableClient.updateEntity(TableEntity entity)"
|
|
summary: "Updates an existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> by merging the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> with the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to update."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public void updateEntity(TableEntity entity)"
|
|
desc: "Updates an existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> by merging the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> with the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n**Code Samples**\n\nUpdates a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table. Prints out the details of the updated <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity tableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.updateEntity(tableEntity);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was updated/created.\", \"partitionKey\",\n \"rowKey\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.updateEntity(com.azure.data.tables.models.TableEntity,com.azure.data.tables.models.TableEntityUpdateMode)"
|
|
fullName: "com.azure.data.tables.TableClient.updateEntity(TableEntity entity, TableEntityUpdateMode updateMode)"
|
|
name: "updateEntity(TableEntity entity, TableEntityUpdateMode updateMode)"
|
|
nameWithType: "TableClient.updateEntity(TableEntity entity, TableEntityUpdateMode updateMode)"
|
|
summary: "Updates an existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> using the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref>."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to update."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type of update to perform."
|
|
name: "updateMode"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntityUpdateMode?alt=com.azure.data.tables.models.TableEntityUpdateMode&text=TableEntityUpdateMode\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public void updateEntity(TableEntity entity, TableEntityUpdateMode updateMode)"
|
|
desc: "Updates an existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> using the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref>. The default <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.MERGE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MERGE\"></xref>.\n\nWhen the <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.MERGE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MERGE\"></xref>, the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>'s properties will be merged into the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>. When the <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.REPLACE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"REPLACE\"></xref>, the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>'s properties will completely replace those in the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n**Code Samples**\n\nUpdates a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table with the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref>. Prints out the details of the updated <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity myTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.updateEntity(myTableEntity, TableEntityUpdateMode.REPLACE);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was updated/created.\", \"partitionKey\",\n \"rowKey\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.updateEntityWithResponse(com.azure.data.tables.models.TableEntity,com.azure.data.tables.models.TableEntityUpdateMode,boolean,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.updateEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, boolean ifUnchanged, Duration timeout, Context context)"
|
|
name: "updateEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, boolean ifUnchanged, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.updateEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, boolean ifUnchanged, Duration timeout, Context context)"
|
|
summary: "Updates an existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> using the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref>."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to update."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type of update to perform."
|
|
name: "updateMode"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntityUpdateMode?alt=com.azure.data.tables.models.TableEntityUpdateMode&text=TableEntityUpdateMode\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "When true, the ETag of the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> must match the ETag of the\n <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> in the Table service. If the values do not match, the update will not occur and an\n exception will be thrown."
|
|
name: "ifUnchanged"
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> updateEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, boolean ifUnchanged, Duration timeout, Context context)"
|
|
desc: "Updates an existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> using the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref>. The default <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.MERGE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MERGE\"></xref>.\n\nWhen the <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.MERGE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MERGE\"></xref>, the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>'s properties will be merged into the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>. When the <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.REPLACE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"REPLACE\"></xref>, the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>'s properties will completely replace those in the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n**Code Samples**\n\nUpdates a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> on the table with the specified <xref uid=\"TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update\n mode\"></xref> if the `ETags` on both <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entities\"></xref> match. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> updated <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity someTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n Response<Void> response = tableClient.updateEntityWithResponse(someTableEntity, TableEntityUpdateMode.REPLACE,\n true, Duration.ofSeconds(5), new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. Table entity with partition key '%s' and row key\"\n + \" '%s' was updated.\", response.getStatusCode(), \"partitionKey\", \"rowKey\");\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.data.tables.TableClient.upsertEntity(com.azure.data.tables.models.TableEntity)"
|
|
fullName: "com.azure.data.tables.TableClient.upsertEntity(TableEntity entity)"
|
|
name: "upsertEntity(TableEntity entity)"
|
|
nameWithType: "TableClient.upsertEntity(TableEntity entity)"
|
|
summary: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table if it does not exist, or merges the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> with the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> otherwise."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to upsert."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public void upsertEntity(TableEntity entity)"
|
|
desc: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table if it does not exist, or merges the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> with the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> otherwise.\n\n**Code Samples**\n\nUpserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table. Prints out the details of the upserted <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity tableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.upsertEntity(tableEntity);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was updated/created.\", \"partitionKey\",\n \"rowKey\");\n```"
|
|
- uid: "com.azure.data.tables.TableClient.upsertEntityWithResponse(com.azure.data.tables.models.TableEntity,com.azure.data.tables.models.TableEntityUpdateMode,java.time.Duration,com.azure.core.util.Context)"
|
|
fullName: "com.azure.data.tables.TableClient.upsertEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, Duration timeout, Context context)"
|
|
name: "upsertEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, Duration timeout, Context context)"
|
|
nameWithType: "TableClient.upsertEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, Duration timeout, Context context)"
|
|
summary: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table if it does not exist, or updates the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> using the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> otherwise."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> to upsert."
|
|
name: "entity"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntity?alt=com.azure.data.tables.models.TableEntity&text=TableEntity\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type of update to perform if the <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> already exits."
|
|
name: "updateMode"
|
|
type: "<xref href=\"com.azure.data.tables.models.TableEntityUpdateMode?alt=com.azure.data.tables.models.TableEntityUpdateMode&text=TableEntityUpdateMode\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
|
|
name: "timeout"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- description: "Additional <xref uid=\"com.azure.core.util.Context\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Context\"></xref> that is passed through the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP pipeline\"></xref> during\n the service call."
|
|
name: "context"
|
|
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Response<Void> upsertEntityWithResponse(TableEntity entity, TableEntityUpdateMode updateMode, Duration timeout, Context context)"
|
|
desc: "Inserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table if it does not exist, or updates the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> using the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> otherwise. The default <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.MERGE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MERGE\"></xref>.\n\nWhen the <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.MERGE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MERGE\"></xref>, the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>'s properties will be merged into the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>. When the <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> is <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode.REPLACE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"REPLACE\"></xref>, the provided <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>'s properties will completely replace those in the existing <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n**Code Samples**\n\nUpserts an <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> into the table with the specified <xref uid=\"com.azure.data.tables.models.TableEntityUpdateMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"update mode\"></xref> if said <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref> already exists. Prints out the details of the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> and the upserted <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"entity\"></xref>.\n\n```java\nTableEntity myTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n Response<Void> response = tableClient.upsertEntityWithResponse(myTableEntity, TableEntityUpdateMode.REPLACE,\n Duration.ofSeconds(5), new Context(\"key1\", \"value1\"));\n\n System.out.printf(\"Response successful with status code: %d. Table entity with partition key '%s' and row key\"\n + \" '%s' was updated/created.\", response.getStatusCode(), \"partitionKey\", \"rowKey\");\n```"
|
|
returns:
|
|
description: "The <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref>."
|
|
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
type: "class"
|
|
desc: "Provides a synchronous service client for accessing a table in the Azure Tables service.\n\n## Overview ##\n\nThe client encapsulates the URL for the table within the Tables service endpoint, the name of the table, and the credentials for accessing the storage or CosmosDB table API account. It provides synchronous methods to create and delete the table itself, as well as methods to create, upsert, update, delete, list, and get entities within the table. These methods invoke REST API operations to make the requests and obtain the results that are returned.\n\n## Getting Started ##\n\nAuthenticating and building instances of this client are handled by <xref uid=\"com.azure.data.tables.TableClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableClientBuilder\"></xref>. This sample shows how to authenticate and build a TableClient instance using the <xref uid=\"com.azure.data.tables.TableClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableClientBuilder\"></xref> and a connection string.\n\n```java\nTableClient tableClient = new TableClientBuilder()\n .connectionString(\"connectionstring\")\n .tableName(\"myTable\")\n .buildClient();\n```\n\nFor more information on building and authenticating, see the <xref uid=\"com.azure.data.tables.TableClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableClientBuilder\"></xref> documentation.\n\nThe following code samples provide examples of common operations preformed with this client.\n\n--------------------\n\n### Create a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> ###\n\nThe <xref uid=\"com.azure.data.tables.TableClient.createEntity(com.azure.data.tables.models.TableEntity)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"createEntity\"></xref> method can be used to create a table entity within a table in your Azure Storage or Azure Cosmos account.\n\nThe sample below creates a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> with a partition key of \"partitionKey\" and a row key of \"rowKey\".\n\n```java\nTableEntity tableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.createEntity(tableEntity);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was created.\", \"partitionKey\", \"rowKey\");\n```\n\n***Note:** for asynchronous sample, refer to <xref uid=\"com.azure.data.tables.TableAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"the asynchronous client\"></xref>.* \n\n--------------------\n\n### Retrieve a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> ###\n\nThe <xref uid=\"com.azure.data.tables.TableClient.getEntity(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"getEntity\"></xref> method can be used to retrieve a table entity within a table in your Azure Storage or Azure Cosmos account.\n\nThe sample below retrieves a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> with a partition key of \"partitionKey\" and a row key of \"rowKey\".\n\n```java\nTableEntity tableEntity = tableClient.getEntity(\"partitionKey\", \"rowKey\");\n\n System.out.printf(\"Retrieved entity with partition key '%s' and row key '%s'.\", tableEntity.getPartitionKey(),\n tableEntity.getRowKey());\n```\n\n***Note:** for asynchronous sample, refer to <xref uid=\"com.azure.data.tables.TableAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"the asynchronous client\"></xref>.* \n\n--------------------\n\n### Update a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> ###\n\nThe <xref uid=\"com.azure.data.tables.TableClient.updateEntity(com.azure.data.tables.models.TableEntity)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"updateEntity\"></xref> method can be used to update a table entity within a table in your Azure Storage or Azure Cosmos account.\n\nThe sample below updates a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> with a partition key of \"partitionKey\" and a row key of \"rowKey\", adding a new property with a key of \"Property\" and a value of \"Value\".\n\n```java\nTableEntity myTableEntity = new TableEntity(\"partitionKey\", \"rowKey\")\n .addProperty(\"Property\", \"Value\");\n\n tableClient.updateEntity(myTableEntity, TableEntityUpdateMode.REPLACE);\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was updated/created.\", \"partitionKey\",\n \"rowKey\");\n```\n\n***Note:** for asynchronous sample, refer to <xref uid=\"com.azure.data.tables.TableAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"the asynchronous client\"></xref>.* \n\n--------------------\n\n### List <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntities\"></xref> ###\n\nThe <xref uid=\"com.azure.data.tables.TableClient.listEntities()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"listEntities\"></xref> method can be used to list the entities within a table in your Azure Storage or Azure Cosmos account.\n\nThe following sample lists all <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntities\"></xref> within the table without filtering out any entities.\n\n```java\nPagedIterable<TableEntity> tableEntities = tableClient.listEntities();\n\n tableEntities.forEach(tableEntity ->\n System.out.printf(\"Retrieved entity with partition key '%s' and row key '%s'.%n\",\n tableEntity.getPartitionKey(), tableEntity.getRowKey()));\n```\n\n**List <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntities\"></xref> with filtering and selecting**\n\nThe following sample lists <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntities\"></xref> within the table, filtering out any entities that do not have a partition key of \"partitionKey\" and a row key of \"rowKey\" and only selects the \"name\", \"lastname\", and \"age\" properties.\n\n```java\nList<String> propertiesToSelect = new ArrayList<>();\n propertiesToSelect.add(\"name\");\n propertiesToSelect.add(\"lastname\");\n propertiesToSelect.add(\"age\");\n\n ListEntitiesOptions listEntitiesOptions = new ListEntitiesOptions()\n .setTop(15)\n .setFilter(\"PartitionKey eq 'MyPartitionKey' and RowKey eq 'MyRowKey'\")\n .setSelect(propertiesToSelect);\n\n PagedIterable<TableEntity> myTableEntities = tableClient.listEntities(listEntitiesOptions,\n Duration.ofSeconds(5), null);\n\n myTableEntities.forEach(tableEntity -> {\n System.out.printf(\"Retrieved entity with partition key '%s', row key '%s' and properties:%n\",\n tableEntity.getPartitionKey(), tableEntity.getRowKey());\n\n tableEntity.getProperties().forEach((key, value) ->\n System.out.printf(\"Name: '%s'. Value: '%s'.%n\", key, value));\n });\n```\n\n***Note:** for asynchronous sample, refer to <xref uid=\"com.azure.data.tables.TableAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"the asynchronous client\"></xref>.* \n\n--------------------\n\n### Delete a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> ###\n\nThe <xref uid=\"com.azure.data.tables.TableClient.deleteEntity(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleteEntity\"></xref> method can be used to delete a table entity within a table in your Azure Storage or Azure Cosmos account.\n\nThe sample below deletes a <xref uid=\"com.azure.data.tables.models.TableEntity\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TableEntity\"></xref> with a partition key of \"partitionKey\" and a row key of \"rowKey\".\n\n```java\ntableClient.deleteEntity(\"partitionKey\", \"rowKey\");\n\n System.out.printf(\"Table entity with partition key '%s' and row key: '%s' was deleted.\", \"partitionKey\", \"rowKey\");\n```\n\n***Note:** for asynchronous sample, refer to <xref uid=\"com.azure.data.tables.TableAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"the asynchronous client\"></xref>.* \n\n--------------------\n\n### Submit a transactional batch ###\n\nThe <xref uid=\"com.azure.data.tables.TableClient.submitTransaction(java.util.List<com.azure.data.tables.models.TableTransactionAction>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"submitTransaction\"></xref> method can be used to submit a transactional batch of actions to perform on the table in your Azure Storage or Azure Cosmos account.\n\nThe following sample shows how to prepare and submit a transactional batch with multiple actions.\n\n```java\nList<TableTransactionAction> transactionActions = new ArrayList<>();\n\n String partitionKey = \"markers\";\n String firstEntityRowKey = \"m001\";\n String secondEntityRowKey = \"m002\";\n\n TableEntity firstEntity = new TableEntity(partitionKey, firstEntityRowKey)\n .addProperty(\"Type\", \"Dry\")\n .addProperty(\"Color\", \"Red\");\n\n transactionActions.add(new TableTransactionAction(TableTransactionActionType.CREATE, firstEntity));\n\n System.out.printf(\"Added create action for entity with partition key '%s', and row key '%s'.%n\", partitionKey,\n firstEntityRowKey);\n\n TableEntity secondEntity = new TableEntity(partitionKey, secondEntityRowKey)\n .addProperty(\"Type\", \"Wet\")\n .addProperty(\"Color\", \"Blue\");\n\n transactionActions.add(new TableTransactionAction(TableTransactionActionType.CREATE, secondEntity));\n\n System.out.printf(\"Added create action for entity with partition key '%s', and row key '%s'.%n\", partitionKey,\n secondEntityRowKey);\n\n TableTransactionResult tableTransactionResult = tableClient.submitTransaction(transactionActions);\n\n System.out.print(\"Submitted transaction. The ordered response status codes for the actions are:\");\n\n tableTransactionResult.getTransactionActionResponses().forEach(tableTransactionActionResponse ->\n System.out.printf(\"%n%d\", tableTransactionActionResponse.getStatusCode()));\n```\n\n***Note:** for asynchronous sample, refer to <xref uid=\"com.azure.data.tables.TableAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"the asynchronous client\"></xref>.* "
|
|
metadata: {}
|
|
package: "com.azure.data.tables"
|
|
artifact: com.azure:azure-data-tables:12.4.6
|