TableResult Class

  • java.lang.Object
    • com.microsoft.azure.storage.table.TableResult

public class TableResult

A class which represents the result of a table operation. The TableResult class encapsulates the HTTP response and any table entity results returned by the Storage Service REST API operation called for a particular TableOperation.

Constructor Summary

Constructor Description
TableResult()

Initializes an empty TableResult instance.

TableResult(final int httpStatusCode)

Initializes a TableResult instance with the specified HTTP status code.

Method Summary

Modifier and Type Method and Description
String getEtag()

Gets the ETag returned with the table operation results. The server will return the same ETag value for a table, entity, or entity group returned by an operation as long as it is unchanged on the server.

int getHttpStatusCode()

Gets the HTTP status code returned by a table operation request.

HashMap<String, EntityProperty> getProperties()

Gets the map of properties for a table entity returned by the table operation.

Object getResult()

Gets the result returned by the table operation as an Object.

<T> T getResultAsType()

Gets the result returned by the table operation as an instance of the specified type.

void setEtag(final String etag)

Reserved for internal use. Sets the ETag associated with the table operation results.

void setHttpStatusCode(final int httpStatusCode)

Reserved for internal use. Sets the HTTP status code associated with the table operation results.

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

Reserved for internal use. Sets the map of properties for a table entity to associate with the table operation.

void setResult(final Object result)

Reserved for internal use. Sets a result Object instance to associate with the table operation.

void updateResultObject(final TableEntity ent)

Reserved for internal use. Sets the result to associate with the table operation as a TableEntity.

Constructor Details

TableResult

public TableResult()

Initializes an empty TableResult instance.

TableResult

public TableResult(final int httpStatusCode)

Initializes a TableResult instance with the specified HTTP status code.

Parameters:

httpStatusCode - An int which represents the HTTP status code for the table operation returned by the server.

Method Details

getEtag

public String getEtag()

Gets the ETag returned with the table operation results. The server will return the same ETag value for a table, entity, or entity group returned by an operation as long as it is unchanged on the server.

Returns:

A String containing the ETag returned by the server with the table operation results.

getHttpStatusCode

public int getHttpStatusCode()

Gets the HTTP status code returned by a table operation request.

Returns:

An int which represents the HTTP status code for the table operation returned by the server.

getProperties

public HashMap getProperties()

Gets the map of properties for a table entity returned by the table operation.

Returns:

A java.util.HashMap of String property names to EntityProperty data typed values representing the properties of a table entity.

getResult

public Object getResult()

Gets the result returned by the table operation as an Object.

Returns:

An Object reference which represents the result returned by the table operation.

getResultAsType

public T getResultAsType()

Gets the result returned by the table operation as an instance of the specified type.

Returns:

An T reference which represents the result returned by the table operation.

setEtag

protected void setEtag(final String etag)

Reserved for internal use. Sets the ETag associated with the table operation results.

Parameters:

etag - A String containing an ETag to associate with the table operation results.

setHttpStatusCode

protected void setHttpStatusCode(final int httpStatusCode)

Reserved for internal use. Sets the HTTP status code associated with the table operation results.

Parameters:

httpStatusCode - The HTTP status code value to associate with the table operation results.

setProperties

protected void setProperties(final HashMap properties)

Reserved for internal use. Sets the map of properties for a table entity to associate with the table operation.

Parameters:

properties - A java.util.HashMap of String property names to EntityProperty data typed values representing the properties of a table entity to associate with the table operation.

setResult

protected void setResult(final Object result)

Reserved for internal use. Sets a result Object instance to associate with the table operation.

Parameters:

result - An instance of a result Object to associate with the table operation.

updateResultObject

protected void updateResultObject(final TableEntity ent)

Reserved for internal use. Sets the result to associate with the table operation as a TableEntity.

Parameters:

ent - An instance of an object implementing TableEntity to associate with the table operation.

Throws:

UnsupportedEncodingException

Applies to