TableRequestOptions Class

  • java.lang.Object
    • RequestOptions
      • com.microsoft.azure.storage.table.TableRequestOptions

public class TableRequestOptions extends RequestOptions

Represents a set of timeout, payload format, and retry policy options that may be specified for a table operation request.

Constructor Summary

Constructor Description
TableRequestOptions()

Creates an instance of the

TableRequestOptions(final TableRequestOptions other)

Creates an instance of the class by copying values from another instance.

Method Summary

Modifier and Type Method and Description
void applyDefaults(final TableRequestOptions modifiedOptions)

Applies defaults to the options passed in.

void assertNoEncryptionPolicyOrStrictMode()

Assert that if validation is on, an encryption policy is not specified.

void assertPolicyIfRequired()

Assert that if strict mode is on, an encryption policy is specified.

void clearEncryption()

Clears the encryption properties on this TableRequestOptions object. Useful for operations for which encryption does not make sense, such as CreateTable.

Boolean getDateBackwardCompatibility()

Gets whether the client should look to correct Date values stored on a TableEntity that may have been written using versions of this library prior to 2.0.0, see setDateBackwardCompatibility(Boolean dateBackwardCompatibility).

See here for more details.

TableEncryptionPolicy getEncryptionPolicy()

Gets the encryption policy to use for this request. For more information about the encryption policy defaults, see setEncryptionPolicy(TableEncryptionPolicy encryptionPolicy).

TableRequestOptions.EncryptionResolver getEncryptionResolver()

Gets the interface that contains a function which is used to get the value indicating whether a property should be encrypted or not given the partition key, row key, and the property name. For more information about the TableRequestOptions.EncryptionResolver defaults, see setEncryptionResolver(EncryptionResolver encryptionResolver).

TableRequestOptions.PropertyResolver getPropertyResolver()

Gets the interface that contains a function which is used to get the EdmType for an entity property given the partition key, row, key, and the property name. For more information about the TableRequestOptions.PropertyResolver defaults, see setPropertyResolver(PropertyResolver propertyResolver).

TablePayloadFormat getTablePayloadFormat()

Gets the TablePayloadFormat to be used. For more information about TablePayloadFormat defaults, see setTablePayloadFormat(TablePayloadFormat payloadFormat).

final TableRequestOptions populateAndApplyDefaults(final TableRequestOptions options, final CloudTableClient client)

Initializes the values for this instance, if they are currently , using the values specified in the CloudTableClient parameter.

void setDateBackwardCompatibility(Boolean dateBackwardCompatibility)

Sets whether the client should look to correct Date values stored on a TableEntity that may have been written using versions of this library prior to 2.0.0.

dateBackwardCompatibility is by default , indicating a post 2.0.0 version or mixed- platform usage. You can change the dateBackwardCompatibility on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that dateBackwardCompatibility.

See here for more details.

void setEncryptionPolicy(TableEncryptionPolicy encryptionPolicy)

Sets the TableEncryptionPolicy object to use for this request.

The default TableEncryptionPolicy is set in the client and is by default null, indicating no encryption. You can change the TableEncryptionPolicy on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TableEncryptionPolicy.

void setEncryptionResolver(EncryptionResolver encryptionResolver)

Sets the interface that contains a function which is used to get the value indicating whether a property should be encrypted or not given the partition key, row key, and the property name. A TableRequestOptions.EncryptionResolver is required if a TableEncryptionPolicy is specified.

You can change the TableRequestOptions.EncryptionResolver on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TableRequestOptions.EncryptionResolver.

void setPropertyResolver(PropertyResolver propertyResolver)

Sets the interface that contains a function which is used to get the EdmType for an entity property given the partition key, row, key, and the property name.

The default TableRequestOptions.PropertyResolver is set in the client and is by default null, indicating not to use a property resolver. You can change the TableRequestOptions.PropertyResolver on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TableRequestOptions.PropertyResolver.

void setTablePayloadFormat(TablePayloadFormat payloadFormat)

Sets the TablePayloadFormat to be used.

The default TablePayloadFormat is set in the client and is by default Json. You can change the TablePayloadFormat on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TablePayloadFormat.

Inherited Members

Constructor Details

TableRequestOptions

public TableRequestOptions()

Creates an instance of the

TableRequestOptions

public TableRequestOptions(final TableRequestOptions other)

Creates an instance of the class by copying values from another instance.

Parameters:

other - A TableRequestOptions object that represents the request options to copy.

Method Details

applyDefaults

protected static void applyDefaults(final TableRequestOptions modifiedOptions)

Applies defaults to the options passed in.

Parameters:

modifiedOptions - The options to apply defaults to.

assertNoEncryptionPolicyOrStrictMode

protected void assertNoEncryptionPolicyOrStrictMode()

Assert that if validation is on, an encryption policy is not specified.

assertPolicyIfRequired

protected void assertPolicyIfRequired()

Assert that if strict mode is on, an encryption policy is specified.

clearEncryption

protected void clearEncryption()

Clears the encryption properties on this TableRequestOptions object. Useful for operations for which encryption does not make sense, such as CreateTable.

getDateBackwardCompatibility

public Boolean getDateBackwardCompatibility()

Gets whether the client should look to correct Date values stored on a TableEntity that may have been written using versions of this library prior to 2.0.0, see setDateBackwardCompatibility(Boolean dateBackwardCompatibility).

See here for more details.

Returns:

true if dateBackwardCompatibility is enabled; otherwise, false

getEncryptionPolicy

public TableEncryptionPolicy getEncryptionPolicy()

Gets the encryption policy to use for this request. For more information about the encryption policy defaults, see setEncryptionPolicy(TableEncryptionPolicy encryptionPolicy).

Returns:

An TableEncryptionPolicy object that represents the current encryption policy.

getEncryptionResolver

public EncryptionResolver getEncryptionResolver()

Gets the interface that contains a function which is used to get the value indicating whether a property should be encrypted or not given the partition key, row key, and the property name. For more information about the TableRequestOptions.EncryptionResolver defaults, see setEncryptionResolver(EncryptionResolver encryptionResolver).

Returns:

getPropertyResolver

public PropertyResolver getPropertyResolver()

Gets the interface that contains a function which is used to get the EdmType for an entity property given the partition key, row, key, and the property name. For more information about the TableRequestOptions.PropertyResolver defaults, see setPropertyResolver(PropertyResolver propertyResolver).

Returns:

getTablePayloadFormat

public TablePayloadFormat getTablePayloadFormat()

Gets the TablePayloadFormat to be used. For more information about TablePayloadFormat defaults, see setTablePayloadFormat(TablePayloadFormat payloadFormat).

Returns:

The TablePayloadFormat used by this TableRequest.

populateAndApplyDefaults

protected static final TableRequestOptions populateAndApplyDefaults(final TableRequestOptions options, final CloudTableClient client)

Initializes the values for this instance, if they are currently , using the values specified in the CloudTableClient parameter.

Parameters:

options - A TableRequestOptions object which represents the input options to copy from when applying defaults.
client - A CloudTableClient object from which to copy the timeout and retry policy.

Returns:

setDateBackwardCompatibility

public void setDateBackwardCompatibility(Boolean dateBackwardCompatibility)

Sets whether the client should look to correct Date values stored on a TableEntity that may have been written using versions of this library prior to 2.0.0.

dateBackwardCompatibility is by default , indicating a post 2.0.0 version or mixed- platform usage. You can change the dateBackwardCompatibility on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that dateBackwardCompatibility.

See here for more details.

Parameters:

dateBackwardCompatibility -

true to enable dateBackwardCompatibility; otherwise, false

setEncryptionPolicy

public void setEncryptionPolicy(TableEncryptionPolicy encryptionPolicy)

Sets the TableEncryptionPolicy object to use for this request.

The default TableEncryptionPolicy is set in the client and is by default null, indicating no encryption. You can change the TableEncryptionPolicy on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TableEncryptionPolicy.

Parameters:

encryptionPolicy - the TableEncryptionPolicy object to use when making service requests.

setEncryptionResolver

public void setEncryptionResolver(EncryptionResolver encryptionResolver)

Sets the interface that contains a function which is used to get the value indicating whether a property should be encrypted or not given the partition key, row key, and the property name. A TableRequestOptions.EncryptionResolver is required if a TableEncryptionPolicy is specified.

You can change the TableRequestOptions.EncryptionResolver on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TableRequestOptions.EncryptionResolver.

Parameters:

encryptionResolver - Specifies the TableRequestOptions.EncryptionResolver to set.

setPropertyResolver

public void setPropertyResolver(PropertyResolver propertyResolver)

Sets the interface that contains a function which is used to get the EdmType for an entity property given the partition key, row, key, and the property name.

The default TableRequestOptions.PropertyResolver is set in the client and is by default null, indicating not to use a property resolver. You can change the TableRequestOptions.PropertyResolver on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TableRequestOptions.PropertyResolver.

Parameters:

propertyResolver - Specifies the TableRequestOptions.PropertyResolver to set.

setTablePayloadFormat

public void setTablePayloadFormat(TablePayloadFormat payloadFormat)

Sets the TablePayloadFormat to be used.

The default TablePayloadFormat is set in the client and is by default Json. You can change the TablePayloadFormat on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that TablePayloadFormat.

Parameters:

payloadFormat - Specifies the TablePayloadFormat to set.

Applies to