public class QueryTableOperation extends TableOperation
TableOperation to implement a query to retrieve a single table entity. To execute a
QueryTableOperation instance, call the execute 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 execute method.| Modifier | Constructor and Description |
|---|---|
protected |
QueryTableOperation()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Class<? extends TableEntity> |
getClazzType()
Reserved for internal use.
|
String |
getPartitionKey()
Gets the PartitionKey value for the entity to retrieve.
|
EntityResolver<?> |
getResolver()
Gets the resolver to project the entity retrieved as a particular type.
|
String |
getRowKey()
Gets the RowKey value for the entity to retrieve.
|
protected boolean |
isPrimaryOnlyRetrieve() |
protected TableResult |
parseResponse(InputStream inStream,
int httpStatusCode,
String etagFromHeader,
OperationContext opContext,
TableRequestOptions options)
Reserved for internal use.
|
protected TableResult |
performRetrieve(CloudTableClient client,
String tableName,
TableRequestOptions options,
OperationContext opContext)
Reserved for internal use.
|
protected void |
setClazzType(Class<? extends TableEntity> clazzType)
Reserved for internal use.
|
protected void |
setPartitionKey(String partitionKey)
Reserved for internal use.
|
protected void |
setPrimaryOnlyRetrieve(boolean isPrimaryOnlyRetrieve) |
protected void |
setResolver(EntityResolver<?> resolver)
Reserved for internal use.
|
protected void |
setRowKey(String rowKey)
Reserved for internal use.
|
delete, execute, generateRequestIdentity, generateRequestIdentityWithTable, getEchoContent, getEntity, getOperationType, insert, insert, insertOrMerge, insertOrReplace, merge, replace, retrieve, retrieve, setEchoContent, setEntitypublic String getPartitionKey()
String containing the PartitionKey value for the entity.public EntityResolver<?> getResolver()
EntityResolver instance.public String getRowKey()
String containing the RowKey value for the entity.protected Class<? extends TableEntity> getClazzType()
java.lang.Class implementing TableEntity that represents the entity type for the
query.protected TableResult parseResponse(InputStream inStream, int httpStatusCode, String etagFromHeader, OperationContext opContext, TableRequestOptions options) throws InstantiationException, IllegalAccessException, StorageException, com.fasterxml.jackson.core.JsonParseException, IOException
TableResult to return.parseResponse in class TableOperationinStream - An InputStream containing the response to a query operation.httpStatusCode - The HTTP status code returned from the operation request.etagFromHeader - The String containing the Etag returned with the operation response.opContext - An OperationContext object that represents the context for the current operation.TableResult representing the result of the query operation.InstantiationException - if an error occurs in object construction.IllegalAccessException - if an error occurs in reflection on an object type.StorageException - if an error occurs in the storage operation.IOException - if an error occurs while accessing the InputStream with Json.com.fasterxml.jackson.core.JsonParseException - if an error occurs while parsing the Json, if Json is used.protected TableResult performRetrieve(CloudTableClient client, String tableName, TableRequestOptions options, OperationContext opContext) throws StorageException
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.
client - A CloudTableClient instance specifying the Table service endpoint and storage account
credentials to use.tableName - A String containing the name of the table to query.options - A TableRequestOptions object that specifies execution options such as retry policy and timeout
settings for the operation.opContext - An OperationContext object for tracking the current operation.TableResult containing the results of executing the query operation.StorageException - if an error occurs in the storage operation.protected void setClazzType(Class<? extends TableEntity> clazzType)
clazzType - The java.lang.Class implementing TableEntity that represents the entity type for
the query.protected void setPartitionKey(String partitionKey)
partitionKey - A String containing the PartitionKey value for the entity.protected void setResolver(EntityResolver<?> resolver)
resolver - The EntityResolver instance to use.protected void setRowKey(String rowKey)
rowKey - A String containing the RowKey value for the entity.protected final boolean isPrimaryOnlyRetrieve()
protected void setPrimaryOnlyRetrieve(boolean isPrimaryOnlyRetrieve)
isPrimaryOnlyRetrieve - the isPrimaryOnlyRetrieve to setCopyright © 2019. All rights reserved.