QueryTableOperation Class
- java.
lang. Object - TableOperation
- com.
microsoft. azure. storage. table. QueryTableOperation
- com.
public class QueryTableOperation extends TableOperation
A class that extends TableOperation to implement a query to retrieve a single table entity. To execute a QueryTableOperation instance, call the method on a CloudTableClient instance. This operation can be executed directly or as part of a TableBatchOperation. If the QueryTableOperation returns an entity result, it is stored in the corresponding TableResult returned by the method.
Constructor Summary
Constructor | Description |
---|---|
QueryTableOperation() |
Default constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Class<? extends Table |
getClazzType()
Reserved for internal use. Gets the class type of the entity returned by the query. |
String |
getPartitionKey()
Gets the PartitionKey value for the entity to retrieve. |
Entity |
getResolver()
Gets the resolver to project the entity retrieved as a particular type. |
String |
getRowKey()
Gets the RowKey value for the entity to retrieve. |
final boolean | isPrimaryOnlyRetrieve() |
Table |
parseResponse(final InputStream inStream, final int httpStatusCode, String etagFromHeader, final OperationContext opContext, final TableRequestOptions options)
Reserved for internal use. Parses the table operation response into a TableResult to return. |
Table |
performRetrieve(final CloudTableClient client, final String tableName, final TableRequestOptions options, final OperationContext opContext)
Reserved for internal use. Performs a retrieve operation on the specified table, using the specified TableRequestOptions and OperationContext. This method will invoke the Storage Service REST API to execute this table operation, using the Table service endpoint and storage account credentials in the CloudTableClient object. |
void |
setClazzType(final Class<? extends TableEntity> clazzType)
Reserved for internal use. Sets the class type of the entity returned by the query. |
void |
setPartitionKey(final String partitionKey)
Reserved for internal use. Sets the PartitionKey value for the entity to retrieve. |
void | setPrimaryOnlyRetrieve(boolean isPrimaryOnlyRetrieve) |
void |
setResolver(final EntityResolver<?> resolver)
Reserved for internal use. Sets the resolver to project the entity retrieved as a particular type. |
void |
setRowKey(final String rowKey)
Reserved for internal use. Sets the RowKey value for the entity to retrieve. |
Inherited Members
Constructor Details
QueryTableOperation
protected QueryTableOperation()
Default constructor.
Method Details
getClazzType
protected Class getClazzType()
Reserved for internal use. Gets the class type of the entity returned by the query.
Returns:
java.lang.Class
implementing TableEntity that represents the entity type for the query.getPartitionKey
public String getPartitionKey()
Gets the PartitionKey value for the entity to retrieve.
Returns:
String
containing the PartitionKey value for the entity.getResolver
public EntityResolver getResolver()
Gets the resolver to project the entity retrieved as a particular type.
Returns:
getRowKey
public String getRowKey()
Gets the RowKey value for the entity to retrieve.
Returns:
String
containing the RowKey value for the entity.isPrimaryOnlyRetrieve
protected final boolean isPrimaryOnlyRetrieve()
Returns:
parseResponse
protected TableResult parseResponse(final InputStream inStream, final int httpStatusCode, String etagFromHeader, final OperationContext opContext, final TableRequestOptions options)
Reserved for internal use. Parses the table operation response into a TableResult to return.
Parameters:
InputStream
containing the response to a query operation.
String
containing the Etag returned with the operation response.
Returns:
Throws:
performRetrieve
protected TableResult performRetrieve(final CloudTableClient client, final String tableName, final TableRequestOptions options, final OperationContext opContext)
Reserved for internal use. Performs a retrieve operation on the specified table, using the specified TableRequestOptions and OperationContext.
This method will invoke the Storage Service REST API to execute this table operation, using the Table service endpoint and storage account credentials in the CloudTableClient object.
Parameters:
String
containing the name of the table to query.
Returns:
Throws:
setClazzType
protected void setClazzType(final Class clazzType)
Reserved for internal use. Sets the class type of the entity returned by the query.
Parameters:
java.lang.Class
implementing TableEntity that represents the entity type for the query.
setPartitionKey
protected void setPartitionKey(final String partitionKey)
Reserved for internal use. Sets the PartitionKey value for the entity to retrieve.
Parameters:
String
containing the PartitionKey value for the entity.
setPrimaryOnlyRetrieve
protected void setPrimaryOnlyRetrieve(boolean isPrimaryOnlyRetrieve)
Parameters:
setResolver
protected void setResolver(final EntityResolver resolver)
Reserved for internal use. Sets the resolver to project the entity retrieved as a particular type.
Parameters:
setRowKey
protected void setRowKey(final String rowKey)
Reserved for internal use. Sets the RowKey value for the entity to retrieve.
Parameters:
String
containing the RowKey value for the entity.