public final class TableEntity extends Object
TableEntity can be used directly when interacting with the Tables service, with methods on the
TableClient and TableAsyncClient classes that accept and
return TableEntity instances. After creating an instance, call the TableEntity.addProperty(String, Object) or
TableEntity.setProperties(Map) methods to add properties to the entity. When retrieving an entity from the service, call
the TableEntity.getProperty(String) or TableEntity.getProperties() methods to access the entity's properties.| Constructor and Description |
|---|
TableEntity(String partitionKey,
String rowKey)
Construct a new
TableEntity. |
| Modifier and Type | Method and Description |
|---|---|
TableEntity |
addProperty(String key,
Object value)
Adds a single property to the entity's properties map.
|
String |
getETag()
Gets the entity's eTag.
|
String |
getPartitionKey()
Gets the entity's partition key.
|
Map<String,Object> |
getProperties()
Gets the map of the entity's properties.
|
Object |
getProperty(String key)
Gets a single property from the entity's properties map.
|
String |
getRowKey()
Gets the entity's row key.
|
OffsetDateTime |
getTimestamp()
Gets the entity's timestamp.
|
TableEntity |
setProperties(Map<String,Object> properties)
Sets the contents of the provided map to the entity's properties map.
|
public Object getProperty(String key)
TableEntity.addProperty(String, Object) or
TableEntity.setProperties(Map) will be returned from this method.key - Key for the property.NullPointerException - if key is null.public Map<String,Object> getProperties()
TableEntity.addProperty(String, Object) or
TableEntity.setProperties(Map) will be returned from this method.public TableEntity addProperty(String key, Object value)
key - Key for the property.value - Value of the property.TableEntity.NullPointerException - if key is null.public TableEntity setProperties(Map<String,Object> properties)
properties - The map of properties to set.TableEntity.NullPointerException - if properties is null.public String getRowKey()
public String getPartitionKey()
public OffsetDateTime getTimestamp()
TableEntity instances will not have a
timestamp, but a timestamp will be present on any TableEntity returned from the service.public String getETag()
TableEntity instances will not have an eTag, but
an eTag will be present on any TableEntity returned from the service.Copyright © 2021 Microsoft Corporation. All rights reserved.