TableOperation クラス

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

public class TableOperation

1 つのテーブル操作を表す クラス。

静的ファクトリ メソッドを使用して、テーブル エンティティを挿入、更新、マージ、削除、置換、または取得するテーブルに対する操作のインスタンスを構築 TableOperation します。 インスタンスを TableOperation 実行するには、インスタンスで メソッドを CloudTableClient 呼び出します。 は TableOperation 、直接実行することも、 の TableBatchOperation一部として実行することもできます。 が TableOperation エンティティの結果を返す場合は、 メソッドによって返される対応する TableResult に格納されます。

コンストラクターの概要

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

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

TableOperation(final TableEntity entity, final TableOperationType opType)

内部使用のために予約されています。 指定したテーブル エンティティと操作の種類を使用して を TableOperation 構築します。

TableOperation(final TableEntity entity, final TableOperationType opType, final boolean echoContent)

内部使用のために予約されています。 指定したテーブル エンティティと操作の種類を使用して を TableOperation 構築します。

メソッドの概要

修飾子と型 メソッドと説明
TableOperation delete(final TableEntity entity)

指定したエンティティを TableOperation Microsoft Azure ストレージから削除するインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

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

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

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

String generateRequestIdentity(boolean isSingleIndexEntry, final String entryName)

内部使用のために予約されています。 指定したエントリ名、または操作の PartitionKey と RowKey のペアで構成される要求 ID を生成して、操作のターゲットを識別します。

String generateRequestIdentityWithTable(final String tableName)

内部使用のために予約されています。 指定したテーブルの要求 ID 文字列を生成します。 要求 ID 文字列は、テーブル名を操作の PartitionKey と RowKey と組み合わせて、特定のテーブル エンティティを識別します。 この要求 ID は既に UrlEncoded です。

boolean getEchoContent()

メッセージ ペイロードを応答で返す必要があるかどうかを表すブール値を取得します。

synchronized final TableEntity getEntity()

内部使用のために予約されています。 この操作に関連付けられているテーブル エンティティを取得します。

synchronized final TableOperationType getOperationType()

内部使用のために予約されています。 この操作の操作の種類を取得します。

TableOperation insert(final TableEntity entity)

指定したエンティティを TableOperation Microsoft Azure ストレージに挿入するインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

TableOperation insert(final TableEntity entity, boolean echoContent)

指定したエンティティを TableOperation Microsoft Azure ストレージに挿入するインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

TableOperation insertOrMerge(final TableEntity entity)

指定したエンティティを TableOperation Microsoft Azure ストレージにマージするインスタンスを返す静的ファクトリ メソッド。存在しない場合は挿入します。 これをTableOperation特定のテーブルで実行するには、テーブル名と as 引数をCloudTableClient使用してインスタンスで メソッドをTableOperation呼び出execute(final TableOperation operation)します。

TableOperation insertOrReplace(final TableEntity entity)

Microsoft Azure Storage 内の指定したエンティティを TableOperation 置き換えるインスタンスを返す静的ファクトリ メソッド。存在しない場合は挿入します。 これをTableOperation特定のテーブルで実行するには、テーブル名と as 引数をCloudTableClient使用してインスタンスで メソッドをTableOperation呼び出execute(final TableOperation operation)します。

TableOperation merge(final TableEntity entity)

指定したテーブル エンティティを TableOperation Microsoft Azure ストレージにマージするインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

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

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

TableOperation replace(final TableEntity entity)

指定したテーブル エンティティを TableOperation 置き換えるインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 メソッドを execute(final TableOperation operation) 呼び出します。

TableOperation retrieve(final String partitionKey, final String rowKey, final Class<? extends TableEntity> clazzType)

指定したテーブル エンティティを取得し、 TableOperation 指定した型として返すインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

TableOperation retrieve(final String partitionKey, final String rowKey, final EntityResolver<?> resolver)

指定したテーブル エンティティを取得し、 TableOperation 指定したリゾルバーを使用してそのプロジェクションを返すインスタンスを返す静的ファクトリ メソッド。 これをTableOperation特定のテーブルで実行するには、テーブル名と as 引数をCloudTableClient使用してインスタンスで メソッドをTableOperation呼び出execute(final TableOperation operation)します。

void setEchoContent(boolean echoContent)

メッセージ ペイロードを応答で返す必要があるかどうかを表すブール値を設定します。

synchronized final void setEntity(final TableEntity entity)

内部使用のために予約されています。 テーブル操作の TableEntity インスタンスを設定します。

コンストラクターの詳細

TableOperation

protected TableOperation()

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

TableOperation

protected TableOperation(final TableEntity entity, final TableOperationType opType)

内部使用のために予約されています。 指定したテーブル エンティティと操作の種類を使用して を TableOperation 構築します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。
opType - 操作の TableOperationType 種類の列挙値。

TableOperation

protected TableOperation(final TableEntity entity, final TableOperationType opType, final boolean echoContent)

内部使用のために予約されています。 指定したテーブル エンティティと操作の種類を使用して を TableOperation 構築します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。
opType - 操作の TableOperationType 種類の列挙値。
echoContent - メッセージ ペイロードを応答で返す必要があるかどうかを表すブール値。

メソッドの詳細

delete

public static TableOperation delete(final TableEntity entity)

指定したエンティティを TableOperation Microsoft Azure ストレージから削除するインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。

Returns:

テーブル エンティティを挿入する新しい TableOperation インスタンス。

execute

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

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

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

Parameters:

client - CloudTableClient Table service エンドポイント、ストレージ アカウントの資格情報、および追加のクエリ パラメーターを指定するインスタンス。
tableName - Stringテーブルの名前を指定する 。
options - TableRequestOptions操作の再試行ポリシーやタイムアウト設定などの実行オプションを指定する オブジェクト。
opContext - 現在の操作を追跡するための OperationContext オブジェクトです。

Returns:

TableResult操作を実行した結果を表す 。

Throws:

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

generateRequestIdentity

protected String generateRequestIdentity(boolean isSingleIndexEntry, final String entryName)

内部使用のために予約されています。 指定したエントリ名、または操作の PartitionKey と RowKey のペアで構成される要求 ID を生成して、操作のターゲットを識別します。

Parameters:

isSingleIndexEntry - 指定したentryNameパラメーターを使用するか、操作falseの PartitionKey と RowKey の値を要求 ID として使用するには、 を渡trueします。
entryName - パラメーターtrueが の場合に要求 ID として使用するisSingleIndexEntryエントリ名。

Returns:

String書式設定された要求 ID 文字列を表す 。

Throws:

StorageException - ストレージ サービス エラーが発生した場合。

generateRequestIdentityWithTable

protected String generateRequestIdentityWithTable(final String tableName)

内部使用のために予約されています。 指定したテーブルの要求 ID 文字列を生成します。 要求 ID 文字列は、テーブル名を操作の PartitionKey と RowKey と組み合わせて、特定のテーブル エンティティを識別します。 この要求 ID は既に UrlEncoded です。

Parameters:

tableName - Stringテーブルの名前を指定する 。

Returns:

String指定したテーブルの書式設定された要求 ID 文字列を表す 。

Throws:

StorageException

getEchoContent

protected boolean getEchoContent()

メッセージ ペイロードを応答で返す必要があるかどうかを表すブール値を取得します。

Returns:

true 応答でメッセージ ペイロードを返す必要がある場合は 。それ以外の場合 false

getEntity

protected synchronized final TableEntity getEntity()

内部使用のために予約されています。 この操作に関連付けられているテーブル エンティティを取得します。

Returns:

TableEntityこの操作に関連付けられているインスタンス。

getOperationType

protected synchronized final TableOperationType getOperationType()

内部使用のために予約されています。 この操作の操作の種類を取得します。

Returns:

opType この TableOperationType 操作に関連付けられているインスタンス。

insert

public static TableOperation insert(final TableEntity entity)

指定したエンティティを TableOperation Microsoft Azure ストレージに挿入するインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。

Returns:

テーブル エンティティを挿入する新しい TableOperation インスタンス。

insert

public static TableOperation insert(final TableEntity entity, boolean echoContent)

指定したエンティティを TableOperation Microsoft Azure ストレージに挿入するインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。
echoContent - メッセージ ペイロードを応答で返す必要があるかどうかを表すブール値。

Returns:

テーブル エンティティを挿入する新しい TableOperation インスタンス。

insertOrMerge

public static TableOperation insertOrMerge(final TableEntity entity)

指定したエンティティを TableOperation Microsoft Azure ストレージにマージするインスタンスを返す静的ファクトリ メソッド。存在しない場合は挿入します。 これをTableOperation特定のテーブルで実行するには、テーブル名と as 引数をCloudTableClient使用してインスタンスで メソッドをTableOperation呼び出execute(final TableOperation operation)します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。

Returns:

テーブル エンティティを挿入またはマージするための新しい TableOperation インスタンス。

insertOrReplace

public static TableOperation insertOrReplace(final TableEntity entity)

Microsoft Azure Storage 内の指定したエンティティを TableOperation 置き換えるインスタンスを返す静的ファクトリ メソッド。存在しない場合は挿入します。 これをTableOperation特定のテーブルで実行するには、テーブル名と as 引数をCloudTableClient使用してインスタンスで メソッドをTableOperation呼び出execute(final TableOperation operation)します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。

Returns:

テーブル エンティティを挿入または置換するための新しい TableOperation インスタンス。

merge

public static TableOperation merge(final TableEntity entity)

指定したテーブル エンティティを TableOperation Microsoft Azure ストレージにマージするインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。

Returns:

テーブル エンティティをマージするための新しい TableOperation インスタンス。

parseResponse

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

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

Parameters:

inStream - InputStream挿入操作に対する応答を指定する 。
httpStatusCode - int操作要求から返される HTTP 状態コードを表す 。
etagFromHeader - String操作の応答で返される Etag を指定する 。
opContext - 現在の操作のコンテキストを表す OperationContext オブジェクトです。
options

Returns:

TableResult操作の結果を表す 。

Throws:

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

replace

public static TableOperation replace(final TableEntity entity)

指定したテーブル エンティティを TableOperation 置き換えるインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 メソッドを execute(final TableOperation operation) 呼び出します。

Parameters:

entity - 操作に関連付ける を実装 TableEntity する オブジェクト インスタンス。

Returns:

テーブル エンティティを置き換える新しい TableOperation インスタンス。

retrieve

public static TableOperation retrieve(final String partitionKey, final String rowKey, final Class clazzType)

指定したテーブル エンティティを取得し、 TableOperation 指定した型として返すインスタンスを返す静的ファクトリ メソッド。 特定のテーブルでこれを TableOperation 実行するには、 を使用して execute(final TableOperation operation) インスタンスで メソッドを CloudTableClient 呼び出します。

Parameters:

partitionKey - String取得するエンティティの PartitionKey 値を指定する 。
rowKey - String取得するエンティティの RowKey 値を指定する 。
clazzType - 取得するテーブル エンティティ オブジェクトのクラス型。

Returns:

テーブル エンティティを取得するための新しい TableOperation インスタンス。

retrieve

public static TableOperation retrieve(final String partitionKey, final String rowKey, final EntityResolver resolver)

指定したテーブル エンティティを取得し、 TableOperation 指定したリゾルバーを使用してそのプロジェクションを返すインスタンスを返す静的ファクトリ メソッド。 これをTableOperation特定のテーブルで実行するには、テーブル名と as 引数をCloudTableClient使用してインスタンスで メソッドをTableOperation呼び出execute(final TableOperation operation)します。

Parameters:

partitionKey - String取得するエンティティの PartitionKey 値を指定する 。
rowKey - String取得するエンティティの RowKey 値を指定する 。
resolver - 結果エンティティを型 T として投影するために使用する の実装 EntityResolver<T>

Returns:

テーブル エンティティを取得するための新しい TableOperation インスタンス。

setEchoContent

protected void setEchoContent(boolean echoContent)

メッセージ ペイロードを応答で返す必要があるかどうかを表すブール値を設定します。

Parameters:

echoContent -

true 応答でメッセージ ペイロードを返す必要がある場合は 。それ以外の場合 falseは 。

setEntity

protected synchronized final void setEntity(final TableEntity entity)

内部使用のために予約されています。 テーブル操作の TableEntity インスタンスを設定します。

Parameters:

entity - 設定する TableEntity インスタンス。

適用対象