public class

EntitySet

extends ArrayList<E>
implements Parcelable
java.lang.Object
   ↳ java.util.AbstractCollection<E>
     ↳ java.util.AbstractList<E>
       ↳ java.util.ArrayList<E>
         ↳ com.android.contacts.model.EntitySet

Class Overview

Container for multiple EntityDelta objects, usually when editing together as an entire aggregate. Provides convenience methods for parceling and applying another EntitySet over it.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<EntitySet> CREATOR
[Expand]
Inherited Fields
From class java.util.AbstractList
Public Methods
ArrayList<ContentProviderOperation> buildDiff()
Build a list of ContentProviderOperation that will transform all the "before" Entity states into the modified state which all EntityDelta objects represent.
int describeContents()
long findRawContactId()
Search all contained EntityDelta for the first one with an existing _ID value.
static EntitySet fromQuery(ContentResolver resolver, String selection, String[] selectionArgs, String sortOrder)
Create an EntitySet based on Contacts specified by the given query parameters.
static EntitySet fromSingle(EntityDelta delta)
Create an EntitySet that contains the given EntityDelta, usually when inserting a new Contacts entry.
EntityDelta getByRawContactId(Long rawContactId)
Long getRawContactId(int index)
Find _ID of the requested EntityDelta.
EntityDelta.ValuesDelta getSuperPrimaryEntry(String mimeType)
int indexOfRawContactId(Long rawContactId)
Find index of given _ID when present.
static EntitySet mergeAfter(EntitySet local, EntitySet remote)
Merge the "after" values from the given EntitySet, discarding any previous "after" states.
void readFromParcel(Parcel source)
void splitRawContacts()
void writeToParcel(Parcel dest, int flags)
Protected Methods
ContentProviderOperation.Builder beginKeepTogether()
Start building a ContentProviderOperation that will keep two RawContacts together.
[Expand]
Inherited Methods
From class java.util.ArrayList
From class java.util.AbstractList
From class java.util.AbstractCollection
From class java.lang.Object
From interface android.os.Parcelable
From interface java.lang.Iterable
From interface java.util.Collection
From interface java.util.List

Fields

public static final Creator<EntitySet> CREATOR

Public Methods

public ArrayList<ContentProviderOperation> buildDiff ()

Build a list of ContentProviderOperation that will transform all the "before" Entity states into the modified state which all EntityDelta objects represent. This method specifically creates any AggregationExceptions rules needed to groups edits together.

public int describeContents ()

public long findRawContactId ()

Search all contained EntityDelta for the first one with an existing _ID value. Usually used when creating AggregationExceptions during an update.

public static EntitySet fromQuery (ContentResolver resolver, String selection, String[] selectionArgs, String sortOrder)

Create an EntitySet based on Contacts specified by the given query parameters. This closes the EntityIterator when finished, so it doesn't subscribe to updates.

public static EntitySet fromSingle (EntityDelta delta)

Create an EntitySet that contains the given EntityDelta, usually when inserting a new Contacts entry.

public EntityDelta getByRawContactId (Long rawContactId)

public Long getRawContactId (int index)

Find _ID of the requested EntityDelta.

public EntityDelta.ValuesDelta getSuperPrimaryEntry (String mimeType)

public int indexOfRawContactId (Long rawContactId)

Find index of given _ID when present.

public static EntitySet mergeAfter (EntitySet local, EntitySet remote)

Merge the "after" values from the given EntitySet, discarding any previous "after" states. This is typically used when re-parenting user edits onto an updated EntitySet.

public void readFromParcel (Parcel source)

public void splitRawContacts ()

public void writeToParcel (Parcel dest, int flags)

Protected Methods

protected ContentProviderOperation.Builder beginKeepTogether ()

Start building a ContentProviderOperation that will keep two RawContacts together.