QueryTableOperation クラス

  • java.lang.Object
    • TableOperation
      • com.microsoft.azure.storage.table.QueryTableOperation

public class QueryTableOperation extends TableOperation

を拡張 TableOperation して、1 つのテーブル エンティティを取得するクエリを実装するクラス。 インスタンスを QueryTableOperation 実行するには、インスタンスで メソッドを CloudTableClient 呼び出します。 この操作は、直接実行することも、 の TableBatchOperation一部として実行することもできます。 が QueryTableOperation エンティティの結果を返す場合は、 メソッドによって返される対応する TableResult に格納されます。

コンストラクターの概要

コンストラクター 説明
QueryTableOperation()

既定のコンストラクターです。

メソッドの概要

修飾子と型 メソッドと説明
Class<? extends TableEntity> getClazzType()

内部使用のために予約されています。 クエリによって返されるエンティティのクラス型を取得します。

String getPartitionKey()

取得するエンティティの PartitionKey 値を取得します。

EntityResolver<?> getResolver()

特定の型として取得されたエンティティを投影するリゾルバーを取得します。

String getRowKey()

取得するエンティティの RowKey 値を取得します。

final boolean isPrimaryOnlyRetrieve()
TableResult parseResponse(final InputStream inStream, final int httpStatusCode, String etagFromHeader, final OperationContext opContext, final TableRequestOptions options)

内部使用のために予約されています。 テーブル操作の応答を に TableResult 解析して返します。

TableResult performRetrieve(final CloudTableClient client, final String tableName, final TableRequestOptions options, final OperationContext opContext)

内部使用のために予約されています。 指定した と OperationContextを使用して、指定したテーブルに対して取得操作を実行しますTableRequestOptions

このメソッドは、Storage Service REST API を呼び出し、 オブジェクトの Table Service エンドポイントとストレージ アカウントの資格情報を使用して、このテーブル操作を CloudTableClient 実行します。

void setClazzType(final Class<? extends TableEntity> clazzType)

内部使用のために予約されています。 クエリによって返されるエンティティのクラス型を設定します。

void setPartitionKey(final String partitionKey)

内部使用のために予約されています。 取得するエンティティの PartitionKey 値を設定します。

void setPrimaryOnlyRetrieve(boolean isPrimaryOnlyRetrieve)
void setResolver(final EntityResolver<?> resolver)

内部使用のために予約されています。 リゾルバーを設定して、特定の型として取得されたエンティティを投影します。

void setRowKey(final String rowKey)

内部使用のために予約されています。 取得するエンティティの RowKey 値を設定します。

継承メンバー

コンストラクターの詳細

QueryTableOperation

protected QueryTableOperation()

既定のコンストラクターです。

メソッドの詳細

getClazzType

protected Class getClazzType()

内部使用のために予約されています。 クエリによって返されるエンティティのクラス型を取得します。

Returns:

クエリの java.lang.Class エンティティ型を表す を実装 TableEntity します。

getPartitionKey

public String getPartitionKey()

取得するエンティティの PartitionKey 値を取得します。

Returns:

Stringエンティティの PartitionKey 値を格納している 。

getResolver

public EntityResolver getResolver()

特定の型として取得されたエンティティを投影するリゾルバーを取得します。

Returns:

EntityResolver<T> のインスタンスです。

getRowKey

public String getRowKey()

取得するエンティティの RowKey 値を取得します。

Returns:

Stringエンティティの RowKey 値を格納している 。

isPrimaryOnlyRetrieve

protected final boolean isPrimaryOnlyRetrieve()

Returns:

isPrimaryOnlyRetrieve

parseResponse

protected TableResult parseResponse(final InputStream inStream, final int httpStatusCode, String etagFromHeader, final OperationContext opContext, final TableRequestOptions options)

内部使用のために予約されています。 テーブル操作の応答を に TableResult 解析して返します。

Parameters:

inStream - InputStreamクエリ操作に対する応答を格納している 。
httpStatusCode - 操作要求から返された HTTP 状態コード。
etagFromHeader - String操作の応答で返される Etag を含む 。
opContext - 現在の操作のコンテキストを表す OperationContext オブジェクトです。
options

Returns:

TableResultクエリ操作の結果を表す 。

Throws:

InstantiationException - オブジェクトの構築でエラーが発生した場合は 。
IllegalAccessException - オブジェクト型のリフレクションでエラーが発生した場合は 。
StorageException - ストレージ操作でエラーが発生した場合は 。
IOException - Json を使用した へのアクセス中にエラーが発生した InputStream 場合は 。
JsonParseException - Json の解析中にエラーが発生した場合は 。Json が使用されている場合は 。

performRetrieve

protected TableResult performRetrieve(final CloudTableClient client, final String tableName, final TableRequestOptions options, final OperationContext opContext)

内部使用のために予約されています。 指定した と OperationContextを使用して、指定したテーブルに対して取得操作を実行しますTableRequestOptions

このメソッドは、Storage Service REST API を呼び出し、 オブジェクトの Table Service エンドポイントとストレージ アカウントの資格情報を使用して、このテーブル操作を CloudTableClient 実行します。

Parameters:

client - CloudTableClient使用する Table Service エンドポイントとストレージ アカウントの資格情報を指定するインスタンス。
tableName - Stringクエリを実行するテーブルの名前を格納している 。
options - TableRequestOptions操作の再試行ポリシーやタイムアウト設定などの実行オプションを指定する オブジェクト。
opContext - 現在の操作を追跡するための OperationContext オブジェクトです。

Returns:

TableResultクエリ操作を実行した結果を格納している 。

Throws:

StorageException - ストレージ操作でエラーが発生した場合は 。

setClazzType

protected void setClazzType(final Class clazzType)

内部使用のために予約されています。 クエリによって返されるエンティティのクラス型を設定します。

Parameters:

clazzType - クエリの java.lang.Class エンティティ型を表す を実装 TableEntity します。

setPartitionKey

protected void setPartitionKey(final String partitionKey)

内部使用のために予約されています。 取得するエンティティの PartitionKey 値を設定します。

Parameters:

partitionKey - Stringエンティティの PartitionKey 値を格納している 。

setPrimaryOnlyRetrieve

protected void setPrimaryOnlyRetrieve(boolean isPrimaryOnlyRetrieve)

Parameters:

isPrimaryOnlyRetrieve - 設定する isPrimaryOnlyRetrieve

setResolver

protected void setResolver(final EntityResolver resolver)

内部使用のために予約されています。 リゾルバーを設定して、特定の型として取得されたエンティティを投影します。

Parameters:

resolver - 使用する EntityResolver<T> インスタンス。

setRowKey

protected void setRowKey(final String rowKey)

内部使用のために予約されています。 取得するエンティティの RowKey 値を設定します。

Parameters:

rowKey - Stringエンティティの RowKey 値を格納している 。

適用対象