Aracılığıyla paylaş


DynamicTableEntity Class

public class DynamicTableEntity extends TableServiceEntity

A TableEntity type which allows callers direct access to the property map of the entity. This class extends TableServiceEntity to eliminate the use of reflection for serialization and deserialization.

Constructor Summary

Constructor Description
DynamicTableEntity()

Nullary default constructor.

DynamicTableEntity(final HashMap<String, EntityProperty> properties)

Constructs a DynamicTableEntity instance using the specified property map.

DynamicTableEntity(String partitionKey, String rowKey)

Initializes a new instance of the DynamicTableEntity class with the specified partition key and row key.

DynamicTableEntity(String partitionKey, String rowKey, final HashMap<String, EntityProperty> properties)

Initializes a new instance of the DynamicTableEntity class with the specified partition key and row key.

DynamicTableEntity(String partitionKey, String rowKey, String etag, final HashMap<String, EntityProperty> properties)

Initializes a new instance of the DynamicTableEntity class with the specified partition key and row key.

Method Summary

Modifier and Type Method and Description
HashMap<String, EntityProperty> getProperties()

Gets the property map for this DynamicTableEntity instance.

void readEntity(final HashMap<String, EntityProperty> properties, final OperationContext opContext)

Populates this DynamicTableEntity instance using the specified map of property names to EntityProperty data typed values.

void setProperties(final HashMap<String, EntityProperty> properties)

Sets the property map for this DynamicTableEntity instance.

HashMap<String, EntityProperty> writeEntity(final OperationContext opContext)

Returns the map of property names to EntityProperty data values from this DynamicTableEntity instance.

Inherited Members

Constructor Details

DynamicTableEntity

public DynamicTableEntity()

Nullary default constructor.

DynamicTableEntity

public DynamicTableEntity(final HashMap properties)

Constructs a DynamicTableEntity instance using the specified property map.

Parameters:

properties - A java.util.HashMap containing a map of String property names to EntityProperty data typed values to store in the new DynamicTableEntity.

DynamicTableEntity

public DynamicTableEntity(String partitionKey, String rowKey)

Initializes a new instance of the DynamicTableEntity class with the specified partition key and row key.

Parameters:

partitionKey - A String which represents the partition key of the DynamicTableEntity to be initialized.
rowKey - A String which represents the row key of the DynamicTableEntity to be initialized.

DynamicTableEntity

public DynamicTableEntity(String partitionKey, String rowKey, final HashMap properties)

Initializes a new instance of the DynamicTableEntity class with the specified partition key and row key.

Parameters:

partitionKey - A String which represents the partition key of the DynamicTableEntity to be initialized.
rowKey - A String which represents the row key of the DynamicTableEntity to be initialized.
properties - A java.util.HashMap containing a map of String property names to EntityProperty data typed values to store in the new DynamicTableEntity.

DynamicTableEntity

public DynamicTableEntity(String partitionKey, String rowKey, String etag, final HashMap properties)

Initializes a new instance of the DynamicTableEntity class with the specified partition key and row key.

Parameters:

partitionKey - A String which represents the partition key of the DynamicTableEntity to be initialized.
rowKey - A String which represents the row key of the DynamicTableEntity to be initialized.
etag - The ETag of the DynamicTableEntity to be initialized. This value is used to determine if the table entity has changed since it was last read from Microsoft Azure storage. The client cannot update this value on the service.
properties - A java.util.HashMap containing a map of String property names to EntityProperty data typed values to store in the new DynamicTableEntity.

Method Details

getProperties

public HashMap getProperties()

Gets the property map for this DynamicTableEntity instance.

Returns:

A java.util.HashMap containing the map of String property names to EntityProperty data typed values for this DynamicTableEntity instance.

readEntity

public void readEntity(final HashMap properties, final OperationContext opContext)

Populates this DynamicTableEntity instance using the specified map of property names to EntityProperty data typed values.

Overrides:

DynamicTableEntity.readEntity(final HashMap<String, EntityProperty> properties, final OperationContext opContext)

Parameters:

properties - The java.util.HashMap of String property names to EntityProperty data typed values to store in this DynamicTableEntity instance.
opContext - An OperationContext object used to track the execution of the operation.

setProperties

public void setProperties(final HashMap properties)

Sets the property map for this DynamicTableEntity instance.

Parameters:

properties - A java.util.HashMap containing the map of String property names to EntityProperty data typed values to set in this DynamicTableEntity instance.

writeEntity

public HashMap writeEntity(final OperationContext opContext)

Returns the map of property names to EntityProperty data values from this DynamicTableEntity instance.

Overrides:

DynamicTableEntity.writeEntity(final OperationContext opContext)

Parameters:

opContext - An OperationContext object used to track the execution of the operation.

Returns:

A java.util.HashMap containing the map of String property names to EntityProperty data typed values stored in this DynamicTableEntity instance.

Throws:

StorageException - if a Storage service error occurs.

Applies to