public class TableClient extends Object
Modifier and Type | Method and Description |
---|---|
void |
create()
creates new table with the name of this client
|
void |
create(Duration timeout)
creates new table with the name of this client
|
void |
createEntity(TableEntity tableEntity)
insert a TableEntity with the given properties and return that TableEntity.
|
void |
createEntity(TableEntity tableEntity,
Duration timeout)
insert a TableEntity with the given properties and return that TableEntity.
|
com.azure.core.http.rest.Response<Void> |
createEntityWithResponse(TableEntity tableEntity,
Duration timeout,
com.azure.core.util.Context context)
insert a TableEntity with the given properties and return that TableEntity.
|
com.azure.core.http.rest.Response<Void> |
createWithResponse(Duration timeout,
com.azure.core.util.Context context)
creates a new table with the name of this client
|
void |
delete()
deletes the table with the name of this client
|
void |
delete(Duration timeout)
deletes the table with the name of this client
|
void |
deleteEntity(String partitionKey,
String rowKey)
deletes the entity with the given partition key and row key
|
void |
deleteEntity(String partitionKey,
String rowKey,
String eTag)
deletes the entity with the given partition key and row key
|
void |
deleteEntity(String partitionKey,
String rowKey,
String eTag,
Duration timeout)
deletes the given entity
|
com.azure.core.http.rest.Response<Void> |
deleteEntityWithResponse(String partitionKey,
String rowKey,
String eTag,
Duration timeout,
com.azure.core.util.Context context)
deletes the given entity
|
com.azure.core.http.rest.Response<Void> |
deleteWithResponse(Duration timeout,
com.azure.core.util.Context context)
deletes the table with the name of this client
|
String |
getAccountName()
returns the account for this table
|
TablesServiceVersion |
getApiVersion()
returns the version
|
TableEntity |
getEntity(String partitionKey,
String rowKey)
gets the entity which fits the given criteria
|
com.azure.core.http.rest.Response<TableEntity> |
getEntityWithResponse(String partitionKey,
String rowKey,
com.azure.core.util.Context context)
gets the entity which fits the given criteria
|
String |
getTableName()
returns the table name associated with the client*
|
String |
getTableUrl()
returns Url of this table
|
com.azure.core.http.rest.PagedIterable<TableEntity> |
listEntities()
Queries and returns all entities in the given table
|
com.azure.core.http.rest.PagedIterable<TableEntity> |
listEntities(ListEntitiesOptions options)
Queries and returns entities in the given table using the odata QueryOptions
|
com.azure.core.http.rest.PagedIterable<TableEntity> |
listEntities(ListEntitiesOptions options,
Duration timeout)
Queries and returns entities in the given table using the odata QueryOptions
|
void |
updateEntity(TableEntity entity)
if UpdateMode is MERGE, merges or fails if the entity doesn't exist.
|
void |
updateEntity(TableEntity entity,
boolean ifUnchanged,
UpdateMode updateMode)
if UpdateMode is MERGE, merges or fails if the entity doesn't exist.
|
void |
updateEntity(TableEntity entity,
boolean ifUnchanged,
UpdateMode updateMode,
Duration timeout)
if UpdateMode is MERGE, merges or fails if the entity doesn't exist.
|
void |
updateEntity(TableEntity entity,
UpdateMode updateMode)
if UpdateMode is MERGE, merges or fails if the entity doesn't exist.
|
com.azure.core.http.rest.Response<Void> |
updateEntityWithResponse(TableEntity entity,
boolean ifUnchanged,
UpdateMode updateMode,
Duration timeout,
com.azure.core.util.Context context)
if UpdateMode is MERGE, merges or fails if the entity doesn't exist.
|
void |
upsertEntity(TableEntity entity)
based on Mode it either inserts or merges if exists or inserts or merges if exists
|
void |
upsertEntity(TableEntity entity,
UpdateMode updateMode)
based on Mode it either inserts or merges if exists or inserts or merges if exists
|
void |
upsertEntity(TableEntity entity,
UpdateMode updateMode,
Duration timeout)
based on Mode it either inserts or merges if exists or inserts or merges if exists
|
com.azure.core.http.rest.Response<Void> |
upsertEntityWithResponse(TableEntity entity,
UpdateMode updateMode,
Duration timeout,
com.azure.core.util.Context context)
based on Mode it either inserts or merges if exists or inserts or merges if exists
|
public String getTableName()
public String getAccountName()
public String getTableUrl()
public TablesServiceVersion getApiVersion()
public void create()
public void create(Duration timeout)
timeout
- Duration to wait for operation to complete.public com.azure.core.http.rest.Response<Void> createWithResponse(Duration timeout, com.azure.core.util.Context context)
timeout
- Duration to wait for operation to complete.context
- Additional context that is passed through the HTTP pipeline during the service call.public void createEntity(TableEntity tableEntity)
tableEntity
- the entity to addpublic void createEntity(TableEntity tableEntity, Duration timeout)
tableEntity
- the entity to addtimeout
- max time for query to execute before erroring outpublic com.azure.core.http.rest.Response<Void> createEntityWithResponse(TableEntity tableEntity, Duration timeout, com.azure.core.util.Context context)
tableEntity
- the entity to addtimeout
- max time for query to execute before erroring outcontext
- the context of the querypublic void upsertEntity(TableEntity entity)
entity
- entity to upsertpublic void upsertEntity(TableEntity entity, UpdateMode updateMode)
updateMode
- type of upsertentity
- entity to upsertpublic void upsertEntity(TableEntity entity, UpdateMode updateMode, Duration timeout)
updateMode
- type of upsertentity
- entity to upserttimeout
- max time for query to execute before erroring outpublic com.azure.core.http.rest.Response<Void> upsertEntityWithResponse(TableEntity entity, UpdateMode updateMode, Duration timeout, com.azure.core.util.Context context)
updateMode
- type of upsertentity
- entity to upserttimeout
- max time for query to execute before erroring outcontext
- the context of the querypublic void updateEntity(TableEntity entity)
entity
- the entity to updatepublic void updateEntity(TableEntity entity, UpdateMode updateMode)
updateMode
- which type of update to executeentity
- the entity to updatepublic void updateEntity(TableEntity entity, boolean ifUnchanged, UpdateMode updateMode)
updateMode
- which type of update to executeentity
- the entity to updateifUnchanged
- if the eTag of the entity must match the entity in the service or notpublic void updateEntity(TableEntity entity, boolean ifUnchanged, UpdateMode updateMode, Duration timeout)
updateMode
- which type of update to executeentity
- the entity to updateifUnchanged
- if the eTag of the entity must match the entity in the service or nottimeout
- max time for query to execute before erroring outpublic com.azure.core.http.rest.Response<Void> updateEntityWithResponse(TableEntity entity, boolean ifUnchanged, UpdateMode updateMode, Duration timeout, com.azure.core.util.Context context)
updateMode
- which type of update to executeentity
- the entity to updateifUnchanged
- if the eTag of the entity must match the entity in the service or nottimeout
- max time for query to execute before erroring outcontext
- the context of the querypublic void delete()
public void delete(Duration timeout)
timeout
- Duration to wait for operation to complete.public com.azure.core.http.rest.Response<Void> deleteWithResponse(Duration timeout, com.azure.core.util.Context context)
timeout
- Duration to wait for operation to complete.context
- Additional context that is passed through the HTTP pipeline during the service call.public void deleteEntity(String partitionKey, String rowKey)
partitionKey
- the partition keyrowKey
- the row keypublic void deleteEntity(String partitionKey, String rowKey, String eTag)
partitionKey
- the partition keyrowKey
- the row keyeTag
- the eTag of the entity, the delete will only occur if this matches the entity in the servicepublic void deleteEntity(String partitionKey, String rowKey, String eTag, Duration timeout)
partitionKey
- the partition keyrowKey
- the row keyeTag
- the eTag of the entity, the delete will only occur if this matches the entity in the servicetimeout
- max time for query to execute before erroring outpublic com.azure.core.http.rest.Response<Void> deleteEntityWithResponse(String partitionKey, String rowKey, String eTag, Duration timeout, com.azure.core.util.Context context)
partitionKey
- the partition keyrowKey
- the row keyeTag
- the eTag of the entity, the delete will only occur if this matches the entity in the servicetimeout
- max time for query to execute before erroring outcontext
- the context of the querypublic com.azure.core.http.rest.PagedIterable<TableEntity> listEntities()
public com.azure.core.http.rest.PagedIterable<TableEntity> listEntities(ListEntitiesOptions options)
options
- the odata query objectpublic com.azure.core.http.rest.PagedIterable<TableEntity> listEntities(ListEntitiesOptions options, Duration timeout)
options
- the odata query objecttimeout
- max time for query to execute before erroring outpublic TableEntity getEntity(String partitionKey, String rowKey)
partitionKey
- the partition key of the entityrowKey
- the row key of the entitypublic com.azure.core.http.rest.Response<TableEntity> getEntityWithResponse(String partitionKey, String rowKey, com.azure.core.util.Context context)
partitionKey
- the partition key of the entityrowKey
- the row key of the entitycontext
- the context of the queryCopyright © 2020 Microsoft Corporation. All rights reserved.