ContentProviderResultpublic class ContentProviderResult extends Object implements android.os.ParcelableContains the result of the application of a {@link ContentProviderOperation}. It is guaranteed
to have exactly one of {@link #uri} or {@link #count} set. |
Fields Summary |
---|
public final android.net.Uri | uri | public final Integer | count | public static final Creator | CREATOR |
Constructors Summary |
---|
public ContentProviderResult(android.net.Uri uri)
if (uri == null) throw new IllegalArgumentException("uri must not be null");
this.uri = uri;
this.count = null;
| public ContentProviderResult(int count)
this.count = count;
this.uri = null;
| public ContentProviderResult(android.os.Parcel source)
int type = source.readInt();
if (type == 1) {
count = source.readInt();
uri = null;
} else {
count = null;
uri = Uri.CREATOR.createFromParcel(source);
}
| public ContentProviderResult(ContentProviderResult cpr, int userId)
uri = ContentProvider.maybeAddUserId(cpr.uri, userId);
count = cpr.count;
|
Methods Summary |
---|
public int | describeContents()
return 0;
| public java.lang.String | toString()
if (uri != null) {
return "ContentProviderResult(uri=" + uri.toString() + ")";
}
return "ContentProviderResult(count=" + count + ")";
| public void | writeToParcel(android.os.Parcel dest, int flags)
if (uri == null) {
dest.writeInt(1);
dest.writeInt(count);
} else {
dest.writeInt(2);
uri.writeToParcel(dest, 0);
}
|
|