Sdílet prostřednictvím


ContentProviderOperation.Apply Method

Definition

Applies this operation using the given provider.

[Android.Runtime.Register("apply", "(Landroid/content/ContentProvider;[Landroid/content/ContentProviderResult;I)Landroid/content/ContentProviderResult;", "GetApply_Landroid_content_ContentProvider_arrayLandroid_content_ContentProviderResult_IHandler")]
public virtual Android.Content.ContentProviderResult Apply (Android.Content.ContentProvider provider, Android.Content.ContentProviderResult[] backRefs, int numBackRefs);
[<Android.Runtime.Register("apply", "(Landroid/content/ContentProvider;[Landroid/content/ContentProviderResult;I)Landroid/content/ContentProviderResult;", "GetApply_Landroid_content_ContentProvider_arrayLandroid_content_ContentProviderResult_IHandler")>]
abstract member Apply : Android.Content.ContentProvider * Android.Content.ContentProviderResult[] * int -> Android.Content.ContentProviderResult
override this.Apply : Android.Content.ContentProvider * Android.Content.ContentProviderResult[] * int -> Android.Content.ContentProviderResult

Parameters

provider
ContentProvider

the ContentProvider on which this batch is applied

backRefs
ContentProviderResult[]

a ContentProviderResult array that will be consulted to resolve any requested back references.

numBackRefs
Int32

the number of valid results on the backRefs array.

Returns

a ContentProviderResult that contains either the Uri of the inserted row if this was an insert otherwise the number of rows affected.

Attributes

Exceptions

thrown if either the insert fails or if the number of rows affected didn't match the expected count

Remarks

Applies this operation using the given provider. The backRefs array is used to resolve any back references that were requested using Builder#withValueBackReferences(ContentValues) and Builder#withSelectionBackReference.

Java documentation for android.content.ContentProviderOperation.apply(android.content.ContentProvider, android.content.ContentProviderResult[], int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to